Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754169Ab0LGWRE (ORCPT ); Tue, 7 Dec 2010 17:17:04 -0500 Received: from mailout-de.gmx.net ([213.165.64.22]:49923 "HELO mail.gmx.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with SMTP id S1754099Ab0LGWRC (ORCPT ); Tue, 7 Dec 2010 17:17:02 -0500 X-Authenticated: #12255092 X-Provags-ID: V01U2FsdGVkX1//WCcf69L/OOzssW+JtvybRdZ7YM+u0YSZk2PWKh Vwpn1Re+lSmodz From: Peter Huewe To: Greg Kroah-Hartman Cc: Joe Perches , Bernie Thompson , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Peter Huewe Subject: [PATCH] staging/udlfb: Fix sparse warning 'Using plain integer as NULL pointer' Date: Tue, 7 Dec 2010 23:16:41 +0100 Message-Id: <1291760201-18531-1-git-send-email-peterhuewe@gmx.de> X-Mailer: git-send-email 1.7.2.2 X-Y-GMX-Trusted: 0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1949 Lines: 57 This patch fixes the warning generated by sparse: "Using plain integer as NULL pointer" by replacing the offending 0s with NULL. Signed-off-by: Peter Huewe --- KernelVersion: linux-next-20101207 drivers/staging/udlfb/udlfb.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/udlfb/udlfb.c b/drivers/staging/udlfb/udlfb.c index 8dd21e0..6586d38 100644 --- a/drivers/staging/udlfb/udlfb.c +++ b/drivers/staging/udlfb/udlfb.c @@ -395,10 +395,10 @@ static void dlfb_compress_hline( while ((pixel_end > pixel) && (cmd_buffer_end - MIN_RLX_CMD_BYTES > cmd)) { - uint8_t *raw_pixels_count_byte = 0; - uint8_t *cmd_pixels_count_byte = 0; - const uint16_t *raw_pixel_start = 0; - const uint16_t *cmd_pixel_start, *cmd_pixel_end = 0; + uint8_t *raw_pixels_count_byte = NULL; + uint8_t *cmd_pixels_count_byte = NULL; + const uint16_t *raw_pixel_start = NULL; + const uint16_t *cmd_pixel_start, *cmd_pixel_end = NULL; prefetchw((void *) cmd); /* pull in one cache line at least */ @@ -1277,7 +1277,7 @@ static int dlfb_setup_modes(struct dlfb_data *dev, /* If everything else has failed, fall back to safe default mode */ if (default_vmode == NULL) { - struct fb_videomode fb_vmode = {0}; + struct fb_videomode fb_vmode = {NULL}; /* * Add the standard VESA modes to our modelist @@ -1533,8 +1533,8 @@ static int dlfb_usb_probe(struct usb_interface *interface, const struct usb_device_id *id) { struct usb_device *usbdev; - struct dlfb_data *dev = 0; - struct fb_info *info = 0; + struct dlfb_data *dev = NULL; + struct fb_info *info = NULL; int retval = -ENOMEM; int i; -- 1.7.2.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/