]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Remaining sparse warnings in allnoconfig
authorMika Kukkonen <mika@osdl.org>
Fri, 2 Jul 2004 03:36:36 +0000 (20:36 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Fri, 2 Jul 2004 03:36:36 +0000 (20:36 -0700)
Attached is a smallish patch for couple trivial sparse warnings in
allnoconfig build and more importantly an "excuses" text file explaining
why the rest have not been fixed.

Basically all of them (with the exception of the one in Andrews tree) need
some serious re-engineering.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
include/linux/dcookies.h
include/linux/pm.h
init/initramfs.c
kernel/sysctl.c

index b2ae9692dc05e97b0e173dcfcc549dfc21f48d6b..c28050136164f239f15486abcd41a7aa132f3d90 100644 (file)
@@ -50,7 +50,7 @@ int get_dcookie(struct dentry * dentry, struct vfsmount * vfsmnt,
 
 struct dcookie_user * dcookie_register(void)
 {
-       return 0;
+       return NULL;
 }
 
 void dcookie_unregister(struct dcookie_user * user)
index 66e62c0df19c5ec7cc32740084cc71e3cfd1a5ec..d54bc441daff3c5635ac46f88273c7a6e3658b3e 100644 (file)
@@ -159,7 +159,7 @@ static inline struct pm_dev *pm_register(pm_dev_t type,
                                         unsigned long id,
                                         pm_callback callback)
 {
-       return 0;
+       return NULL;
 }
 
 static inline void pm_unregister(struct pm_dev *dev) {}
index 40042ef5feb0570ca7004901df91a9a070c83666..20bd855f6f8b07fb2145f8e86173bb5bc4db3d5d 100644 (file)
@@ -169,7 +169,7 @@ static int __init do_collect(void)
        memcpy(collect, victim, n);
        eat(n);
        collect += n;
-       if (remains -= n)
+       if ((remains -= n) != 0)
                return 1;
        state = next_state;
        return 0;
index 641727bab22fb5cdf75aaf8b0a6c3cb9b7a4ccd6..0df0748d56bd39a3787e554c1c3c6b1a2696a60f 100644 (file)
@@ -2162,7 +2162,7 @@ int proc_doulongvec_ms_jiffies_minmax(ctl_table *table, int write,
 struct ctl_table_header * register_sysctl_table(ctl_table * table, 
                                                int insert_at_head)
 {
-       return 0;
+       return NULL;
 }
 
 void unregister_sysctl_table(struct ctl_table_header * table)