Skip to contentSkip to conversation

fix sparse warnings: Using plain integer as NULL pointer

PATCH Applied Hannes Eder 6 participants 38 messages Feb 22, 2009 – Mar 5, 2009

Subsystems (19)
lore
Share & tools
lore
#0 lore raw

cover fix sparse warnings: Using plain integer as NULL pointer

The following series fix the sparse warning 'Using plain integer as NULL pointer' all over the kernel tree. This series is based on linux-next/next-20090220.

---

Hannes Eder (16):
ALSA: msnd: fix sparse warning: Using plain integer as NULL pointer
ipv6: fix sparse warning: Using plain integer as NULL pointer
memcg: fix sparse warning: Using plain integer as NULL pointer
kprobes: fix sparse warnings: Using plain integer as NULL pointer
reiserfs: fix sparse warning: Using plain integer as NULL pointer fs/super.c: fix sparse warning: Using plain integer as NULL pointer
viafb: fix sparse warning: Using plain integer as NULL pointer usb host: fix sparse warning: Using plain integer as NULL pointer [SCSI] FlashPoint: fix sparse warnings: Using plain integer as NULL pointer
panasonic-laptop: fix sparse warning: Using plain integer as NULL pointer
MTD: tests: fix sparse warnings: Using plain integer as NULL pointer
dvb: fix sparse warnings: Using plain integer as NULL pointer
ide: fix sparse warnings: Using plain integer as NULL pointer
drm: radeon: fix sparse warnings: Using plain integer as NULL pointer x86, numa_32.c: fix sparse warning: Using plain integer as NULL pointer kexec/i386: fix sparse warnings: Using plain integer as NULL pointer

 arch/x86/kernel/machine_kexec_32.c      |    2 +-
 arch/x86/kernel/traps.c                 |    2 +-
 arch/x86/mm/numa_32.c                   |    2 +-
 drivers/gpu/drm/radeon/radeon_cp.c      |    2 +-
 drivers/gpu/drm/radeon/radeon_state.c   |    2 +-
 drivers/ide/ide-disk_proc.c             |    2 +-
 drivers/ide/ide-floppy_proc.c           |    2 +-
 drivers/ide/ide-proc.c                  |    2 +-
 drivers/ide/ide-tape.c                  |    2 +-
 drivers/media/dvb/frontends/drx397xD.c  |    2 +-
 drivers/mtd/tests/mtd_oobtest.c         |   24 ++++++++++++------------
 drivers/mtd/tests/mtd_readtest.c        |    2 +-
 drivers/platform/x86/panasonic-laptop.c |    2 +-
 drivers/scsi/FlashPoint.c               |    7 +++----
 drivers/usb/host/oxu210hp-hcd.c         |    2 +-
 drivers/video/via/hw.c                  |    2 +-
 fs/reiserfs/inode.c                     |    2 +-
 fs/super.c                              |    2 +-
 kernel/test_kprobes.c                   |    6 +++---
 mm/memcontrol.c                         |    2 +-
 net/ipv6/xfrm6_state.c                  |    2 +-
 sound/isa/msnd/msnd_pinnacle.c          |    2 +-
 22 files changed, 37 insertions(+), 38 deletions(-)
#1 lore raw

PATCH 1/16 kexec/i386: fix sparse warnings: Using plain integer as NULL pointer

Fix this sparse warnings:
arch/x86/kernel/machine_kexec_32.c:124:22: warning: Using plain integer as NULL pointer arch/x86/kernel/traps.c:950:24: warning: Using plain integer as NULL pointer

---
 arch/x86/kernel/machine_kexec_32.c |    2 +-
 arch/x86/kernel/traps.c            |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/x86/kernel/machine_kexec_32.c +1 -1
