Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754610Ab0LGWoi (ORCPT ); Tue, 7 Dec 2010 17:44:38 -0500 Received: from mailout-de.gmx.net ([213.165.64.23]:37895 "HELO mail.gmx.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with SMTP id S1754551Ab0LGWoh (ORCPT ); Tue, 7 Dec 2010 17:44:37 -0500 X-Authenticated: #12255092 X-Provags-ID: V01U2FsdGVkX1/eKXwvDsne5eoxD2BzrNjfwUa6xv5spUAceqInjQ WyTrYuopY9q0A/ From: Peter Huewe To: Greg Kroah-Hartman Cc: Pekka Enberg , Nitin Gupta , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Peter Huewe Subject: [PATCH] staging/zram: Fix sparse warning 'Using plain integer as NULL pointer' Date: Tue, 7 Dec 2010 23:44:33 +0100 Message-Id: <1291761873-28980-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: 1806 Lines: 49 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/zram/xvmalloc.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/zram/xvmalloc.c b/drivers/staging/zram/xvmalloc.c index 3fdbb8a..b644067 100644 --- a/drivers/staging/zram/xvmalloc.c +++ b/drivers/staging/zram/xvmalloc.c @@ -187,7 +187,7 @@ static void insert_block(struct xv_pool *pool, struct page *page, u32 offset, slindex = get_index_for_insert(block->size); flindex = slindex / BITS_PER_LONG; - block->link.prev_page = 0; + block->link.prev_page = NULL; block->link.prev_offset = 0; block->link.next_page = pool->freelist[slindex].page; block->link.next_offset = pool->freelist[slindex].offset; @@ -217,7 +217,7 @@ static void remove_block_head(struct xv_pool *pool, pool->freelist[slindex].page = block->link.next_page; pool->freelist[slindex].offset = block->link.next_offset; - block->link.prev_page = 0; + block->link.prev_page = NULL; block->link.prev_offset = 0; if (!pool->freelist[slindex].page) { @@ -232,7 +232,7 @@ static void remove_block_head(struct xv_pool *pool, */ tmpblock = get_ptr_atomic(pool->freelist[slindex].page, pool->freelist[slindex].offset, KM_USER1); - tmpblock->link.prev_page = 0; + tmpblock->link.prev_page = NULL; tmpblock->link.prev_offset = 0; put_ptr_atomic(tmpblock, KM_USER1); } -- 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/