All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: greybus: svc_watchdog: Modify char* array declaration.
@ 2019-03-21  7:38 Sanjana Sanikommu
  2019-03-21 18:58 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Sanjana Sanikommu @ 2019-03-21  7:38 UTC (permalink / raw)
  To: gregkh; +Cc: outreachy-kernel

Modify "static char* array" to "static char* const array".
Issue found using checkpatch.pl

WARNING:char* array declaration might be better as static constant

Signed-off-by: Sanjana Sanikommu <sanjana99reddy99@gmail.com>
---
 drivers/staging/greybus/svc_watchdog.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/greybus/svc_watchdog.c b/drivers/staging/greybus/svc_watchdog.c
index 7868ad8211c5..b6aaabcec320 100644
--- a/drivers/staging/greybus/svc_watchdog.c
+++ b/drivers/staging/greybus/svc_watchdog.c
@@ -44,12 +44,12 @@ static int svc_watchdog_pm_notifier(struct notifier_block *notifier,
 static void greybus_reset(struct work_struct *work)
 {
 	static char const start_path[] = "/system/bin/start";
-	static char *envp[] = {
+	static char const *envp[] = {
 		"HOME=/",
 		"PATH=/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin",
 		NULL,
 	};
-	static char *argv[] = {
+	static char const *argv[] = {
 		(char *)start_path,
 		"unipro_reset",
 		NULL,
-- 
2.17.1



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

* Re: [PATCH] staging: greybus: svc_watchdog: Modify char* array declaration.
  2019-03-21  7:38 [PATCH] staging: greybus: svc_watchdog: Modify char* array declaration Sanjana Sanikommu
@ 2019-03-21 18:58 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2019-03-21 18:58 UTC (permalink / raw)
  To: Sanjana Sanikommu; +Cc: outreachy-kernel

On Thu, Mar 21, 2019 at 01:08:19PM +0530, Sanjana Sanikommu wrote:
> Modify "static char* array" to "static char* const array".
> Issue found using checkpatch.pl
> 
> WARNING:char* array declaration might be better as static constant
> 
> Signed-off-by: Sanjana Sanikommu <sanjana99reddy99@gmail.com>
> ---
>  drivers/staging/greybus/svc_watchdog.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/greybus/svc_watchdog.c b/drivers/staging/greybus/svc_watchdog.c
> index 7868ad8211c5..b6aaabcec320 100644
> --- a/drivers/staging/greybus/svc_watchdog.c
> +++ b/drivers/staging/greybus/svc_watchdog.c
> @@ -44,12 +44,12 @@ static int svc_watchdog_pm_notifier(struct notifier_block *notifier,
>  static void greybus_reset(struct work_struct *work)
>  {
>  	static char const start_path[] = "/system/bin/start";
> -	static char *envp[] = {
> +	static char const *envp[] = {
>  		"HOME=/",
>  		"PATH=/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin",
>  		NULL,
>  	};
> -	static char *argv[] = {
> +	static char const *argv[] = {
>  		(char *)start_path,
>  		"unipro_reset",
>  		NULL,
> -- 
> 2.17.1
> 

Always test-build your patches before sending them out.  You did not do
that here, why not?  This blows up the build in horrible ways :(

greg k-h


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

end of thread, other threads:[~2019-03-21 18:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-21  7:38 [PATCH] staging: greybus: svc_watchdog: Modify char* array declaration Sanjana Sanikommu
2019-03-21 18:58 ` Greg KH

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.