diff mbox

rtc: max77xxx: fix of_table.cocci warnings

Message ID alpine.DEB.2.10.1601121226060.5214@hadrien
State New
Headers show

Commit Message

Julia Lawall Jan. 12, 2016, 11:27 a.m. UTC
Make sure (of/i2c/platform)_device_id tables are NULL terminated

Generated by: scripts/coccinelle/misc/of_table.cocci

CC: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
---

Please take the patch only if it's a positive warning. Thanks!

 rtc-max77xxx.c |    1 +
 1 file changed, 1 insertion(+)

--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Laxman Dewangan Jan. 12, 2016, 11:20 a.m. UTC | #1
Hi Julia,
Thanks for pointing this issue.

What script do you run to get this error?

I tried to run script/coccicheck and it did not showed this issue.

When I run make with coccicheck per Documentation, it did not show 
specific to this error. Although, there was lots of output.

I want to get this type of error by running script.
Any command for this?

Thanks,
Laxman



On Tuesday 12 January 2016 04:57 PM, Julia Lawall wrote:
> Make sure (of/i2c/platform)_device_id tables are NULL terminated
>
> Generated by: scripts/coccinelle/misc/of_table.cocci
>
> CC: Laxman Dewangan <ldewangan@nvidia.com>
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
> ---
>
> Please take the patch only if it's a positive warning. Thanks!
>
>   rtc-max77xxx.c |    1 +
>   1 file changed, 1 insertion(+)
>
> --- a/drivers/rtc/rtc-max77xxx.c
> +++ b/drivers/rtc/rtc-max77xxx.c
> @@ -480,6 +480,7 @@ static const struct platform_device_id m
>   	{ .name = "max77xxx-rtc", },
>   	{ .name = "max77620-rtc", },
>   	{ .name = "max20024-rtc", },
> +	{},
>   };
>
>   static struct platform_driver max77xxx_rtc_driver = {

--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

--- a/drivers/rtc/rtc-max77xxx.c
+++ b/drivers/rtc/rtc-max77xxx.c
@@ -480,6 +480,7 @@  static const struct platform_device_id m
 	{ .name = "max77xxx-rtc", },
 	{ .name = "max77620-rtc", },
 	{ .name = "max20024-rtc", },
+	{},
 };

 static struct platform_driver max77xxx_rtc_driver = {