lkml.org 
[lkml]   [2000]   [Oct]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: real_root_dev
On Thu, Oct 19, 2000 at 09:50:48PM +0200, Geert Uytterhoeven wrote:
>
> `real_root_dev' must be `int', not `kdev_t'.
>
> - if (MAJOR(real_root_dev) != RAMDISK_MAJOR
> + if (MAJOR((kdev_t)real_root_dev) != RAMDISK_MAJOR

Ach, Geert, how painful to behold!

Never forget: a kdev_t is a pointer to a structure,
and MAJOR takes a field of this structure.
Casting an integer to a structure is ridiculous.
There are functions to_kdev_t etc to do the conversion
(and these may involve lookup in a hash table).

Please keep the source as much as possible kdev_t clean.
At some point in time, I hope 2.5.1, we must change,
and all such cruft would have to be fixed again.

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

\
 
 \ /
  Last update: 2005-03-22 12:41    [W:0.025 / U:2.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site