[linux-pm] type-checking for driver model

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

> > +typedef u32 __bitwise pm_message_t;
> 
> Ugh, I hate typedefs.  You can just do this with an enum if you want,
> but I saw Linus's post too, so I understand why you did it this way.

I hate them, too, but:
1) Linus wanted typedef
and
2) this will probably become struct in future. Typedef will allow me to
do conversion to struct easily.

> > +#define PMSG_APM_SUSPEND	((__force pm_message_t) 3)
> > +#define PMSG_APM_STANDBY	((__force pm_message_t) 3)
> > +#define PMSG_SYSTEM_HALT	((__force pm_message_t) 3)
> > +#define PMSG_SYSTEM_REBOOT	((__force pm_message_t) 3)
> > +#define PMSG_SYSTEM_SHUTDOWN	((__force pm_message_t) 3)
> > +#define PMSG_SUSPEND_RAM	((__force pm_message_t) 3)
> > +#define PMSG_SUSPEND_DISK	((__force pm_message_t) 3)
> > +#define PMSG_DEV_DETACH	((__force pm_message_t) 3)
> 
> Are you sure these are all supposed to be the same value?

Yes. Next step is audit all drivers and switch to different values...
				Pavel
-- 
64 bytes from 195.113.31.123: icmp_seq=28 ttl=51 time=448769.1 ms         



[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux