diff mbox

mmc: card.h: Use NULL instead of 0 for END_FIXUP

Message ID 1396662168-6501-1-git-send-email-festevam@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Fabio Estevam April 5, 2014, 1:42 a.m. UTC
From: Fabio Estevam <fabio.estevam@freescale.com>

Fix the following sparse warnings:

drivers/mmc/card/block.c:2421:9: warning: Using plain integer as NULL pointer

drivers/mmc/core/quirks.c:69:9: warning: Using plain integer as NULL pointer

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 include/linux/mmc/card.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ulf Hansson April 9, 2014, 9:33 a.m. UTC | #1
On 5 April 2014 03:42, Fabio Estevam <festevam@gmail.com> wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> Fix the following sparse warnings:
>
> drivers/mmc/card/block.c:2421:9: warning: Using plain integer as NULL pointer
>
> drivers/mmc/core/quirks.c:69:9: warning: Using plain integer as NULL pointer
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>

Acked-by: Ulf Hansson <ulf.hansson@linaro.org>

> ---
>  include/linux/mmc/card.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h
> index b730272..aa7e57f 100644
> --- a/include/linux/mmc/card.h
> +++ b/include/linux/mmc/card.h
> @@ -353,7 +353,7 @@ struct mmc_fixup {
>  #define CID_OEMID_ANY ((unsigned short) -1)
>  #define CID_NAME_ANY (NULL)
>
> -#define END_FIXUP { 0 }
> +#define END_FIXUP { NULL }
>
>  #define _FIXUP_EXT(_name, _manfid, _oemid, _rev_start, _rev_end,       \
>                    _cis_vendor, _cis_device,                            \
> --
> 1.8.3.2
>
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Ben Dooks April 9, 2014, 11:25 a.m. UTC | #2
On 09/04/14 10:33, Ulf Hansson wrote:
> On 5 April 2014 03:42, Fabio Estevam <festevam@gmail.com> wrote:
>> From: Fabio Estevam <fabio.estevam@freescale.com>
>>
>> Fix the following sparse warnings:
>>
>> drivers/mmc/card/block.c:2421:9: warning: Using plain integer as NULL pointer
>>
>> drivers/mmc/core/quirks.c:69:9: warning: Using plain integer as NULL pointer
>>
>> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
>
> Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
>
>> ---
>>   include/linux/mmc/card.h | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h
>> index b730272..aa7e57f 100644
>> --- a/include/linux/mmc/card.h
>> +++ b/include/linux/mmc/card.h
>> @@ -353,7 +353,7 @@ struct mmc_fixup {
>>   #define CID_OEMID_ANY ((unsigned short) -1)
>>   #define CID_NAME_ANY (NULL)
>>
>> -#define END_FIXUP { 0 }
>> +#define END_FIXUP { NULL }

It would also be possible to use { } here.
diff mbox

Patch

diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h
index b730272..aa7e57f 100644
--- a/include/linux/mmc/card.h
+++ b/include/linux/mmc/card.h
@@ -353,7 +353,7 @@  struct mmc_fixup {
 #define CID_OEMID_ANY ((unsigned short) -1)
 #define CID_NAME_ANY (NULL)
 
-#define END_FIXUP { 0 }
+#define END_FIXUP { NULL }
 
 #define _FIXUP_EXT(_name, _manfid, _oemid, _rev_start, _rev_end,	\
 		   _cis_vendor, _cis_device,				\