Type inconsistency around the MKDEV macro in kdev_t.h

Markus Pilzecker (mp@timesink.pilzecker.de)
Mon, 2 Jun 1997 21:52:33 GMT


Hello, Linux folks,

by a bug report for u2fs, I was led to a thing, that I consider a type
inconsistency.
It's in kdev_t:
kdev_t is [as of kdev_t.h] an unsigned short, while the macro ``MKDEV''
is often used combining two ints, e.g a ``gendisk.major'' and any
int ``minor'' to a resulting int.
In my understanding, the suitable place to correct the problem
should be a proper definition of the MKDEV macro [with a type cast
or whatever], because it should be possible to construct a ``kdev_t''
from integral major and minor device numbers.
At least on the DEC-Alpha platform is this reported to cause an error,
when such an MKDEV result is being used as parameter for a function that
expects a kdev_t.

It would be nice, if you cc: any answers in this thread to me personally,
because I'm not on your list.

Ciao,

Markus

-------------------------------------------------------------------------------
Sackpost:
Markus Pilzecker voice: +49 6251 39415
Am Wechsel 9a V34,V17: +49 6251 39575
D-64625 Bensheim email: markus.pilzecker@rhein-neckar.netsurf.de
-------------------------------------------------------------------------------