Re: [patch 00/23]




General readability comment. This:

enum hrtimer_mode {
HRTIMER_ABS, /* Time value is absolute */
HRTIMER_REL, /* Time value is relative to now */
};

enum hrtimer_restart {
HRTIMER_NORESTART,
HRTIMER_RESTART,
};


#define HRTIMER_INACTIVE 0x00
#define HRTIMER_ACTIVE 0x01
#define HRTIMER_CALLBACK 0x02
#define HRTIMER_PENDING 0x04


is quite bad. They enumerate different conceptual things but they are all
in the sane namespace. The reader sees code which is using a mixture of
HRTIMER_ABS, HRTIMER_RESTART and HRTIMER_ACTIVE and gets needlessly
confused over what they all signify.

This:

enum hrtimer_cb_mode {
HRTIMER_CB_SOFTIRQ,
HRTIMER_CB_IRQSAFE,
HRTIMER_CB_IRQSAFE_NO_RESTART,
HRTIMER_CB_IRQSAFE_NO_SOFTIRQ,
};

is better.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: Iterating through an enum???
    ... to have to name and specify them. ... enum), although I can see the advantage of defining consts in a namespace ... > and/or too many that it isn't practical to enumerate all, ... compiler is free to get rid of the allocation. ...
    (microsoft.public.vc.language)
  • Re: Behaviour of enumerated types
    ... >>> than using their index values as keys to other ordered info? ... If you want sequence numbers, use enumerate(). ... the enum object itself can be used directly as an iterable. ...
    (comp.lang.python)
  • Re: How to enum an enum?
    ... "Ernst Murnleitner" wrote... ... > I want to enumerate all values in an enum, ...
    (comp.lang.cpp)
  • Can anyone help me?
    ... After i install the Toaster bus driver in windows98 successfully, ... find way to enumerate the virtual device using enum.exe. ... "enum -p 1" in console line,it couldn't work properly and broke out ...
    (microsoft.public.development.device.drivers)
  • How to enum an enum?
    ... I want to enumerate all values in an enum, ... // BaseItem has a virtual Function IsAwhich tests if the item is member ...
    (comp.lang.cpp)