Skip to contentSkip to conversation

staging: greybus: svc_watchdog: Modify char* array declaration.

PATCH In review Sanjana Sanikommu 3 participants 5 messages Mar 23, 2019 – Mar 24, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 staging: greybus: svc_watchdog: Modify char* array declaration.

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

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

---
Changes in v2:
Test build the patch

 drivers/staging/greybus/svc_watchdog.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/greybus/svc_watchdog.c +2 -2
index 7868ad8211c5..b6aaabcec320 100644
@@ -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,
Signature · 1 line
2.17.1
maintainer
#1 lore raw
Quoted 9 lines · Sanjana Sanikommu

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

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

---
Changes in v2:
Test build the patch

No you did not :(

It blows up the build into tiny pieces. Please properly test build your patches before sending them in.

greg k-h

#2 lore raw
Quoted 11 lines · Greg KH
Quoted 9 lines · Sanjana Sanikommu

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

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

---
Changes in v2:
Test build the patch

Quoted 4 lines

No you did not :(

It blows up the build into tiny pieces. Please properly test build your patches before sending them in.

Sarjana,

Try make allyesconfig to make it more likely to have a configuration that will actually cause compiling the driver.

julia

Quoted 10 lines

greg k-h

--
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 [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20190324085923.GA32103%40kroah.com.
For more options, visit https://groups.google.com/d/optout.

#3 lore raw
Quoted 19 lines · Julia Lawall
Quoted 14 lines · Greg KH
Quoted 10 lines · Sanjana Sanikommu

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 <[email protected] <javascript:>>

---
Changes in v2:
Test build the patch

No you did not :(

Quoted 8 lines
Quoted 2 lines

It blows up the build into tiny pieces. Please properly test build your patches before sending them in.

Sarjana,

Try make allyesconfig to make it more likely to have a configuration that will actually cause compiling the driver.

I would do that :)
thank you
Sanjana

Quoted 19 lines

julia

Quoted 5 lines

greg k-h

Signature · 1 line
You received this message because you are subscribed to the Google 

Groups "outreachy-kernel" group.

Quoted 1 line

To unsubscribe from this group and stop receiving emails from it, send

an email to [email protected] <javascript:>.

Quoted 1 line

To post to this group, send email to [email protected]

<javascript:>.

Quoted 1 line

To view this discussion on the web visit

https://groups.google.com/d/msgid/outreachy-kernel/20190324085923.GA32103%40kroah.com.

Quoted 2 lines

For more options, visit https://groups.google.com/d/optout.

#4 lore raw
Quoted 26 lines · On Sunday, March 24, 2019 at 2:52:51 PM UTC+5:30, [email protected] wrote:
Quoted 22 lines · Julia Lawall
Quoted 6 lines · Greg KH
Quoted 5 lines · Sanjana Sanikommu

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

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

Quoted 8 lines
Quoted 4 lines

---
Changes in v2:
Test build the patch

No you did not :(

It blows up the build into tiny pieces. Please properly test build

your

Quoted 1 line

patches before sending them in.

Quoted 9 lines
Quoted 5 lines

Sarjana,

Try make allyesconfig to make it more likely to have a configuration that will actually cause compiling the driver.

I would do that :)
thank you

Sorry, I was dumb I now understand why it went wrong because the expected is ‘char **’ but argument is of type ‘const
char **’.
So it cant be changed.

Quoted 21 lines

Sanjana

Quoted 18 lines

julia

Quoted 5 lines

greg k-h

Signature · 1 line
You received this message because you are subscribed to the Google 

Groups "outreachy-kernel" group.

Quoted 1 line

To unsubscribe from this group and stop receiving emails from it, send

an email to [email protected].

Quoted 2 lines

To post to this group, send email to [email protected]. To view this discussion on the web visit

https://groups.google.com/d/msgid/outreachy-kernel/20190324085923.GA32103%40kroah.com.

Quoted 2 lines

For more options, visit https://groups.google.com/d/optout.