patch-2.1.13 linux/include/linux/kdev_t.h
Next file: linux/include/linux/net.h
Previous file: linux/include/linux/ctype.h
Back to the patch index
Back to the overall index
- Lines: 18
- Date:
Sat Nov 23 12:29:04 1996
- Orig file:
v2.1.12/linux/include/linux/kdev_t.h
- Orig date:
Thu Sep 21 08:53:39 1995
diff -u --recursive --new-file v2.1.12/linux/include/linux/kdev_t.h linux/include/linux/kdev_t.h
@@ -62,13 +62,13 @@
However, everything runs fine with an arbitrary kdev_t type. */
#define MINORBITS 8
-#define MINORMASK ((1<<MINORBITS) - 1)
+#define MINORMASK ((1U << MINORBITS) - 1)
typedef unsigned short kdev_t;
-#define MAJOR(dev) ((dev) >> MINORBITS)
-#define MINOR(dev) ((dev) & MINORMASK)
-#define HASHDEV(dev) (dev)
+#define MAJOR(dev) ((unsigned int) ((dev) >> MINORBITS))
+#define MINOR(dev) ((unsigned int) ((dev) & MINORMASK))
+#define HASHDEV(dev) ((unsigned int) (dev))
#define NODEV 0
#define MKDEV(ma,mi) (((ma) << MINORBITS) | (mi))
#define B_FREE 0xffff /* yuk */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov