All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] staging: greybus: declare struct of_device_id as const
@ 2016-09-21  9:18 Eva Rachel Retuya
  2016-09-21  9:18 ` [PATCH 1/2] staging: greybus: arche-apb-ctrl: " Eva Rachel Retuya
  2016-09-21  9:18 ` [PATCH 2/2] staging: greybus: arche-platform: " Eva Rachel Retuya
  0 siblings, 2 replies; 5+ messages in thread
From: Eva Rachel Retuya @ 2016-09-21  9:18 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: johan, elder, gregkh, Eva Rachel Retuya

Address the following checkpatch warning:
WARNING: struct of_device_id should be normally const

Eva Rachel Retuya (2):
  staging: greybus: arche-apb-ctrl: declare struct of_device_id as const
  staging: greybus: arche-platform: declare struct of_device_id as const

 drivers/staging/greybus/arche-apb-ctrl.c | 2 +-
 drivers/staging/greybus/arche-platform.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

-- 
2.7.4



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] staging: greybus: arche-apb-ctrl: declare struct of_device_id as const
  2016-09-21  9:18 [PATCH 0/2] staging: greybus: declare struct of_device_id as const Eva Rachel Retuya
@ 2016-09-21  9:18 ` Eva Rachel Retuya
  2016-09-21  9:23   ` [Outreachy kernel] " Julia Lawall
  2016-09-21  9:18 ` [PATCH 2/2] staging: greybus: arche-platform: " Eva Rachel Retuya
  1 sibling, 1 reply; 5+ messages in thread
From: Eva Rachel Retuya @ 2016-09-21  9:18 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: johan, elder, gregkh, Eva Rachel Retuya

Change the declaration of the structure of_device_id arche_apb_ctrl_of_match
into const as suggested by checkpatch.

WARNING: struct of_device_id should be normally const

Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
---
 drivers/staging/greybus/arche-apb-ctrl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/greybus/arche-apb-ctrl.c b/drivers/staging/greybus/arche-apb-ctrl.c
index 59d9d42..70323aa 100644
--- a/drivers/staging/greybus/arche-apb-ctrl.c
+++ b/drivers/staging/greybus/arche-apb-ctrl.c
@@ -495,7 +495,7 @@ static void arche_apb_ctrl_shutdown(struct platform_device *pdev)
 static SIMPLE_DEV_PM_OPS(arche_apb_ctrl_pm_ops, arche_apb_ctrl_suspend,
 			 arche_apb_ctrl_resume);
 
-static struct of_device_id arche_apb_ctrl_of_match[] = {
+static const struct of_device_id arche_apb_ctrl_of_match[] = {
 	{ .compatible = "usbffff,2", },
 	{ },
 };
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] staging: greybus: arche-platform: declare struct of_device_id as const
  2016-09-21  9:18 [PATCH 0/2] staging: greybus: declare struct of_device_id as const Eva Rachel Retuya
  2016-09-21  9:18 ` [PATCH 1/2] staging: greybus: arche-apb-ctrl: " Eva Rachel Retuya
@ 2016-09-21  9:18 ` Eva Rachel Retuya
  2016-09-21  9:23   ` [Outreachy kernel] " Julia Lawall
  1 sibling, 1 reply; 5+ messages in thread
From: Eva Rachel Retuya @ 2016-09-21  9:18 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: johan, elder, gregkh, Eva Rachel Retuya

Constify of_device_id structure declarations as suggested by checkpatch.

WARNING: struct of_device_id should be normally const

Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
---
 drivers/staging/greybus/arche-platform.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/greybus/arche-platform.c b/drivers/staging/greybus/arche-platform.c
index d6b3609..e36ee98 100644
--- a/drivers/staging/greybus/arche-platform.c
+++ b/drivers/staging/greybus/arche-platform.c
@@ -776,12 +776,12 @@ static SIMPLE_DEV_PM_OPS(arche_platform_pm_ops,
 			arche_platform_suspend,
 			arche_platform_resume);
 
