* Type-change of kdev_t
@ 2002-01-18 13:42 Roger W.Brown
2002-01-18 16:39 ` Randy.Dunlap
0 siblings, 1 reply; 2+ messages in thread
From: Roger W.Brown @ 2002-01-18 13:42 UTC (permalink / raw)
To: linux-kernel
Hi,
I'm no kernel hacker so I am little hesitant to speak; however,
I'm looking at kdev_t.h from the linux-2.5.3-pre1 source.
The type of kdev_t has changed recently from a scalar type to a
structured type. Should macro definitions such as MINOR(dev) also
be revised to be consistent with the "new" kdev_t ?
Something like:
#define MINOR(dev) ((unsigned int) ((dev.value) & MINORMASK))
rather than
#define MINOR(dev) ((unsigned int) ((dev) & MINORMASK))
Then usage of the MINOR() macro remains unchanged.
Regards,
Roger Brown
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Type-change of kdev_t
2002-01-18 13:42 Type-change of kdev_t Roger W.Brown
@ 2002-01-18 16:39 ` Randy.Dunlap
0 siblings, 0 replies; 2+ messages in thread
From: Randy.Dunlap @ 2002-01-18 16:39 UTC (permalink / raw)
To: Roger W.Brown; +Cc: linux-kernel
On Sat, 19 Jan 2002, Roger W.Brown wrote:
|
| Hi,
|
| I'm no kernel hacker so I am little hesitant to speak; however,
| I'm looking at kdev_t.h from the linux-2.5.3-pre1 source.
|
| The type of kdev_t has changed recently from a scalar type to a
| structured type. Should macro definitions such as MINOR(dev) also
| be revised to be consistent with the "new" kdev_t ?
Macros to use kdev_t also changed.
| Something like:
|
| #define MINOR(dev) ((unsigned int) ((dev.value) & MINORMASK))
|
| rather than
|
| #define MINOR(dev) ((unsigned int) ((dev) & MINORMASK))
|
| Then usage of the MINOR() macro remains unchanged.
Nope, use major() and minor() instead [although I prefer
the kmajor() and kminor() patch].
See http://www.osdl.org/archive/rddunlap/linux-port-25x.html,
item 7, bullet 3, which points to an email from one Linus Torvalds
about the kdev_t change.
--
~Randy
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-01-18 16:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-18 13:42 Type-change of kdev_t Roger W.Brown
2002-01-18 16:39 ` Randy.Dunlap
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®