]> git.hungrycats.org Git - linux/commitdiff
[PATCH] misc sparse cleanups
authorAlexander Viro <viro@www.linux.org.uk>
Fri, 16 Jul 2004 05:03:51 +0000 (22:03 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Fri, 16 Jul 2004 05:03:51 +0000 (22:03 -0700)
 - missing ; between default: and } in sun4setup.c
 - cast of pointer to unsigned long long instead of unsigned long in
   x86_64 signal.c
 - missed annotations for ioctl structure in sparc64 openpromio.h
   (should've been in the same patch as the rest of drivers/sbus/*
   annotations)
 - 0->NULL in list.h and pmdisk.c

arch/sparc/kernel/sun4setup.c
arch/x86_64/kernel/signal.c
include/asm-sparc64/openpromio.h
include/linux/list.h
kernel/power/pmdisk.c

index 8aae2f85d2d4a43f3fa4d73d7cd094d1416f0b92..229a52f55f16a50e8276aff1b95a0abcb113147a 100644 (file)
@@ -69,6 +69,7 @@ void __init sun4setup(void)
                        sun4_esp_physaddr=SUN4_400_ESP_PHYSADDR;
                        break;
                default:
+                       ;
        }
 }
 
index d814db6e3606689bd66237225c86e2188255aa2e..f6eb0e337f6f56ec888b1d4af7a07151fe8c758f 100644 (file)
@@ -242,7 +242,7 @@ static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
 
        if (me->used_math) {
                fp = get_stack(ka, regs, sizeof(struct _fpstate)); 
-               frame = (void __user *)round_down((u64)fp - sizeof(struct rt_sigframe), 16) - 8;
+               frame = (void __user *)round_down((unsigned long)fp - sizeof(struct rt_sigframe), 16) - 8;
 
                if (!access_ok(VERIFY_WRITE, fp, sizeof(struct _fpstate))) { 
                goto give_sigsegv;
index 555b3b5b115f38b753bde61617d4988b94d313a0..a5b88e9d99877cc941dc58659ad9b1b7ba276d13 100644 (file)
@@ -52,9 +52,9 @@ struct opiocdesc
 {
        int     op_nodeid;              /* PROM Node ID (value-result) */
        int     op_namelen;             /* Length of op_name. */
-       char    *op_name;               /* Pointer to the property name. */
+       char    __user *op_name;        /* Pointer to the property name. */
        int     op_buflen;              /* Length of op_buf (value-result) */
-       char    *op_buf;                /* Pointer to buffer. */
+       char    __user *op_buf;         /* Pointer to buffer. */
 };
 
 #define        OPIOCGET        _IOWR('O', 1, struct opiocdesc)
index 9e0c971ded6f7284328c747d03e45e401ac59944..23e287fe425957ecc4b5df9ad81ae430f8f34a05 100644 (file)
@@ -626,7 +626,7 @@ static inline void hlist_add_after(struct hlist_node *n,
             pos = pos->next)
 
 #define hlist_for_each_safe(pos, n, head) \
-       for (pos = (head)->first; n = pos ? pos->next : 0, pos; \
+       for (pos = (head)->first; n = pos ? pos->next : NULL, pos; \
             pos = n)
 
 /**
index d4c20e05a4885c9423e66e319a2d22e8101ac824..318bfb9fa5f8b846e99a63051df7326f2182b80a 100644 (file)
@@ -953,7 +953,7 @@ static const char * __init sanity_check(void)
                return "machine";
        if(pmdisk_info.cpus != num_online_cpus())
                return "number of cpus";
-       return 0;
+       return NULL;
 }