devfs (1/7) - fix compilation
PATCH 1/1 devfs (1/7) - fix compilation
As several people found out while I was asleep I sent you a bogus patch version and devfs didn't compile in your tree since then. Fix it.
fs/devfs/base.c +3 -4
@@ -1377,7 +1377,6 @@* @uid: The user ID. * @gid: The group ID. * @fs_info: The filesystem info. -* @atomic: If TRUE, an atomic allocation is required. * * Returns %TRUE if an event was queued and devfsd woken up, else %FALSE. */
@@ -1423,7 +1422,7 @@static void devfsd_notify (struct devfs_entry *de,unsigned short type) {devfsd_notify_de (de, type, de->mode, current->euid, - current->egid, &fs_info,0 ); + current->egid, &fs_info); }
@@ -1456,8 +1455,8 @@dev_t devnum =0 , dev =MKDEV (major, minor);struct devfs_entry *de; -if (flags) -printk (KERN_ERR "%s called with flags != 0, please fix!\n" ); +/* we don't accept any flags anymore. prototype will change soon. */ +BUG_ON (flags);if (name ==NULL ) {
fs/devfs/base.c line 1459
Quoted 8 lines · Christoph Hellwig
fs/devfs/base.c +2
-2@@ -1456,8 +1455,8 @@dev_t devnum =0 , dev =MKDEV (major, minor);struct devfs_entry *de; -if (flags) -printk (KERN_ERR "%s called with flags != 0, please fix!\n" ); +/* we don't accept any flags anymore. prototype will change soon. */ +BUG_ON (flags);
PLEASE don't use BUG_ON() except for conditions that you really cannot continue from. It's damn impolite (and it makes debugging impossible) to kill the kernel startup if somebody has a unconverted driver or similar.
Linus
Quoted 6 lines · Linus Torvalds
Quoted 4 lines · Christoph Hellwig
(quoted diff) +0
-0@@ -1456,8 +1455,8 @@ dev_t devnum = 0, dev = MKDEV(major, minor); struct devfs_entry *de;
Quoted 8 lines
Review line 1459
Quoted 4 lines
(quoted diff) +2
-2- if (flags) - printk(KERN_ERR "%s called with flags != 0, please fix!\n"); + /* we don't accept any flags anymore. prototype will change soon. */ + BUG_ON(flags);PLEASE don't use
BUG_ON()except for conditions that you really cannot continue from. It's damn impolite (and it makes debugging impossible) to kill the kernel startup if somebody has a unconverted driver or similar.
Ok. Is this one better?
fs/devfs/base.c +3 -4
@@ -1377,7 +1377,6 @@* @uid: The user ID. * @gid: The group ID. * @fs_info: The filesystem info. -* @atomic: If TRUE, an atomic allocation is required. * * Returns %TRUE if an event was queued and devfsd woken up, else %FALSE. */
@@ -1423,7 +1422,7 @@static void devfsd_notify (struct devfs_entry *de,unsigned short type) {devfsd_notify_de (de, type, de->mode, current->euid, - current->egid, &fs_info,0 ); + current->egid, &fs_info); }
@@ -1456,8 +1455,8 @@dev_t devnum =0 , dev =MKDEV (major, minor);struct devfs_entry *de; -if (flags) -printk (KERN_ERR "%s called with flags != 0, please fix!\n" ); +/* we don't accept any flags anymore. prototype will change soon. */ +WARN_ON (flags);if (name ==NULL ) {
Quoted 2 lines · Christoph Hellwig
Ok. Is this one better?
Well, I already edited the previous raw diff directly..
Linus