All of lore.kernel.org
 help / color / mirror / Atom feed
* Bogus sparse warning?
@ 2007-02-12 10:05 Anton Altaparmakov
  2007-02-12 18:28 ` Linus Torvalds
  0 siblings, 1 reply; 15+ messages in thread
From: Anton Altaparmakov @ 2007-02-12 10:05 UTC (permalink / raw)
  To: linux-sparse

Hi,

Using latest code from git://git.kernel.org/pub/scm/linux/kernel/git/ 
josh/sparse.git

When I run:  make CHECKFLAGS="-D__CHECK_ENDIAN__" C=2 modules

I get this warning:

   CHECK   fs/ntfs/file.c
fs/ntfs/file.c:2241:5: warning: incorrect type in argument 8  
(different signedness)
fs/ntfs/file.c:2241:5:    expected int [signed] ( [signed] [usertype]  
get_block )( ... )
fs/ntfs/file.c:2241:5:    got int [signed] ( static [toplevel]  
*<noident> )( ... )

The relevant code to reproduce this is:

 From <include/linux/fs.h>:

typedef int (get_block_t)(struct inode *inode, sector_t iblock,
                         struct buffer_head *bh_result, int create);

static inline ssize_t blockdev_direct_IO(int rw, struct kiocb *iocb,
         struct inode *inode, struct block_device *bdev, const struct  
iovec *iov,
         loff_t offset, unsigned long nr_segs, get_block_t get_block,
         dio_iodone_t end_io)
{
}

In my current <fs/ntfs/file.c>:

static int ntfs_get_block_for_direct_IO_write(struct inode *vi,  
sector_t blk,
                 struct buffer_head *bh, int create)
{
}

And later (this is line 2240 from the error message):

                 written = blockdev_direct_IO(WRITE, iocb, vi, vi- 
 >i_sb->s_bdev,
                                 iov, pos, *nr_segs,
                                 ntfs_get_block_for_direct_IO_write,  
NULL);

Why is sparse complaining?  And perhaps more importantly how do I  
make the warning go away?

Thanks a lot in advance!

Best regards,

	Anton
-- 
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer, http://www.linux-ntfs.org/

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2007-02-13 23:01 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-12 10:05 Bogus sparse warning? Anton Altaparmakov
2007-02-12 18:28 ` Linus Torvalds
2007-02-12 19:14   ` Christopher Li
2007-02-12 19:53     ` Linus Torvalds
2007-02-13  8:30       ` Josh Triplett
2007-02-13  0:15     ` Anton Altaparmakov
2007-02-13  1:46       ` Christopher Li
2007-02-13  8:22         ` Josh Triplett
     [not found]           ` <20070213190400.GA9989@chrisli.org>
2007-02-13 23:01             ` Josh Triplett
2007-02-13  9:39         ` Anton Altaparmakov
2007-02-13  0:25   ` Anton Altaparmakov
2007-02-13  0:42     ` Linus Torvalds
2007-02-13  9:53       ` Anton Altaparmakov
2007-02-13 16:10         ` Linus Torvalds
2007-02-13 21:23           ` Anton Altaparmakov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.