sis: fix sparse warnings
PATCH 1/1 sis: fix sparse warnings
sis_main.c needs linux/smp_lock.h;
also, fix one function return type.
drivers/video/sis/sis_main.c:2204:2: warning: undefined identifier 'lock_kernel' drivers/video/sis/sis_main.c:2206:2: warning: undefined identifier 'unlock_kernel' drivers/video/sis/sis_main.c:2204: warning: implicit declaration of function lock_kernel' drivers/video/sis/sis_main.c:2206: warning: implicit declaration of function unlock_kernel' drivers/video/sis/sis_main.c:2275:21: warning: incorrect type in initializer (different type sizes)drivers/video/sis/sis_main.c:2275:21: expected int [signed] ( *fb_compat_ioctl )( ... )drivers/video/sis/sis_main.c:2275:21: got long [signed] ( static [signed] [toplevel] *<noident> )( ... )drivers/video/sis/sis_main.c:2275: warning: initialization from incompatible pointer type
diffstat:=
drivers/video/sis/sis_main.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-)
drivers/video/sis/sis_main.c renamed from drivers/video/sis/sis_main.c~video_sis_includes +2 -1
@@ -39,6 +39,7 @@#include <linux/moduleparam.h> #endif #include <linux/kernel.h> +#include <linux/smp_lock.h> #include <linux/spinlock.h> #include <linux/errno.h> #include <linux/string.h>
@@ -2198,7 +2199,7 @@ sisfb_ioctl(struct inode *inode, struct }#ifdef CONFIG_COMPAT -static long sisfb_compat_ioctl (struct file *f,unsigned cmd,unsigned long arg,struct fb_info *info) +static int sisfb_compat_ioctl (struct file *f,unsigned cmd,unsigned long arg,struct fb_info *info) {int ret;lock_kernel ();
---
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
PATCH 1/1 sis: fix sparse warnings
Seeing that Andrew just posted a patch to correct the ioctl return type, only the include for linux/smp_lock.h is missing. (Thanks for the message, Thomas.)
sis_main.c needs linux/smp_lock.h;
drivers/video/sis/sis_main.c:2204:2: warning: undefined identifier 'lock_kernel' drivers/video/sis/sis_main.c:2206:2: warning: undefined identifier 'unlock_kernel' drivers/video/sis/sis_main.c:2204: warning: implicit declaration of function lock_kernel' drivers/video/sis/sis_main.c:2206: warning: implicit declaration of function unlock_kernel'
diffstat:=
drivers/video/sis/sis_main.c | 1 + 1 files changed, 1 insertion(+)
drivers/video/sis/sis_main.c renamed from drivers/video/sis/sis_main.c~video_sis_includes +1 -0
@@ -39,6 +39,7 @@#include <linux/moduleparam.h> #endif #include <linux/kernel.h> +#include <linux/smp_lock.h> #include <linux/spinlock.h> #include <linux/errno.h> #include <linux/string.h>
---
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click