From 8a4706493d6155452c2654578d9b90d75b9b86f1 Mon Sep 17 00:00:00 2001 From: Alexander Viro Date: Thu, 15 Jul 2004 22:03:51 -0700 Subject: [PATCH] [PATCH] misc sparse cleanups - 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 | 1 + arch/x86_64/kernel/signal.c | 2 +- include/asm-sparc64/openpromio.h | 4 ++-- include/linux/list.h | 2 +- kernel/power/pmdisk.c | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/arch/sparc/kernel/sun4setup.c b/arch/sparc/kernel/sun4setup.c index 8aae2f85d2d4a..229a52f55f16a 100644 --- a/arch/sparc/kernel/sun4setup.c +++ b/arch/sparc/kernel/sun4setup.c @@ -69,6 +69,7 @@ void __init sun4setup(void) sun4_esp_physaddr=SUN4_400_ESP_PHYSADDR; break; default: + ; } } diff --git a/arch/x86_64/kernel/signal.c b/arch/x86_64/kernel/signal.c index d814db6e36066..f6eb0e337f6f5 100644 --- a/arch/x86_64/kernel/signal.c +++ b/arch/x86_64/kernel/signal.c @@ -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; diff --git a/include/asm-sparc64/openpromio.h b/include/asm-sparc64/openpromio.h index 555b3b5b115f3..a5b88e9d99877 100644 --- a/include/asm-sparc64/openpromio.h +++ b/include/asm-sparc64/openpromio.h @@ -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) diff --git a/include/linux/list.h b/include/linux/list.h index 9e0c971ded6f7..23e287fe42595 100644 --- a/include/linux/list.h +++ b/include/linux/list.h @@ -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) /** diff --git a/kernel/power/pmdisk.c b/kernel/power/pmdisk.c index d4c20e05a4885..318bfb9fa5f8b 100644 --- a/kernel/power/pmdisk.c +++ b/kernel/power/pmdisk.c @@ -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; } -- 2.53.0