From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752552AbaG0Sax (ORCPT ); Sun, 27 Jul 2014 14:30:53 -0400 Received: from mail-wi0-f169.google.com ([209.85.212.169]:35714 "EHLO mail-wi0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752186AbaG0Sau (ORCPT ); Sun, 27 Jul 2014 14:30:50 -0400 From: Marc Fite To: gregkh@linuxfoundation.org, dulshani.gunawardhana89@gmail.com, josh@joshtriplett.org, oleg.drokin@intel.com, john.hammond@intel.com, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Cc: Marc Fite Subject: [PATCH] staging: lustre: lov: Fix sparse warning using plain integer as NULL pointer Date: Sun, 27 Jul 2014 20:31:08 +0200 Message-Id: <1406485868-11231-1-git-send-email-marc@fite.cat> X-Mailer: git-send-email 2.0.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch fixes the warning generated by sparse: "Using plain integer as NULL pointer" by replacing the offending 0s with NULL. drivers/staging/lustre/lustre/lov/lov_obd.c:902:48: warning: Using plain integer as NULL pointer drivers/staging/lustre/lustre/lov/lov_obd.c:946:54: warning: Using plain integer as NULL pointer drivers/staging/lustre/lustre/lov/lov_obd.c:2819:46: warning: Using plain integer as NULL pointer Signed-off-by: Marc Fite --- drivers/staging/lustre/lustre/lov/lov_obd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/lustre/lustre/lov/lov_obd.c b/drivers/staging/lustre/lustre/lov/lov_obd.c index 814dd49..e4f4fe3 100644 --- a/drivers/staging/lustre/lustre/lov/lov_obd.c +++ b/drivers/staging/lustre/lustre/lov/lov_obd.c @@ -899,7 +899,7 @@ static int lov_cleanup(struct obd_device *obd) " deathrow=%d, lovrc=%d\n", i, lov->lov_death_row, atomic_read(&lov->lov_refcount)); - lov_del_target(obd, i, 0, 0); + lov_del_target(obd, i, NULL, 0); } obd_putref(obd); OBD_FREE(lov->lov_tgts, sizeof(*lov->lov_tgts) * @@ -943,7 +943,7 @@ int lov_process_config_base(struct obd_device *obd, struct lustre_cfg *lcfg, GOTO(out, rc); } case LCFG_PARAM: { - struct lprocfs_static_vars lvars = { 0 }; + struct lprocfs_static_vars lvars = { NULL }; struct lov_desc *desc = &(obd->u.lov.desc); if (!desc) @@ -2816,7 +2816,7 @@ struct kmem_cache *lov_oinfo_slab; int __init lov_init(void) { - struct lprocfs_static_vars lvars = { 0 }; + struct lprocfs_static_vars lvars = { NULL }; int rc; /* print an address of _any_ initialized kernel symbol from this -- 2.0.1