-static struct of_device_id arche_platform_of_match[] = {
+static const struct of_device_id arche_platform_of_match[] = {
 	{ .compatible = "google,arche-platform", }, /* Use PID/VID of SVC device */
 	{ },
 };
 
-static struct of_device_id arche_combined_id[] = {
+static const struct of_device_id arche_combined_id[] = {
 	{ .compatible = "google,arche-platform", }, /* Use PID/VID of SVC device */
 	{ .compatible = "usbffff,2", },
 	{ },
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [Outreachy kernel] [PATCH 2/2] staging: greybus: arche-platform: declare struct of_device_id as const
  2016-09-21  9:18 ` [PATCH 2/2] staging: greybus: arche-platform: " Eva Rachel Retuya
@ 2016-09-21  9:23   ` Julia Lawall
  0 siblings, 0 replies; 5+ messages in thread
From: Julia Lawall @ 2016-09-21  9:23 UTC (permalink / raw)
  To: Eva Rachel Retuya; +Cc: outreachy-kernel, johan, elder, gregkh



On Wed, 21 Sep 2016, Eva Rachel Retuya wrote:

> Constify of_device_id structure declarations as suggested by checkpatch.

It would be good to describe why the change is correct in this particular
case.  How is the array used in this code?

julia

>
> WARNING: struct of_device_id should be normally const
>
> Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
> ---
>  drivers/staging/greybus/arche-platform.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/greybus/arche-platform.c b/drivers/staging/greybus/arche-platform.c
> index d6b3609..e36ee98 100644
> --- a/drivers/staging/greybus/arche-platform.c
> +++ b/drivers/staging/greybus/arche-platform.c
> @@ -776,12 +776,12 @@ static SIMPLE_DEV_PM_OPS(arche_platform_pm_ops,
>  			arche_platform_suspend,
>  			arche_platform_resume);
>
> -static struct of_device_id arche_platform_of_match[] = {
> +static const struct of_device_id arche_platform_of_match[] = {
>  	{ .compatible = "google,arche-platform", }, /* Use PID/VID of SVC device */
>  	{ },
>  };
>
> -static struct of_device_id arche_combined_id[] = {
> +static const struct of_device_id arche_combined_id[] = {
>  	{ .compatible = "google,arche-platform", }, /* Use PID/VID of SVC device */
>  	{ .compatible = "usbffff,2", },
>  	{ },
> --
> 2.7.4
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1474449487-9524-3-git-send-email-eraretuya%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Outreachy kernel] [PATCH 1/2] staging: greybus: arche-apb-ctrl: declare struct of_device_id as const
  2016-09-21  9:18 ` [PATCH 1/2] staging: greybus: arche-apb-ctrl: " Eva Rachel Retuya
@ 2016-09-21  9:23   ` Julia Lawall
  0 siblings, 0 replies; 5+ messages in thread
From: Julia Lawall @ 2016-09-21  9:23 UTC (permalink / raw)
  To: Eva Rachel Retuya; +Cc: outreachy-kernel, johan, elder, gregkh



On Wed, 21 Sep 2016, Eva Rachel Retuya wrote:

> Change the declaration of the structure of_device_id arche_apb_ctrl_of_match
> into const as suggested by checkpatch.

The same for this one.

julia

>
> WARNING: struct of_device_id should be normally const
>
> Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
> ---
>  drivers/staging/greybus/arche-apb-ctrl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/greybus/arche-apb-ctrl.c b/drivers/staging/greybus/arche-apb-ctrl.c
> index 59d9d42..70323aa 100644
> --- a/drivers/staging/greybus/arche-apb-ctrl.c
> +++ b/drivers/staging/greybus/arche-apb-ctrl.c
> @@ -495,7 +495,7 @@ static void arche_apb_ctrl_shutdown(struct platform_device *pdev)
>  static SIMPLE_DEV_PM_OPS(arche_apb_ctrl_pm_ops, arche_apb_ctrl_suspend,
>  			 arche_apb_ctrl_resume);
>
> -static struct of_device_id arche_apb_ctrl_of_match[] = {
> +static const struct of_device_id arche_apb_ctrl_of_match[] = {
>  	{ .compatible = "usbffff,2", },
>  	{ },
>  };
> --
> 2.7.4
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1474449487-9524-2-git-send-email-eraretuya%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-09-21  9:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-21  9:18 [PATCH 0/2] staging: greybus: declare struct of_device_id as const Eva Rachel Retuya
2016-09-21  9:18 ` [PATCH 1/2] staging: greybus: arche-apb-ctrl: " Eva Rachel Retuya
2016-09-21  9:23   ` [Outreachy kernel] " Julia Lawall
2016-09-21  9:18 ` [PATCH 2/2] staging: greybus: arche-platform: " Eva Rachel Retuya
2016-09-21  9:23   ` [Outreachy kernel] " Julia Lawall

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.