+ drivers-media-use-null-instead-of-0-for-ptrs.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     drivers/media: use NULL instead of 0 for ptrs

has been added to the -mm tree.  Its filename is

     drivers-media-use-null-instead-of-0-for-ptrs.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: drivers/media: use NULL instead of 0 for ptrs
From: Randy Dunlap <rdunlap@xxxxxxxxxxxx>

Use NULL instead of 0 for pointer value, eliminate sparse warnings.

Signed-off-by: Randy Dunlap <rdunlap@xxxxxxxxxxxx>
Cc: Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/media/dvb/dvb-usb/gp8psk.c                   |    2 +-
 drivers/media/video/cx88/cx88-blackbird.c            |    2 +-
 drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c |    4 +++-
 3 files changed, 5 insertions(+), 3 deletions(-)

diff -puN drivers/media/dvb/dvb-usb/gp8psk.c~drivers-media-use-null-instead-of-0-for-ptrs drivers/media/dvb/dvb-usb/gp8psk.c
--- a/drivers/media/dvb/dvb-usb/gp8psk.c~drivers-media-use-null-instead-of-0-for-ptrs
+++ a/drivers/media/dvb/dvb-usb/gp8psk.c
@@ -217,7 +217,7 @@ static struct dvb_usb_properties gp8psk_
 		  .cold_ids = { &gp8psk_usb_table[0], NULL },
 		  .warm_ids = { &gp8psk_usb_table[1], NULL },
 		},
-		{ 0 },
+		{ NULL },
 	}
 };
 
diff -puN drivers/media/video/cx88/cx88-blackbird.c~drivers-media-use-null-instead-of-0-for-ptrs drivers/media/video/cx88/cx88-blackbird.c
--- a/drivers/media/video/cx88/cx88-blackbird.c~drivers-media-use-null-instead-of-0-for-ptrs
+++ a/drivers/media/video/cx88/cx88-blackbird.c
@@ -896,7 +896,7 @@ static int mpeg_do_ioctl(struct inode *i
 		snprintf(name, sizeof(name), "%s/2", core->name);
 		printk("%s/2: ============  START LOG STATUS  ============\n",
 		       core->name);
-		cx88_call_i2c_clients(core, VIDIOC_LOG_STATUS, 0);
+		cx88_call_i2c_clients(core, VIDIOC_LOG_STATUS, NULL);
 		cx2341x_log_status(&dev->params, name);
 		printk("%s/2: =============  END LOG STATUS  =============\n",
 		       core->name);
diff -puN drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c~drivers-media-use-null-instead-of-0-for-ptrs drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c
--- a/drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c~drivers-media-use-null-instead-of-0-for-ptrs
+++ a/drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c
@@ -19,6 +19,7 @@
  *
  */
 
+#include <linux/kernel.h>
 #include "pvrusb2-i2c-core.h"
 #include "pvrusb2-hdw-internal.h"
 #include "pvrusb2-debug.h"
@@ -89,7 +90,8 @@ void pvr2_i2c_probe(struct pvr2_hdw *hdw
 
 const struct pvr2_i2c_op *pvr2_i2c_get_op(unsigned int idx)
 {
-	if (idx >= sizeof(ops)/sizeof(ops[0])) return 0;
+	if (idx >= ARRAY_SIZE(ops))
+		return NULL;
 	return ops[idx];
 }
 
_

Patches currently in -mm which might be from rdunlap@xxxxxxxxxxxx are

origin.patch
add-kerneldocs-for-some-functions-in-mm-memoryc.patch
ext3-add-more-comments-in-block-allocation-reservation-code.patch
acpi-fix-printk-format-warnings.patch
acpi-cm_sbs-use-null-instead-of-0-for-ptr.patch
drivers-media-use-null-instead-of-0-for-ptrs.patch
git-lxdialog.patch
mtd-printk-format-warning.patch
pcmcia-ds-must_check-fixes.patch
pcie-check-and-return-bus_register-errors-fix.patch
dc395x-fix-printk-format-warning.patch
mm-page_alloc-use-null-instead-of-0-for-ptr.patch
tiacx-sparse-cleanups.patch
consistently-use-max_errno-in-__syscall_return.patch
consistently-use-max_errno-in-__syscall_return-fix.patch
eisa-bus-modalias-attributes-support-1.patch
kernel-params-must_check-fixes.patch
blockdevc-check-errors.patch
block-handle-subsystem_register-init-errors.patch
fs-namespace-handle-init-registration-errors.patch
kernel-doc-for-relay-interface.patch
kernel-doc-move-filesystems-together.patch
include-documentation-for-functions-in-drivers-base-classc.patch
fix-parameter-names-in-drivers-base-classc.patch
fix-kerneldoc-comments-in-kernel-timerc-fix.patch
cdev-documentation-was-drop-second-arg-of-unregister_chrdev.patch
docbook-fix-segfault-in-docprocc.patch
doc-fix-kernel-parameters-quiet.patch
mention-documenation-abi-requirements-in-documentation-submitchecklist.patch
allow-proc-configgz-to-be-built-as-a-module.patch
fs-cache-cachefiles-a-cache-that-backs-onto-a-mounted-filesystem-cachefiles-printk-format-warning.patch
ecryptfs-fix-printk-format-warnings.patch
ide-core-must_check-fixes.patch
documentation-fixes-in-intel810txt.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux