2009-04-30 00:15:17

by Hartley Sweeten

[permalink] [raw]
Subject: [PATCH] fs/super.c: fix sparse warning

Sparse reports the following in fs/super.c:

warning: Using plain integer as NULL pointer

Signed-off-by: H Hartley Sweeten <[email protected]>
Cc: Subrata Modak <[email protected]>

---

diff --git a/fs/super.c b/fs/super.c
index 786fe7d..14e59bc 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -897,7 +897,7 @@ void kill_block_super(struct super_block *sb)
struct block_device *bdev = sb->s_bdev;
fmode_t mode = sb->s_mode;

- bdev->bd_super = 0;
+ bdev->bd_super = NULL;
generic_shutdown_super(sb);
sync_blockdev(bdev);
close_bdev_exclusive(bdev, mode);


2009-04-30 00:42:20

by Al Viro

[permalink] [raw]
Subject: Re: [PATCH] fs/super.c: fix sparse warning

On Wed, Apr 29, 2009 at 08:14:57PM -0400, H Hartley Sweeten wrote:
> Sparse reports the following in fs/super.c:
>
> warning: Using plain integer as NULL pointer
>
> Signed-off-by: H Hartley Sweeten <[email protected]>
> Cc: Subrata Modak <[email protected]>

Applied.

However, I would *really* ask you to avoid that kind of subjects in
the future. Proper subject for that one is "NULL noise in <file>" (or
<file>:<function>. Sparse doesn't even need to be mentioned.

sparse generates many kinds of warnings. And they are neither equal
nor equally interesting.

Kindly use subjects that would tell what's going on; "$TOOL gives
some warning in $FILE" is bloody useless.