Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754249Ab3HBFxX (ORCPT ); Fri, 2 Aug 2013 01:53:23 -0400 Received: from mail-ob0-f178.google.com ([209.85.214.178]:50669 "EHLO mail-ob0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753932Ab3HBFxU (ORCPT ); Fri, 2 Aug 2013 01:53:20 -0400 MIME-Version: 1.0 In-Reply-To: <000601ce8f44$299805e0$7cc811a0$@samsung.com> References: <000601ce8f44$299805e0$7cc811a0$@samsung.com> Date: Fri, 2 Aug 2013 11:23:20 +0530 Message-ID: Subject: Re: [PATCH] mfd: menelaus: use NULL instead of 0 From: Sachin Kamat To: Jingoo Han Cc: Samuel Ortiz , Lee Jones , linux-kernel@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1555 Lines: 46 On 2 August 2013 11:20, Jingoo Han wrote: > 'mmc_callback_data' and 'vtg' are pointers. > Fix the following sparse warning: > > drivers/mfd/menelaus.c:445:43: warning: Using plain integer as NULL pointer > drivers/mfd/menelaus.c:469:20: warning: Using plain integer as NULL pointer > > Signed-off-by: Jingoo Han > --- > drivers/mfd/menelaus.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/mfd/menelaus.c b/drivers/mfd/menelaus.c > index 998ce8c..0f62ecd 100644 > --- a/drivers/mfd/menelaus.c > +++ b/drivers/mfd/menelaus.c > @@ -442,7 +442,7 @@ void menelaus_unregister_mmc_callback(void) > menelaus_remove_irq_work(MENELAUS_MMC_S2D1_IRQ); > > the_menelaus->mmc_callback = NULL; > - the_menelaus->mmc_callback_data = 0; > + the_menelaus->mmc_callback_data = NULL; > } > EXPORT_SYMBOL(menelaus_unregister_mmc_callback); > > @@ -466,7 +466,7 @@ static int menelaus_set_voltage(const struct menelaus_vtg *vtg, int mV, > struct i2c_client *c = the_menelaus->client; > > mutex_lock(&the_menelaus->lock); > - if (vtg == 0) > + if (vtg == NULL) Instead you could just make this: if (!vtg) > goto set_voltage; > -- With warm regards, Sachin -- 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/