index 37f4200..f5fc8c7 100644
@@ -121,7 +121,7 @@ static void machine_kexec_page_table_set_one(
 static void machine_kexec_prepare_page_tables(struct kimage *image)
 {
 	void *control_page;
-	pmd_t *pmd = 0;
+	pmd_t *pmd = NULL;
 
 	control_page = page_address(image->control_code_page);
 #ifdef CONFIG_X86_PAE
arch/x86/kernel/traps.c +1 -1
index ba90406..6882089 100644
@@ -947,7 +947,7 @@ dotraplinkage void do_iret_error(struct pt_regs *regs, long error_code)
 	info.si_signo = SIGILL;
 	info.si_errno = 0;
 	info.si_code = ILL_BADSTK;
-	info.si_addr = 0;
+	info.si_addr = NULL;
 	if (notify_die(DIE_TRAP, "iret exception",
 			regs, error_code, 32, SIGILL) = NOTIFY_STOP)
 		return;
#2 lore raw

Re: [PATCH 01/16] kexec/i386: fix sparse warnings: Using plain integer as NULL pointer

Added To: Ingo Molnar <[email protected]>

Quoted 30 lines · Hannes Eder

Fix this sparse warnings:
 arch/x86/kernel/machine_kexec_32.c:124:22: warning: Using plain integer as NULL pointer arch/x86/kernel/traps.c:950:24: warning: Using plain integer as NULL pointer

---
 arch/x86/kernel/machine_kexec_32.c |    2 +-
 arch/x86/kernel/traps.c            |    2 +-

 2 files changed, 2 insertions(+), 2 deletions(-)
arch/x86/kernel/machine_kexec_32.c +1 -1
index 37f4200..f5fc8c7 100644
@@ -121,7 +121,7 @@ static void machine_kexec_page_table_set_one(
  static void machine_kexec_prepare_page_tables(struct kimage *image)
  {
        void *control_page;
-       pmd_t *pmd = 0;
+       pmd_t *pmd = NULL;
 
        control_page = page_address(image->control_code_page);
  #ifdef CONFIG_X86_PAE
arch/x86/kernel/traps.c +0 -0
index ba90406..6882089 100644

arch/x86/kernel/traps.c dotraplinkage void do_iret_error(struct pt_regs *regs, long error_code) · line 953

Quoted 8 lines
arch/x86/kernel/traps.c +1 -1
@@ -947,7 +947,7 @@ dotraplinkage void do_iret_error(struct pt_regs *regs, long error_code)
        info.si_signo = SIGILL;
        info.si_errno = 0;
        info.si_code = ILL_BADSTK;
-       info.si_addr = 0;
+       info.si_addr = NULL;
        if (notify_die(DIE_TRAP, "iret exception",
                        regs, error_code, 32, SIGILL) = NOTIFY_STOP)
                return;

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw

PATCH 2/16 x86, numa_32.c: fix sparse warning: Using plain integer as NULL pointer

In reply to Hannes Eder

Fix this sparse warning:
arch/x86/mm/numa_32.c:197:24: warning: Using plain integer as NULL pointer

---
 arch/x86/mm/numa_32.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/mm/numa_32.c +1 -1
index d1f7439..3957cd6 100644
@@ -194,7 +194,7 @@ void *alloc_remap(int nid, unsigned long size)
 	size = ALIGN(size, L1_CACHE_BYTES);
 
 	if (!allocation || (allocation + size) >= node_remap_end_vaddr[nid])
-		return 0;
+		return NULL;
 
 	node_remap_alloc_vaddr[nid] += size;
 	memset(allocation, 0, size);
#4 lore raw

Re: [PATCH 02/16] x86, numa_32.c: fix sparse warning: Using plain integer as NULL pointer

Added To: Ingo Molnar <[email protected]>

Quoted 15 lines · Hannes Eder

Fix this sparse warning:
 arch/x86/mm/numa_32.c:197:24: warning: Using plain integer as NULL pointer

---
 arch/x86/mm/numa_32.c |    2 +-

 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/mm/numa_32.c +0 -0
index d1f7439..3957cd6 100644

arch/x86/mm/numa_32.c void *alloc_remap(int nid, unsigned long size) · line 200

Quoted 8 lines
arch/x86/mm/numa_32.c +1 -1
@@ -194,7 +194,7 @@ void *alloc_remap(int nid, unsigned long size)
        size = ALIGN(size, L1_CACHE_BYTES);
 
        if (!allocation || (allocation + size) >= node_remap_end_vaddr[nid])
-               return 0;
+               return NULL;
 
        node_remap_alloc_vaddr[nid] += size;
        memset(allocation, 0, size);

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#5 lore raw

PATCH 3/16 drm: radeon: fix sparse warnings: Using plain integer as NULL pointer

In reply to Hannes Eder

Fix this sparse warning:
drivers/gpu/drm/radeon/radeon_cp.c:1363:52: warning: Using plain integer as NULL pointer drivers/gpu/drm/radeon/radeon_state.c:1983:61: warning: Using plain integer as NULL pointer

---
 drivers/gpu/drm/radeon/radeon_cp.c    |    2 +-
 drivers/gpu/drm/radeon/radeon_state.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/radeon/radeon_cp.c +1 -1
index 119e642..f5f4e96 100644
@@ -1360,7 +1360,7 @@ static int radeon_do_cleanup_cp(struct drm_device * dev)
 		if (dev_priv->gart_info.gart_table_location = DRM_ATI_GART_FB)
 		{
 			drm_core_ioremapfree(&dev_priv->gart_info.mapping, dev);
-			dev_priv->gart_info.addr = 0;
+			dev_priv->gart_info.addr = NULL;
 		}
 	}
 	/* only clear to the start of flags */
drivers/gpu/drm/radeon/radeon_state.c +1 -1
index 043293a..61e75bc 100644
@@ -1980,7 +1980,7 @@ static int alloc_surface(drm_radeon_surface_alloc_t *new,
 
 	/* find a virtual surface */
 	for (i = 0; i < 2 * RADEON_MAX_SURFACES; i++)
-		if (dev_priv->virt_surfaces[i].file_priv = 0)
+		if (dev_priv->virt_surfaces[i].file_priv = NULL)
 			break;
 	if (i = 2 * RADEON_MAX_SURFACES) {
 		return -1;
#6 lore raw

Re: [PATCH 03/16] drm: radeon: fix sparse warnings: Using plain integer as NULL pointer

[Added To]

Quoted 30 lines · Hannes Eder

Fix this sparse warning:
 drivers/gpu/drm/radeon/radeon_cp.c:1363:52: warning: Using plain integer as NULL pointer drivers/gpu/drm/radeon/radeon_state.c:1983:61: warning: Using plain integer as NULL pointer

---
 drivers/gpu/drm/radeon/radeon_cp.c    |    2 +-
 drivers/gpu/drm/radeon/radeon_state.c |    2 +-

 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/radeon/radeon_cp.c +1 -1
index 119e642..f5f4e96 100644
@@ -1360,7 +1360,7 @@ static int radeon_do_cleanup_cp(struct drm_device * dev)
                if (dev_priv->gart_info.gart_table_location = DRM_ATI_GART_FB)
                {
                        drm_core_ioremapfree(&dev_priv->gart_info.mapping, dev);
-                       dev_priv->gart_info.addr = 0;
+                       dev_priv->gart_info.addr = NULL;
                }
        }
        /* only clear to the start of flags */
drivers/gpu/drm/radeon/radeon_state.c +0 -0
index 043293a..61e75bc 100644

drivers/gpu/drm/radeon/radeon_state.c static int alloc_surface(drm_radeon_surface_alloc_t *new, · line 1986

Quoted 8 lines
drivers/gpu/drm/radeon/radeon_state.c +1 -1
@@ -1980,7 +1980,7 @@ static int alloc_surface(drm_radeon_surface_alloc_t *new,
 
        /* find a virtual surface */
        for (i = 0; i < 2 * RADEON_MAX_SURFACES; i++)
-               if (dev_priv->virt_surfaces[i].file_priv = 0)
+               if (dev_priv->virt_surfaces[i].file_priv = NULL)
                        break;
        if (i = 2 * RADEON_MAX_SURFACES) {
                return -1;

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#7 lore raw

PATCH 4/16 ide: fix sparse warnings: Using plain integer as NULL pointer

In reply to Hannes Eder

Fix this sparse warnings:
drivers/ide/ide-disk_proc.c:130:11: warning: Using plain integer as NULL pointer drivers/ide/ide-floppy_proc.c:32:11: warning: Using plain integer as NULL pointer drivers/ide/ide-proc.c:234:11: warning: Using plain integer as NULL pointer drivers/ide/ide-tape.c:2141:11: warning: Using plain integer as NULL pointer

---
 drivers/ide/ide-disk_proc.c   |    2 +-
 drivers/ide/ide-floppy_proc.c |    2 +-
 drivers/ide/ide-proc.c        |    2 +-
 drivers/ide/ide-tape.c        |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
drivers/ide/ide-disk_proc.c +1 -1
index 3f2a078..eaea3be 100644
@@ -127,5 +127,5 @@ const struct ide_proc_devset ide_disk_settings[] = {
 	IDE_PROC_DEVSET(multcount,	0,    16),
 	IDE_PROC_DEVSET(nowerr,		0,     1),
 	IDE_PROC_DEVSET(wcache,		0,     1),
-	{ 0 },
+	{ NULL },
 };
drivers/ide/ide-floppy_proc.c +1 -1
index 3ec762c..fcd4d81 100644
@@ -29,5 +29,5 @@ const struct ide_proc_devset ide_floppy_settings[] = {
 	IDE_PROC_DEVSET(bios_head, 0,  255),
 	IDE_PROC_DEVSET(bios_sect, 0,   63),
 	IDE_PROC_DEVSET(ticks,	   0,  255),
-	{ 0 },
+	{ NULL },
 };
drivers/ide/ide-proc.c +1 -1
index 0ee8887..10a88bf 100644
@@ -231,7 +231,7 @@ static const struct ide_proc_devset ide_generic_settings[] = {
 	IDE_PROC_DEVSET(pio_mode, 0, 255),
 	IDE_PROC_DEVSET(unmaskirq, 0, 1),
 	IDE_PROC_DEVSET(using_dma, 0, 1),
-	{ 0 },
+	{ NULL },
 };
 
 static void proc_ide_settings_warn(void)
drivers/ide/ide-tape.c +1 -1
index 1b97d7a..e9e570f 100644
@@ -2138,7 +2138,7 @@ static const struct ide_proc_devset idetape_settings[] = {
 	__IDE_PROC_DEVSET(speed,	0, 0xffff, NULL, NULL),
 	__IDE_PROC_DEVSET(tdsc,		IDETAPE_DSC_RW_MIN, IDETAPE_DSC_RW_MAX,
 					mulf_tdsc, divf_tdsc),
-	{ 0 },
+	{ NULL },
 };
 #endif
 
#8 lore raw

Re: [PATCH 04/16] ide: fix sparse warnings: Using plain integer as NULL pointer

[Added To]

Quoted 56 lines · Hannes Eder

Fix this sparse warnings:
 drivers/ide/ide-disk_proc.c:130:11: warning: Using plain integer as NULL pointer drivers/ide/ide-floppy_proc.c:32:11: warning: Using plain integer as NULL pointer drivers/ide/ide-proc.c:234:11: warning: Using plain integer as NULL pointer drivers/ide/ide-tape.c:2141:11: warning: Using plain integer as NULL pointer

---
 drivers/ide/ide-disk_proc.c   |    2 +-
 drivers/ide/ide-floppy_proc.c |    2 +-
 drivers/ide/ide-proc.c        |    2 +-
 drivers/ide/ide-tape.c        |    2 +-

 4 files changed, 4 insertions(+), 4 deletions(-)
drivers/ide/ide-disk_proc.c +1 -1
index 3f2a078..eaea3be 100644
@@ -127,5 +127,5 @@ const struct ide_proc_devset ide_disk_settings[] = {
        IDE_PROC_DEVSET(multcount,      0,    16),
        IDE_PROC_DEVSET(nowerr,         0,     1),
        IDE_PROC_DEVSET(wcache,         0,     1),
-       { 0 },
+       { NULL },
  };
drivers/ide/ide-floppy_proc.c +1 -1
index 3ec762c..fcd4d81 100644
@@ -29,5 +29,5 @@ const struct ide_proc_devset ide_floppy_settings[] = {
        IDE_PROC_DEVSET(bios_head, 0,  255),
        IDE_PROC_DEVSET(bios_sect, 0,   63),
        IDE_PROC_DEVSET(ticks,     0,  255),
-       { 0 },
+       { NULL },
  };
drivers/ide/ide-proc.c +1 -1
index 0ee8887..10a88bf 100644
@@ -231,7 +231,7 @@ static const struct ide_proc_devset ide_generic_settings[] = {
        IDE_PROC_DEVSET(pio_mode, 0, 255),
        IDE_PROC_DEVSET(unmaskirq, 0, 1),
        IDE_PROC_DEVSET(using_dma, 0, 1),
-       { 0 },
+       { NULL },
  };
 
  static void proc_ide_settings_warn(void)
drivers/ide/ide-tape.c +0 -0
index 1b97d7a..e9e570f 100644

drivers/ide/ide-tape.c static const struct ide_proc_devset idetape_settings[] = { · line 2144

Quoted 8 lines
drivers/ide/ide-tape.c +1 -1
@@ -2138,7 +2138,7 @@ static const struct ide_proc_devset idetape_settings[] = {
        __IDE_PROC_DEVSET(speed,        0, 0xffff, NULL, NULL),
        __IDE_PROC_DEVSET(tdsc,         IDETAPE_DSC_RW_MIN, IDETAPE_DSC_RW_MAX,
                                        mulf_tdsc, divf_tdsc),
-       { 0 },
+       { NULL },
  };
  #endif
 

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#9 lore raw

PATCH 5/16 dvb: fix sparse warnings: Using plain integer as NULL pointer

In reply to Hannes Eder

Fix this sparse warnings:
drivers/media/dvb/frontends/drx397xD_fw.h:21:2: warning: Using plain integer as NULL pointer drivers/media/dvb/frontends/drx397xD_fw.h:22:2: warning: Using plain integer as NULL pointer

---
 drivers/media/dvb/frontends/drx397xD.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/media/dvb/frontends/drx397xD.c +1 -1
index 1e81e71..172f1f9 100644
@@ -74,7 +74,7 @@ static struct {
 } fw[] = {
 #define _FW_ENTRY(a, b, c)	{					\
 			.name	= a,					\
-			.file	= 0,					\
+			.file	= NULL,					\
 			.lock	= __RW_LOCK_UNLOCKED(fw[c].lock),	\
 			.refcnt = 0,					\
 			.data	= { }		}
#10 lore raw

Re: [PATCH 05/16] dvb: fix sparse warnings: Using plain integer as NULL pointer

[Added To]

Quoted 16 lines · Hannes Eder

Fix this sparse warnings:
 drivers/media/dvb/frontends/drx397xD_fw.h:21:2: warning: Using plain integer as NULL pointer drivers/media/dvb/frontends/drx397xD_fw.h:22:2: warning: Using plain integer as NULL pointer

---
 drivers/media/dvb/frontends/drx397xD.c |    2 +-

 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/media/dvb/frontends/drx397xD.c +0 -0
index 1e81e71..172f1f9 100644

drivers/media/dvb/frontends/drx397xD.c static struct { · line 80

Quoted 8 lines
drivers/media/dvb/frontends/drx397xD.c +1 -1
@@ -74,7 +74,7 @@ static struct {
  } fw[] = {
  #define _FW_ENTRY(a, b, c)     {                                       \
                        .name   = a,                                    \
-                       .file   = 0,                                    \
+                       .file   = NULL,                                 \
                        .lock   = __RW_LOCK_UNLOCKED(fw[c].lock),       \
                        .refcnt = 0,                                    \
                        .data   = { }           }

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#11 lore raw

PATCH 6/16 MTD: tests: fix sparse warnings: Using plain integer as NULL pointer

In reply to Hannes Eder

Fix this sparse warnings:
drivers/mtd/tests/mtd_oobtest.c:139:33: warning: Using plain integer as NULL pointer drivers/mtd/tests/mtd_oobtest.c:192:33: warning: Using plain integer as NULL pointer drivers/mtd/tests/mtd_oobtest.c:219:41: warning: Using plain integer as NULL pointer drivers/mtd/tests/mtd_oobtest.c:284:25: warning: Using plain integer as NULL pointer drivers/mtd/tests/mtd_oobtest.c:525:25: warning: Using plain integer as NULL pointer drivers/mtd/tests/mtd_oobtest.c:545:25: warning: Using plain integer as NULL pointer drivers/mtd/tests/mtd_oobtest.c:569:33: warning: Using plain integer as NULL pointer drivers/mtd/tests/mtd_oobtest.c:589:33: warning: Using plain integer as NULL pointer drivers/mtd/tests/mtd_oobtest.c:613:33: warning: Using plain integer as NULL pointer drivers/mtd/tests/mtd_oobtest.c:633:33: warning: Using plain integer as NULL pointer drivers/mtd/tests/mtd_oobtest.c:673:41: warning: Using plain integer as NULL pointer drivers/mtd/tests/mtd_oobtest.c:701:33: warning: Using plain integer as NULL pointer drivers/mtd/tests/mtd_readtest.c:74:41: warning: Using plain integer as NULL pointer

---
 drivers/mtd/tests/mtd_oobtest.c  |   24 ++++++++++++------------
 drivers/mtd/tests/mtd_readtest.c |    2 +-
 2 files changed, 13 insertions(+), 13 deletions(-)
drivers/mtd/tests/mtd_oobtest.c +12 -12
index afbc3f8..a18e8d2 100644
@@ -136,7 +136,7 @@ static int write_eraseblock(int ebnum)
 		ops.ooblen    = use_len;
 		ops.oobretlen = 0;
 		ops.ooboffs   = use_offset;
-		ops.datbuf    = 0;
+		ops.datbuf    = NULL;
 		ops.oobbuf    = writebuf;
 		err = mtd->write_oob(mtd, addr, &ops);
 		if (err || ops.oobretlen != use_len) {
@@ -189,7 +189,7 @@ static int verify_eraseblock(int ebnum)
 		ops.ooblen    = use_len;
 		ops.oobretlen = 0;
 		ops.ooboffs   = use_offset;
-		ops.datbuf    = 0;
+		ops.datbuf    = NULL;
 		ops.oobbuf    = readbuf;
 		err = mtd->read_oob(mtd, addr, &ops);
 		if (err || ops.oobretlen != use_len) {
@@ -216,7 +216,7 @@ static int verify_eraseblock(int ebnum)
 			ops.ooblen    = mtd->ecclayout->oobavail;
 			ops.oobretlen = 0;
 			ops.ooboffs   = 0;
-			ops.datbuf    = 0;
+			ops.datbuf    = NULL;
 			ops.oobbuf    = readbuf;
 			err = mtd->read_oob(mtd, addr, &ops);
 			if (err || ops.oobretlen != mtd->ecclayout->oobavail) {
@@ -281,7 +281,7 @@ static int verify_eraseblock_in_one_go(int ebnum)
 	ops.ooblen    = len;
 	ops.oobretlen = 0;
 	ops.ooboffs   = 0;
-	ops.datbuf    = 0;
+	ops.datbuf    = NULL;
 	ops.oobbuf    = readbuf;
 	err = mtd->read_oob(mtd, addr, &ops);
 	if (err || ops.oobretlen != len) {
@@ -522,7 +522,7 @@ static int __init mtd_oobtest_init(void)
 	ops.ooblen    = 1;
 	ops.oobretlen = 0;
 	ops.ooboffs   = mtd->ecclayout->oobavail;
-	ops.datbuf    = 0;
+	ops.datbuf    = NULL;
 	ops.oobbuf    = writebuf;
 	printk(PRINT_PREF "attempting to start write past end of OOB\n");
 	printk(PRINT_PREF "an error is expected...\n");
@@ -542,7 +542,7 @@ static int __init mtd_oobtest_init(void)
 	ops.ooblen    = 1;
 	ops.oobretlen = 0;
 	ops.ooboffs   = mtd->ecclayout->oobavail;
-	ops.datbuf    = 0;
+	ops.datbuf    = NULL;
 	ops.oobbuf    = readbuf;
 	printk(PRINT_PREF "attempting to start read past end of OOB\n");
 	printk(PRINT_PREF "an error is expected...\n");
@@ -566,7 +566,7 @@ static int __init mtd_oobtest_init(void)
 		ops.ooblen    = mtd->ecclayout->oobavail + 1;
 		ops.oobretlen = 0;
 		ops.ooboffs   = 0;
-		ops.datbuf    = 0;
+		ops.datbuf    = NULL;
 		ops.oobbuf    = writebuf;
 		printk(PRINT_PREF "attempting to write past end of device\n");
 		printk(PRINT_PREF "an error is expected...\n");
@@ -586,7 +586,7 @@ static int __init mtd_oobtest_init(void)
 		ops.ooblen    = mtd->ecclayout->oobavail + 1;
 		ops.oobretlen = 0;
 		ops.ooboffs   = 0;
-		ops.datbuf    = 0;
+		ops.datbuf    = NULL;
 		ops.oobbuf    = readbuf;
 		printk(PRINT_PREF "attempting to read past end of device\n");
 		printk(PRINT_PREF "an error is expected...\n");
@@ -610,7 +610,7 @@ static int __init mtd_oobtest_init(void)
 		ops.ooblen    = mtd->ecclayout->oobavail;
 		ops.oobretlen = 0;
 		ops.ooboffs   = 1;
-		ops.datbuf    = 0;
+		ops.datbuf    = NULL;
 		ops.oobbuf    = writebuf;
 		printk(PRINT_PREF "attempting to write past end of device\n");
 		printk(PRINT_PREF "an error is expected...\n");
@@ -630,7 +630,7 @@ static int __init mtd_oobtest_init(void)
 		ops.ooblen    = mtd->ecclayout->oobavail;
 		ops.oobretlen = 0;
 		ops.ooboffs   = 1;
-		ops.datbuf    = 0;
+		ops.datbuf    = NULL;
 		ops.oobbuf    = readbuf;
 		printk(PRINT_PREF "attempting to read past end of device\n");
 		printk(PRINT_PREF "an error is expected...\n");
@@ -670,7 +670,7 @@ static int __init mtd_oobtest_init(void)
 			ops.ooblen    = sz;
 			ops.oobretlen = 0;
 			ops.ooboffs   = 0;
-			ops.datbuf    = 0;
+			ops.datbuf    = NULL;
 			ops.oobbuf    = writebuf;
 			err = mtd->write_oob(mtd, addr, &ops);
 			if (err)
@@ -698,7 +698,7 @@ static int __init mtd_oobtest_init(void)
 		ops.ooblen    = mtd->ecclayout->oobavail * 2;
 		ops.oobretlen = 0;
 		ops.ooboffs   = 0;
-		ops.datbuf    = 0;
+		ops.datbuf    = NULL;
 		ops.oobbuf    = readbuf;
 		err = mtd->read_oob(mtd, addr, &ops);
 		if (err)
drivers/mtd/tests/mtd_readtest.c +1 -1
index 645e77f..79fc453 100644
@@ -71,7 +71,7 @@ static int read_eraseblock_by_page(int ebnum)
 			ops.ooblen    = mtd->oobsize;
 			ops.oobretlen = 0;
 			ops.ooboffs   = 0;
-			ops.datbuf    = 0;
+			ops.datbuf    = NULL;
 			ops.oobbuf    = oobbuf;
 			ret = mtd->read_oob(mtd, addr, &ops);
 			if (ret || ops.oobretlen != mtd->oobsize) {
#12 lore raw

Re: [PATCH 06/16] MTD: tests: fix sparse warnings: Using plain integer as NULL pointer

[Added To]

Quoted 140 lines · Hannes Eder

Fix this sparse warnings:
 drivers/mtd/tests/mtd_oobtest.c:139:33: warning: Using plain integer as NULL pointer drivers/mtd/tests/mtd_oobtest.c:192:33: warning: Using plain integer as NULL pointer drivers/mtd/tests/mtd_oobtest.c:219:41: warning: Using plain integer as NULL pointer drivers/mtd/tests/mtd_oobtest.c:284:25: warning: Using plain integer as NULL pointer drivers/mtd/tests/mtd_oobtest.c:525:25: warning: Using plain integer as NULL pointer drivers/mtd/tests/mtd_oobtest.c:545:25: warning: Using plain integer as NULL pointer drivers/mtd/tests/mtd_oobtest.c:569:33: warning: Using plain integer as NULL pointer drivers/mtd/tests/mtd_oobtest.c:589:33: warning: Using plain integer as NULL pointer drivers/mtd/tests/mtd_oobtest.c:613:33: warning: Using plain integer as NULL pointer drivers/mtd/tests/mtd_oobtest.c:633:33: warning: Using plain integer as NULL pointer drivers/mtd/tests/mtd_oobtest.c:673:41: warning: Using plain integer as NULL pointer drivers/mtd/tests/mtd_oobtest.c:701:33: warning: Using plain integer as NULL pointer drivers/mtd/tests/mtd_readtest.c:74:41: warning: Using plain integer as NULL pointer

---
 drivers/mtd/tests/mtd_oobtest.c  |   24 ++++++++++++------------ drivers/mtd/tests/mtd_readtest.c |    2 +-

 2 files changed, 13 insertions(+), 13 deletions(-)
drivers/mtd/tests/mtd_oobtest.c +12 -12
index afbc3f8..a18e8d2 100644
@@ -136,7 +136,7 @@ static int write_eraseblock(int ebnum)
                ops.ooblen    = use_len;
                ops.oobretlen = 0;
                ops.ooboffs   = use_offset;
-               ops.datbuf    = 0;
+               ops.datbuf    = NULL;
                ops.oobbuf    = writebuf;
                err = mtd->write_oob(mtd, addr, &ops);
                if (err || ops.oobretlen != use_len) {
@@ -189,7 +189,7 @@ static int verify_eraseblock(int ebnum)
                ops.ooblen    = use_len;
                ops.oobretlen = 0;
                ops.ooboffs   = use_offset;
-               ops.datbuf    = 0;
+               ops.datbuf    = NULL;
                ops.oobbuf    = readbuf;
                err = mtd->read_oob(mtd, addr, &ops);
                if (err || ops.oobretlen != use_len) {
@@ -216,7 +216,7 @@ static int verify_eraseblock(int ebnum)
                        ops.ooblen    = mtd->ecclayout->oobavail;
                        ops.oobretlen = 0;
                        ops.ooboffs   = 0;
-                       ops.datbuf    = 0;
+                       ops.datbuf    = NULL;
                        ops.oobbuf    = readbuf;
                        err = mtd->read_oob(mtd, addr, &ops);
                        if (err || ops.oobretlen != mtd->ecclayout->oobavail) {
@@ -281,7 +281,7 @@ static int verify_eraseblock_in_one_go(int ebnum)
        ops.ooblen    = len;
        ops.oobretlen = 0;
        ops.ooboffs   = 0;
-       ops.datbuf    = 0;
+       ops.datbuf    = NULL;
        ops.oobbuf    = readbuf;
        err = mtd->read_oob(mtd, addr, &ops);
        if (err || ops.oobretlen != len) {
@@ -522,7 +522,7 @@ static int __init mtd_oobtest_init(void)
        ops.ooblen    = 1;
        ops.oobretlen = 0;
        ops.ooboffs   = mtd->ecclayout->oobavail;
-       ops.datbuf    = 0;
+       ops.datbuf    = NULL;
        ops.oobbuf    = writebuf;
        printk(PRINT_PREF "attempting to start write past end of OOB\n");
        printk(PRINT_PREF "an error is expected...\n");
@@ -542,7 +542,7 @@ static int __init mtd_oobtest_init(void)
        ops.ooblen    = 1;
        ops.oobretlen = 0;
        ops.ooboffs   = mtd->ecclayout->oobavail;
-       ops.datbuf    = 0;
+       ops.datbuf    = NULL;
        ops.oobbuf    = readbuf;
        printk(PRINT_PREF "attempting to start read past end of OOB\n");
        printk(PRINT_PREF "an error is expected...\n");
@@ -566,7 +566,7 @@ static int __init mtd_oobtest_init(void)
                ops.ooblen    = mtd->ecclayout->oobavail + 1;
                ops.oobretlen = 0;
                ops.ooboffs   = 0;
-               ops.datbuf    = 0;
+               ops.datbuf    = NULL;
                ops.oobbuf    = writebuf;
                printk(PRINT_PREF "attempting to write past end of device\n");
                printk(PRINT_PREF "an error is expected...\n");
@@ -586,7 +586,7 @@ static int __init mtd_oobtest_init(void)
                ops.ooblen    = mtd->ecclayout->oobavail + 1;
                ops.oobretlen = 0;
                ops.ooboffs   = 0;
-               ops.datbuf    = 0;
+               ops.datbuf    = NULL;
                ops.oobbuf    = readbuf;
                printk(PRINT_PREF "attempting to read past end of device\n");
                printk(PRINT_PREF "an error is expected...\n");
@@ -610,7 +610,7 @@ static int __init mtd_oobtest_init(void)
                ops.ooblen    = mtd->ecclayout->oobavail;
                ops.oobretlen = 0;
                ops.ooboffs   = 1;
-               ops.datbuf    = 0;
+               ops.datbuf    = NULL;
                ops.oobbuf    = writebuf;
                printk(PRINT_PREF "attempting to write past end of device\n");
                printk(PRINT_PREF "an error is expected...\n");
@@ -630,7 +630,7 @@ static int __init mtd_oobtest_init(void)
                ops.ooblen    = mtd->ecclayout->oobavail;
                ops.oobretlen = 0;
                ops.ooboffs   = 1;
-               ops.datbuf    = 0;
+               ops.datbuf    = NULL;
                ops.oobbuf    = readbuf;
                printk(PRINT_PREF "attempting to read past end of device\n");
                printk(PRINT_PREF "an error is expected...\n");
@@ -670,7 +670,7 @@ static int __init mtd_oobtest_init(void)
                        ops.ooblen    = sz;
                        ops.oobretlen = 0;
                        ops.ooboffs   = 0;
-                       ops.datbuf    = 0;
+                       ops.datbuf    = NULL;
                        ops.oobbuf    = writebuf;
                        err = mtd->write_oob(mtd, addr, &ops);
                        if (err)
@@ -698,7 +698,7 @@ static int __init mtd_oobtest_init(void)
                ops.ooblen    = mtd->ecclayout->oobavail * 2;
                ops.oobretlen = 0;
                ops.ooboffs   = 0;
-               ops.datbuf    = 0;
+               ops.datbuf    = NULL;
                ops.oobbuf    = readbuf;
                err = mtd->read_oob(mtd, addr, &ops);
                if (err)
drivers/mtd/tests/mtd_readtest.c +0 -0
index 645e77f..79fc453 100644

drivers/mtd/tests/mtd_readtest.c static int read_eraseblock_by_page(int ebnum) · line 77

Quoted 8 lines
drivers/mtd/tests/mtd_readtest.c +1 -1
@@ -71,7 +71,7 @@ static int read_eraseblock_by_page(int ebnum)
                        ops.ooblen    = mtd->oobsize;
                        ops.oobretlen = 0;
                        ops.ooboffs   = 0;
-                       ops.datbuf    = 0;
+                       ops.datbuf    = NULL;
                        ops.oobbuf    = oobbuf;
                        ret = mtd->read_oob(mtd, addr, &ops);
                        if (ret || ops.oobretlen != mtd->oobsize) {

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#13 lore raw

Re: [PATCH 06/16] MTD: tests: fix sparse warnings: Using plain integer as NULL pointer

Quoted 19 lines · Hannes Eder

[Added To]

Quoted 16 lines · Hannes Eder

Fix this sparse warnings:
drivers/mtd/tests/mtd_oobtest.c:139:33: warning: Using plain integer as NULL pointer drivers/mtd/tests/mtd_oobtest.c:192:33: warning: Using plain integer as NULL pointer drivers/mtd/tests/mtd_oobtest.c:219:41: warning: Using plain integer as NULL pointer drivers/mtd/tests/mtd_oobtest.c:284:25: warning: Using plain integer as NULL pointer drivers/mtd/tests/mtd_oobtest.c:525:25: warning: Using plain integer as NULL pointer drivers/mtd/tests/mtd_oobtest.c:545:25: warning: Using plain integer as NULL pointer drivers/mtd/tests/mtd_oobtest.c:569:33: warning: Using plain integer as NULL pointer drivers/mtd/tests/mtd_oobtest.c:589:33: warning: Using plain integer as NULL pointer drivers/mtd/tests/mtd_oobtest.c:613:33: warning: Using plain integer as NULL pointer drivers/mtd/tests/mtd_oobtest.c:633:33: warning: Using plain integer as NULL pointer drivers/mtd/tests/mtd_oobtest.c:673:41: warning: Using plain integer as NULL pointer drivers/mtd/tests/mtd_oobtest.c:701:33: warning: Using plain integer as NULL pointer drivers/mtd/tests/mtd_readtest.c:74:41: warning: Using plain integer as NULL pointer

Signature · 2 lines
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
#14 lore raw

PATCH 7/16 panasonic-laptop: fix sparse warning: Using plain integer as NULL pointer

In reply to Hannes Eder

Fix this sparse warning:
drivers/platform/x86/panasonic-laptop.c:273:70: warning: Using plain integer as NULL pointer

---
 drivers/platform/x86/panasonic-laptop.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/platform/x86/panasonic-laptop.c +1 -1
index c47a44d..e178cde 100644
@@ -270,7 +270,7 @@ static int acpi_pcc_retrieve_biosdata(struct pcc_acpi *pcc, u32 *sinf)
 	union acpi_object *hkey = NULL;
 	int i;
 
-	status = acpi_evaluate_object(pcc->handle, METHOD_HKEY_SINF, 0,
+	status = acpi_evaluate_object(pcc->handle, METHOD_HKEY_SINF, NULL,
 				      &buffer);
 	if (ACPI_FAILURE(status)) {
 		ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
#15 lore raw

Re: [PATCH 07/16] panasonic-laptop: fix sparse warning: Using plain integer as NULL pointer

[Added To]

Quoted 15 lines · Hannes Eder

Fix this sparse warning:
 drivers/platform/x86/panasonic-laptop.c:273:70: warning: Using plain integer as NULL pointer

---
 drivers/platform/x86/panasonic-laptop.c |    2 +-

 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/platform/x86/panasonic-laptop.c +0 -0
index c47a44d..e178cde 100644

drivers/platform/x86/panasonic-laptop.c static int acpi_pcc_retrieve_biosdata(struct pcc_acpi *pcc, u32 *sinf) · line 276

Quoted 8 lines
drivers/platform/x86/panasonic-laptop.c +1 -1
@@ -270,7 +270,7 @@ static int acpi_pcc_retrieve_biosdata(struct pcc_acpi *pcc, u32 *sinf)
        union acpi_object *hkey = NULL;
        int i;
 
-       status = acpi_evaluate_object(pcc->handle, METHOD_HKEY_SINF, 0,
+       status = acpi_evaluate_object(pcc->handle, METHOD_HKEY_SINF, NULL,
                                      &buffer);
        if (ACPI_FAILURE(status)) {
                ACPI_DEBUG_PRINT((ACPI_DB_ERROR,

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#16 lore raw

PATCH 8/16 FlashPoint: fix sparse warnings: Using plain integer as NULL pointer

In reply to Hannes Eder

Fix this sparse warnings:
drivers/scsi/FlashPoint.c:906:9: warning: Using plain integer as NULL pointer drivers/scsi/FlashPoint.c:907:53: warning: Using plain integer as NULL pointer drivers/scsi/FlashPoint.c:922:1: warning: Using plain integer as NULL pointer

---
 drivers/scsi/FlashPoint.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
drivers/scsi/FlashPoint.c +3 -3
index cb601cf..9b2ea80 100644
@@ -903,8 +903,8 @@ static void FPT_autoCmdCmplt(unsigned long p_port, unsigned char p_card);
 static void FPT_autoLoadDefaultMap(unsigned long p_port);
 
 static struct sccb_mgr_tar_info FPT_sccbMgrTbl[MAX_CARDS][MAX_SCSI_TAR] -    { {{0}} };
-static struct sccb_card FPT_BL_Card[MAX_CARDS] = { {0} };
+    { {{NULL}} };
+static struct sccb_card FPT_BL_Card[MAX_CARDS] = { {NULL} };
 static SCCBSCAM_INFO FPT_scamInfo[MAX_SCSI_TAR] = { {{0}} };
 static struct nvram_info FPT_nvRamInfo[MAX_MB_CARDS] = { {0} };
 
@@ -918,8 +918,7 @@ static unsigned char FPT_scamHAString[]  
 static unsigned short FPT_default_intena = 0;
 
-static void (*FPT_s_PhaseTbl[8]) (unsigned long, unsigned char) = {
-0};
+static void (*FPT_s_PhaseTbl[8]) (unsigned long, unsigned char) = {NULL};
 
 /*---------------------------------------------------------------------
  *
 
#17 lore raw

PATCH v2 8/16 FlashPoint: fix sparse warnings: Using plain integer as NULL pointer

Fix this sparse warnings:
drivers/scsi/FlashPoint.c:906:9: warning: Using plain integer as NULL pointer drivers/scsi/FlashPoint.c:907:53: warning: Using plain integer as NULL pointer drivers/scsi/FlashPoint.c:922:1: warning: Using plain integer as NULL pointer

---
v2: fix checkpatch.pl issue.

 drivers/scsi/FlashPoint.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
drivers/scsi/FlashPoint.c +3 -3
index cb601cf..61e268e 100644
@@ -903,8 +903,8 @@ static void FPT_autoCmdCmplt(unsigned long p_port, unsigned char p_card);
 static void FPT_autoLoadDefaultMap(unsigned long p_port);
 
 static struct sccb_mgr_tar_info FPT_sccbMgrTbl[MAX_CARDS][MAX_SCSI_TAR] -    { {{0}} };
-static struct sccb_card FPT_BL_Card[MAX_CARDS] = { {0} };
+    { { {NULL} } };
+static struct sccb_card FPT_BL_Card[MAX_CARDS] = { {NULL} };
 static SCCBSCAM_INFO FPT_scamInfo[MAX_SCSI_TAR] = { {{0}} };
 static struct nvram_info FPT_nvRamInfo[MAX_MB_CARDS] = { {0} };
 
@@ -918,8 +918,7 @@ static unsigned char FPT_scamHAString[]  
 static unsigned short FPT_default_intena = 0;
 
-static void (*FPT_s_PhaseTbl[8]) (unsigned long, unsigned char) = {
-0};
+static void (*FPT_s_PhaseTbl[8]) (unsigned long, unsigned char) = {NULL};
 
 /*---------------------------------------------------------------------
  *
 
#18 lore raw

PATCH 9/16 usb host: fix sparse warning: Using plain integer as NULL pointer

In reply to Hannes Eder

Fix this sparse warning:
drivers/usb/host/oxu210hp-hcd.c:2687:42: warning: Using plain integer as NULL pointer

---
 drivers/usb/host/oxu210hp-hcd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/usb/host/oxu210hp-hcd.c +1 -1
index 2947c69..5ac489e 100644
@@ -2684,7 +2684,7 @@ static int oxu_reset(struct usb_hcd *hcd)
 	oxu->urb_len = 0;
 
 	/* FIMXE */
-	hcd->self.controller->dma_mask = 0UL;
+	hcd->self.controller->dma_mask = NULL;
 
 	if (oxu->is_otg) {
 		oxu->caps = hcd->regs + OXU_OTG_CAP_OFFSET;
#19 lore raw

Re: [PATCH 09/16] usb host: fix sparse warning: Using plain integer as NULL pointer

[Added To]

Quoted 15 lines · Hannes Eder

Fix this sparse warning:
 drivers/usb/host/oxu210hp-hcd.c:2687:42: warning: Using plain integer as NULL pointer

---
 drivers/usb/host/oxu210hp-hcd.c |    2 +-

 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/usb/host/oxu210hp-hcd.c +0 -0
index 2947c69..5ac489e 100644

drivers/usb/host/oxu210hp-hcd.c static int oxu_reset(struct usb_hcd *hcd) · line 2690

Quoted 8 lines
drivers/usb/host/oxu210hp-hcd.c +1 -1
@@ -2684,7 +2684,7 @@ static int oxu_reset(struct usb_hcd *hcd)
        oxu->urb_len = 0;
 
        /* FIMXE */
-       hcd->self.controller->dma_mask = 0UL;
+       hcd->self.controller->dma_mask = NULL;
 
        if (oxu->is_otg) {
                oxu->caps = hcd->regs + OXU_OTG_CAP_OFFSET;

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#20 lore raw

PATCH 10/16 viafb: fix sparse warning: Using plain integer as NULL pointer

In reply to Hannes Eder

Fix this sparse warning:
drivers/video/via/hw.c:2020:46: warning: Using plain integer as NULL pointer

---
 drivers/video/via/hw.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/video/via/hw.c +1 -1
index fcd53ce..70d6b6c 100644
@@ -2017,7 +2017,7 @@ static void init_gfx_chip_info(void)
 	/* Indentify GFX Chip Name */
 	for (i = 0; pciidlist[i].vendor != 0; i++) {
 		pdev = pci_get_device(pciidlist[i].vendor,
-			pciidlist[i].device, 0);
+			pciidlist[i].device, NULL);
 		if (pdev)
 			break;
 	}
#21 lore raw

Re: [PATCH 10/16] viafb: fix sparse warning: Using plain integer as NULL pointer

[Added To, Cc]

Quoted 15 lines · Hannes Eder

Fix this sparse warning:
 drivers/video/via/hw.c:2020:46: warning: Using plain integer as NULL pointer

---
 drivers/video/via/hw.c |    2 +-

 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/video/via/hw.c +0 -0
index fcd53ce..70d6b6c 100644

drivers/video/via/hw.c static void init_gfx_chip_info(void) · line 2023

Quoted 8 lines
drivers/video/via/hw.c +1 -1
@@ -2017,7 +2017,7 @@ static void init_gfx_chip_info(void)
        /* Indentify GFX Chip Name */
        for (i = 0; pciidlist[i].vendor != 0; i++) {
                pdev = pci_get_device(pciidlist[i].vendor,
-                       pciidlist[i].device, 0);
+                       pciidlist[i].device, NULL);
                if (pdev)
                        break;
        }

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#22 lore raw

PATCH 11/16 fs/super.c: fix sparse warning: Using plain integer as NULL pointer

In reply to Hannes Eder

Fix this sparse warning:
fs/super.c:849:26: warning: Using plain integer as NULL pointer

---
 fs/super.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/super.c +1 -1
index c38eef4..c6ad02d 100644
@@ -846,7 +846,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);
#23 lore raw

Re: [PATCH 11/16] fs/super.c: fix sparse warning: Using plain integer as NULL pointer

[Added To]

Quoted 15 lines · Hannes Eder

Fix this sparse warning:
 fs/super.c:849:26: warning: Using plain integer as NULL pointer

---
 fs/super.c |    2 +-

 1 files changed, 1 insertions(+), 1 deletions(-)
fs/super.c +0 -0
index c38eef4..c6ad02d 100644

fs/super.c void kill_block_super(struct super_block *sb) · line 852

Quoted 8 lines
fs/super.c +1 -1
@@ -846,7 +846,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);

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

maintainer
#24 lore raw

Re: [PATCH 11/16] fs/super.c: fix sparse warning: Using plain integer as NULL pointer

Quoted 5 lines · Hannes Eder

[Added To]

Quoted 2 lines · Hannes Eder

Fix this sparse warning:
?fs/super.c:849:26: warning: Using plain integer as NULL pointer

May I suggest a better subject for those? Namely,

Subject: NULL noise: <filename or glob>

Nobody _cares_ which tool generates that and boilerplates in subjects should be as short as possible.

#25 lore raw

PATCH v2 11/16 NULL noise: drivers/ide/ide-*.c

Fix this sparse warnings:
drivers/ide/ide-disk_proc.c:130:11: warning: Using plain integer as NULL pointer drivers/ide/ide-floppy_proc.c:32:11: warning: Using plain integer as NULL pointer drivers/ide/ide-proc.c:234:11: warning: Using plain integer as NULL pointer drivers/ide/ide-tape.c:2141:11: warning: Using plain integer as NULL pointer

---
v2: other subject, as suggested by Al Viro

 drivers/ide/ide-disk_proc.c   |    2 +-
 drivers/ide/ide-floppy_proc.c |    2 +-
 drivers/ide/ide-proc.c        |    2 +-
 drivers/ide/ide-tape.c        |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
drivers/ide/ide-disk_proc.c +1 -1
index 3f2a078..eaea3be 100644
@@ -127,5 +127,5 @@ const struct ide_proc_devset ide_disk_settings[] = {
 	IDE_PROC_DEVSET(multcount,	0,    16),
 	IDE_PROC_DEVSET(nowerr,		0,     1),
 	IDE_PROC_DEVSET(wcache,		0,     1),
-	{ 0 },
+	{ NULL },
 };
drivers/ide/ide-floppy_proc.c +1 -1
index 3ec762c..fcd4d81 100644
@@ -29,5 +29,5 @@ const struct ide_proc_devset ide_floppy_settings[] = {
 	IDE_PROC_DEVSET(bios_head, 0,  255),
 	IDE_PROC_DEVSET(bios_sect, 0,   63),
 	IDE_PROC_DEVSET(ticks,	   0,  255),
-	{ 0 },
+	{ NULL },
 };
drivers/ide/ide-proc.c +1 -1
index 0ee8887..10a88bf 100644
@@ -231,7 +231,7 @@ static const struct ide_proc_devset ide_generic_settings[] = {
 	IDE_PROC_DEVSET(pio_mode, 0, 255),
 	IDE_PROC_DEVSET(unmaskirq, 0, 1),
 	IDE_PROC_DEVSET(using_dma, 0, 1),
-	{ 0 },
+	{ NULL },
 };
 
 static void proc_ide_settings_warn(void)
drivers/ide/ide-tape.c +1 -1
index 733cb51..cafc67d 100644
@@ -2142,7 +2142,7 @@ static const struct ide_proc_devset idetape_settings[] = {
 	__IDE_PROC_DEVSET(speed,	0, 0xffff, NULL, NULL),
 	__IDE_PROC_DEVSET(tdsc,		IDETAPE_DSC_RW_MIN, IDETAPE_DSC_RW_MAX,
 					mulf_tdsc, divf_tdsc),
-	{ 0 },
+	{ NULL },
 };
 #endif
 
#26 lore raw

PATCH v3 4/16 NULL noise: drivers/ide/ide-*.c

Fix this sparse warnings:
drivers/ide/ide-disk_proc.c:130:11: warning: Using plain integer as NULL pointer drivers/ide/ide-floppy_proc.c:32:11: warning: Using plain integer as NULL pointer drivers/ide/ide-proc.c:234:11: warning: Using plain integer as NULL pointer drivers/ide/ide-tape.c:2141:11: warning: Using plain integer as NULL pointer

---
v2: other subject, as suggested by Al Viro
v3: ups. ... send it to the right recipient, fix patch number

---
 drivers/ide/ide-disk_proc.c   |    2 +-
 drivers/ide/ide-floppy_proc.c |    2 +-
 drivers/ide/ide-proc.c        |    2 +-
 drivers/ide/ide-tape.c        |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
drivers/ide/ide-disk_proc.c +1 -1
index 3f2a078..eaea3be 100644
@@ -127,5 +127,5 @@ const struct ide_proc_devset ide_disk_settings[] = {
 	IDE_PROC_DEVSET(multcount,	0,    16),
 	IDE_PROC_DEVSET(nowerr,		0,     1),
 	IDE_PROC_DEVSET(wcache,		0,     1),
-	{ 0 },
+	{ NULL },
 };
drivers/ide/ide-floppy_proc.c +1 -1
index 3ec762c..fcd4d81 100644
@@ -29,5 +29,5 @@ const struct ide_proc_devset ide_floppy_settings[] = {
 	IDE_PROC_DEVSET(bios_head, 0,  255),
 	IDE_PROC_DEVSET(bios_sect, 0,   63),
 	IDE_PROC_DEVSET(ticks,	   0,  255),
-	{ 0 },
+	{ NULL },
 };
drivers/ide/ide-proc.c +1 -1
index 0ee8887..10a88bf 100644
@@ -231,7 +231,7 @@ static const struct ide_proc_devset ide_generic_settings[] = {
 	IDE_PROC_DEVSET(pio_mode, 0, 255),
 	IDE_PROC_DEVSET(unmaskirq, 0, 1),
 	IDE_PROC_DEVSET(using_dma, 0, 1),
-	{ 0 },
+	{ NULL },
 };
 
 static void proc_ide_settings_warn(void)
drivers/ide/ide-tape.c +1 -1
index 733cb51..cafc67d 100644
@@ -2142,7 +2142,7 @@ static const struct ide_proc_devset idetape_settings[] = {
 	__IDE_PROC_DEVSET(speed,	0, 0xffff, NULL, NULL),
 	__IDE_PROC_DEVSET(tdsc,		IDETAPE_DSC_RW_MIN, IDETAPE_DSC_RW_MAX,
 					mulf_tdsc, divf_tdsc),
-	{ 0 },
+	{ NULL },
 };
 #endif
 
#27 lore raw

Re: [PATCH 04/16 v3] NULL noise: drivers/ide/ide-*.c

Quoted 7 lines · Hannes Eder

Fix this sparse warnings:
drivers/ide/ide-disk_proc.c:130:11: warning: Using plain integer as NULL pointer drivers/ide/ide-floppy_proc.c:32:11: warning: Using plain integer as NULL pointer drivers/ide/ide-proc.c:234:11: warning: Using plain integer as NULL pointer drivers/ide/ide-tape.c:2141:11: warning: Using plain integer as NULL pointer

applied

#28 lore raw

PATCH 12/16 reiserfs: fix sparse warning: Using plain integer as NULL pointer

In reply to Hannes Eder

Fix this sparse warning:
fs/reiserfs/inode.c:2555:19: warning: Using plain integer as NULL pointer

---
 fs/reiserfs/inode.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/reiserfs/inode.c +1 -1
index 823227a..e69d63a 100644
@@ -2552,7 +2552,7 @@ static int reiserfs_write_begin(struct file *file,
 	int old_ref = 0;
 
  	inode = mapping->host;
-	*fsdata = 0;
+	*fsdata = NULL;
  	if (flags & AOP_FLAG_CONT_EXPAND &&
  	    (pos & (inode->i_sb->s_blocksize - 1)) = 0) {
  		pos ++;
#29 lore raw

Re: [PATCH 12/16] reiserfs: fix sparse warning: Using plain integer as NULL pointer

[Added To, Cc]

Quoted 18 lines · Hannes Eder

Fix this sparse warning:
 fs/reiserfs/inode.c:2555:19: warning: Using plain integer as NULL pointer

---
 fs/reiserfs/inode.c |    2 +-

 1 files changed, 1 insertions(+), 1 deletions(-)
fs/reiserfs/inode.c +1 -1
index 823227a..e69d63a 100644
@@ -2552,7 +2552,7 @@ static int reiserfs_write_begin(struct file *file,
        int old_ref = 0;
 
        inode = mapping->host;
-       *fsdata = 0;
+       *fsdata = NULL;
Quoted 5 lines

       if (flags & AOP_FLAG_CONT_EXPAND &&
           (pos & (inode->i_sb->s_blocksize - 1)) = 0) { pos ++;

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#30 lore raw

PATCH 13/16 kprobes: fix sparse warnings: Using plain integer as NULL pointer

In reply to Hannes Eder

Fix this sparse warnings:
kernel/test_kprobes.c:118:19: warning: Using plain integer as NULL pointer kernel/test_kprobes.c:213:22: warning: Using plain integer as NULL pointer kernel/test_kprobes.c:326:22: warning: Using plain integer as NULL pointer

---
 kernel/test_kprobes.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
kernel/test_kprobes.c +3 -3
index 4f10451..9a43351 100644
@@ -115,7 +115,7 @@ static int test_kprobes(void)
 	int ret;
 	struct kprobe *kps[2] = {&kp, &kp2};
 
-	kp.addr = 0; /* addr should be cleard for reusing kprobe. */
+	kp.addr = NULL; /* addr should be cleard for reusing kprobe. */
 	ret = register_kprobes(kps, 2);
 	if (ret < 0) {
 		printk(KERN_ERR "Kprobe smoke test failed: "
@@ -210,7 +210,7 @@ static int test_jprobes(void)
 	int ret;
 	struct jprobe *jps[2] = {&jp, &jp2};
 
-	jp.kp.addr = 0; /* addr should be cleard for reusing kprobe. */
+	jp.kp.addr = NULL; /* addr should be cleard for reusing kprobe. */
 	ret = register_jprobes(jps, 2);
 	if (ret < 0) {
 		printk(KERN_ERR "Kprobe smoke test failed: "
@@ -323,7 +323,7 @@ static int test_kretprobes(void)
 	int ret;
 	struct kretprobe *rps[2] = {&rp, &rp2};
 
-	rp.kp.addr = 0; /* addr should be cleard for reusing kprobe. */
+	rp.kp.addr = NULL; /* addr should be cleard for reusing kprobe. */
 	ret = register_kretprobes(rps, 2);
 	if (ret < 0) {
 		printk(KERN_ERR "Kprobe smoke test failed: "
#31 lore raw

Re: [PATCH 13/16] kprobes: fix sparse warnings: Using plain integer as NULL pointer

[Added To]

Quoted 40 lines · Hannes Eder

Fix this sparse warnings:
 kernel/test_kprobes.c:118:19: warning: Using plain integer as NULL pointer kernel/test_kprobes.c:213:22: warning: Using plain integer as NULL pointer kernel/test_kprobes.c:326:22: warning: Using plain integer as NULL pointer

---
 kernel/test_kprobes.c |    6 +++---

 1 files changed, 3 insertions(+), 3 deletions(-)
kernel/test_kprobes.c +1 -1
index 4f10451..9a43351 100644
@@ -115,7 +115,7 @@ static int test_kprobes(void)
        int ret;
        struct kprobe *kps[2] = {&kp, &kp2};
 
-       kp.addr = 0; /* addr should be cleard for reusing kprobe. */
+       kp.addr = NULL; /* addr should be cleard for reusing kprobe. */
        ret = register_kprobes(kps, 2);
        if (ret < 0) {

               printk(KERN_ERR "Kprobe smoke test failed: "

kernel/test_kprobes.c +1 -1
@@ -210,7 +210,7 @@ static int test_jprobes(void)
        int ret;
        struct jprobe *jps[2] = {&jp, &jp2};
 
-       jp.kp.addr = 0; /* addr should be cleard for reusing kprobe. */
+       jp.kp.addr = NULL; /* addr should be cleard for reusing kprobe. */
        ret = register_jprobes(jps, 2);
        if (ret < 0) {

               printk(KERN_ERR "Kprobe smoke test failed: "

kernel/test_kprobes.c +1 -1
@@ -323,7 +323,7 @@ static int test_kretprobes(void)
        int ret;
        struct kretprobe *rps[2] = {&rp, &rp2};
 
-       rp.kp.addr = 0; /* addr should be cleard for reusing kprobe. */
+       rp.kp.addr = NULL; /* addr should be cleard for reusing kprobe. */
        ret = register_kretprobes(rps, 2);
        if (ret < 0) {
Quoted 3 lines

               printk(KERN_ERR "Kprobe smoke test failed: "

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#32 lore raw

PATCH 14/16 memcg: fix sparse warning: Using plain integer as NULL pointer

In reply to Hannes Eder

Fix this sparse warning:
mm/memcontrol.c:1637:32: warning: Using plain integer as NULL pointer

---
 mm/memcontrol.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
mm/memcontrol.c +1 -1
index 8e4be9c..09d6650 100644
@@ -1634,7 +1634,7 @@ static int mem_cgroup_force_empty_list(struct mem_cgroup *mem,
 		pc = list_entry(list->prev, struct page_cgroup, lru);
 		if (busy = pc) {
 			list_move(&pc->lru, list);
-			busy = 0;
+			busy = NULL;
 			spin_unlock_irqrestore(&zone->lru_lock, flags);
 			continue;
 		}
#33 lore raw

Re: [PATCH 14/16] memcg: fix sparse warning: Using plain integer as NULL pointer

[Added To]

Quoted 15 lines · Hannes Eder

Fix this sparse warning:
 mm/memcontrol.c:1637:32: warning: Using plain integer as NULL pointer

---
 mm/memcontrol.c |    2 +-

 1 files changed, 1 insertions(+), 1 deletions(-)
mm/memcontrol.c +0 -0
index 8e4be9c..09d6650 100644

mm/memcontrol.c static int mem_cgroup_force_empty_list(struct mem_cgroup *mem, · line 1640

Quoted 8 lines
mm/memcontrol.c +1 -1
@@ -1634,7 +1634,7 @@ static int mem_cgroup_force_empty_list(struct mem_cgroup *mem,
                pc = list_entry(list->prev, struct page_cgroup, lru);
                if (busy = pc) {
                        list_move(&pc->lru, list);
-                       busy = 0;
+                       busy = NULL;
                        spin_unlock_irqrestore(&zone->lru_lock, flags);
                        continue;
                }

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#34 lore raw

Re: [PATCH 14/16] memcg: fix sparse warning: Using plain integer as NULL pointer

Quoted 2 lines · On Fri, 27 Feb 2009 02:15:46 +0100 Hannes Eder <[email protected]> wrote:

[Added To]

Thanks,

Quoted 30 lines · Hannes Eder
Quoted 15 lines

Fix this sparse warning:
 mm/memcontrol.c:1637:32: warning: Using plain integer as NULL pointer

---
 mm/memcontrol.c |    2 +-

 1 files changed, 1 insertions(+), 1 deletions(-)
mm/memcontrol.c +0 -0
index 8e4be9c..09d6650 100644

mm/memcontrol.c static int mem_cgroup_force_empty_list(struct mem_cgroup *mem, · line 1640

Quoted 8 lines
mm/memcontrol.c +1 -1
@@ -1634,7 +1634,7 @@ static int mem_cgroup_force_empty_list(struct mem_cgroup *mem,
                pc = list_entry(list->prev, struct page_cgroup, lru);
                if (busy = pc) {
                        list_move(&pc->lru, list);
-                       busy = 0;
+                       busy = NULL;
                        spin_unlock_irqrestore(&zone->lru_lock, flags);
                        continue;
                }

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

#35 lore raw

PATCH 15/16 ipv6: fix sparse warning: Using plain integer as NULL pointer

In reply to Hannes Eder

Fix this sparse warning:
net/ipv6/xfrm6_state.c:72:26: warning: Using plain integer as NULL pointer

---
 net/ipv6/xfrm6_state.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/ipv6/xfrm6_state.c +1 -1
index 0e685b0..f417b77 100644
@@ -69,7 +69,7 @@ __xfrm6_sort(void **dst, void **src, int n, int (*cmp)(void *p), int maxclass)
 
 	for (i = 0; i < n; i++) {
 		dst[count[class[i] - 1]++] = src[i];
-		src[i] = 0;
+		src[i] = NULL;
 	}
 
 	return 0;
maintainer Applied
#36 lore raw

Re: [PATCH 15/16] ipv6: fix sparse warning: Using plain integer as NULL pointer

From: Hannes Eder <[email protected]>
Date: Sun, 22 Feb 2009 01:05:44 +0100

Quoted 4 lines

Fix this sparse warning:
net/ipv6/xfrm6_state.c:72:26: warning: Using plain integer as NULL pointer

Applied, thanks.

#37 lore raw

PATCH 16/16 ALSA: msnd: fix sparse warning: Using plain integer as NULL pointer

In reply to Hannes Eder

Fix this sparse warning:
sound/isa/msnd/msnd_pinnacle.c:808:1: warning: Using plain integer as NULL pointer

---
 sound/isa/msnd/msnd_pinnacle.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
sound/isa/msnd/msnd_pinnacle.c +1 -1
index 60b6abd..add6c0a 100644
@@ -805,7 +805,7 @@ module_param(calibrate_signal, int, S_IRUGO);
 #ifndef MSND_CLASSIC
 module_param_array(digital, int, NULL, S_IRUGO);
 module_param_array(cfg, long, NULL, S_IRUGO);
-module_param_array(reset, int, 0, S_IRUGO);
+module_param_array(reset, int, NULL, S_IRUGO);
 module_param_array(mpu_io, long, NULL, S_IRUGO);
 module_param_array(mpu_irq, int, NULL, S_IRUGO);
 module_param_array(ide_io0, long, NULL, S_IRUGO);