2004-09-07 15:47:13

by John Cherry

[permalink] [raw]
Subject: 6 New compile/sparse warnings (over the weekend)


Compiler: gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
Arch: i386


Summary:
New warnings = 6
Fixed warnings = 1

New warnings:
-------------
drivers/media/video/bttv-cards.c:4148:38: warning: Using plain integer
as NULL pointer

drivers/net/cs89x0.c:1709: warning: `use_dma' defined but not used

drivers/net/cs89x0.c:1710: warning: `dma' defined but not used

drivers/net/cs89x0.c:1711: warning: `dmasize' defined but not used

fs/coda/file.c:298:14: warning: incorrect type in initializer
(incompatible argument 5 (different address spaces))
fs/coda/file.c:298:14: expected int [usertype] ( *sendfile )( ... )
fs/coda/file.c:298:14: got int [usertype] ( static [addressable]
[toplevel] *<noident> )( ... )

fs/coda/file.c:61:66: warning: incorrect type in argument 5 (different
address spaces)
fs/coda/file.c:61:66: expected void *<noident>
fs/coda/file.c:61:66: got void [noderef] *target<asn:1>

Fixed warnings:
---------------
drivers/net/wan/pc300_tty.c:763: warning: `new' might be used
uninitialized in this function




2004-09-08 13:25:18

by Jan Harkes

[permalink] [raw]
Subject: [PATCH 2.6.9-rc1] Coda - fix sparse warnings

I reused the coda_file_read wrapper for sendfile and accidentally left
the __user tag on the buffer. This patch should fix the sparse warnings.

Signed-off-by: Jan Harkes <[email protected]>


diff -urN --exclude '*.orig' linux-2.6.9-rc1-bk7.coda_sendfile/fs/coda/file.c linux-2.6.9-rc1-bk7.coda_sendfile2/fs/coda/file.c
--- linux-2.6.9-rc1-bk7.coda_sendfile/fs/coda/file.c 2004-09-01 12:15:15.000000000 -0400
+++ linux-2.6.9-rc1-bk7.coda_sendfile2/fs/coda/file.c 2004-09-08 09:07:53.000000000 -0400
@@ -46,7 +46,7 @@

static ssize_t
coda_file_sendfile(struct file *coda_file, loff_t *ppos, size_t count,
- read_actor_t actor, void __user *target)
+ read_actor_t actor, void *target)
{
struct coda_file_info *cfi;
struct file *host_file;