Staging: i2o: Add "const" in variable declaration
PATCH 1/1 Staging: i2o: Add "const" in variable declaration
This patch fixes the checkpatch.pl warning:
WARNING: char * array declaration might be better as static const
+ static char *FAIL_STATUS[] = {
--- drivers/staging/i2o/debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/i2o/debug.c +1 -1
@@ -69,7 +69,7 @@ void i2o_dump_message(struct i2o_message *m)*/ static void i2o_report_fail_status (u8 req_status,u32 *msg) { -static char *FAIL_STATUS [] = { +static const char *FAIL_STATUS [] = {"0x80" ,/* not used */ "SERVICE_SUSPENDED" ,/* 0x81 */ "SERVICE_TERMINATED" ,/* 0x82 */
Signature · 1 line
1.9.1
Quoted 4 lines · Helen Fornazier
This patch fixes the checkpatch.pl warning:
WARNING: char * array declaration might be better as static const
+ static char *FAIL_STATUS[] = {
Your commit message should explain why this is a correct change.
julia
Quoted 28 lines
Signed-off-by Helen Fornazier <[email protected]>--- drivers/staging/i2o/debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/i2o/debug.c +1
-1@@ -69,7 +69,7 @@ void i2o_dump_message(struct i2o_message *m)*/ static void i2o_report_fail_status (u8 req_status,u32 *msg) { -static char *FAIL_STATUS [] = { +static const char *FAIL_STATUS [] = {"0x80" ,/* not used */ "SERVICE_SUSPENDED" ,/* 0x81 */ "SERVICE_TERMINATED" ,/* 0x82 */ Signature · 8 lines
1.9.1 -- 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/1427327890-5494-1-git-send-email-helen.fornazier%40gmail.com. For more options, visit https://groups.google.com/d/optout.
Quoted 11 lines · Julia Lawall
Quoted 4 lines · Helen Fornazier
This patch fixes the checkpatch.pl warning:
WARNING: char * array declaration might be better as static const
+ static char *FAIL_STATUS[] = {Your commit message should explain why this is a correct change.
julia
Should I send this patch again? As you said, i2o is going to be removed from the kernel.
Quoted 34 lines
Quoted 22 lines
Signed-off-by Helen Fornazier <[email protected]>--- drivers/staging/i2o/debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/i2o/debug.c +1
-2@@ -69,7 +69,7 @@ void i2o_dump_message(struct i2o_message *m)*/ static void i2o_report_fail_status (u8 req_status,u32 *msg) { - static char *FAIL_STATUS[] = { +static const char *FAIL_STATUS [] = {"0x80" ,/* not used */ "SERVICE_SUSPENDED" ,/* 0x81 */ "SERVICE_TERMINATED" ,/* 0x82 */ --1.9.1
Quoted 2 lines
--
You received this message because you are subscribed to the GoogleGroups "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
Quoted 2 lines
For more options, visit https://groups.google.com/d/optout.
Signature · 1 line
Helen Fornazier