* [PATCH] Staging: i2o: Add "const" in variable declaration
@ 2015-03-25 23:58 Helen Fornazier
2015-03-26 6:34 ` [Outreachy kernel] " Julia Lawall
0 siblings, 1 reply; 3+ messages in thread
From: Helen Fornazier @ 2015-03-25 23:58 UTC (permalink / raw)
To: outreachy-kernel; +Cc: Helen Fornazier
This patch fixes the checkpatch.pl warning:
WARNING: char * array declaration might be better as static const
+ static char *FAIL_STATUS[] = {
Signed-off-by: Helen Fornazier <helen.fornazier@gmail.com>
---
drivers/staging/i2o/debug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/i2o/debug.c b/drivers/staging/i2o/debug.c
index 12b783b2..f703e00 100644
--- a/drivers/staging/i2o/debug.c
+++ b/drivers/staging/i2o/debug.c
@@ -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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Outreachy kernel] [PATCH] Staging: i2o: Add "const" in variable declaration
2015-03-25 23:58 [PATCH] Staging: i2o: Add "const" in variable declaration Helen Fornazier
@ 2015-03-26 6:34 ` Julia Lawall
2015-03-26 12:12 ` Helen Fornazier
0 siblings, 1 reply; 3+ messages in thread
From: Julia Lawall @ 2015-03-26 6:34 UTC (permalink / raw)
To: Helen Fornazier; +Cc: outreachy-kernel
On Wed, 25 Mar 2015, Helen Fornazier wrote:
> 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
> Signed-off-by: Helen Fornazier <helen.fornazier@gmail.com>
> ---
> drivers/staging/i2o/debug.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/i2o/debug.c b/drivers/staging/i2o/debug.c
> index 12b783b2..f703e00 100644
> --- a/drivers/staging/i2o/debug.c
> +++ b/drivers/staging/i2o/debug.c
> @@ -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
>
> --
> 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/1427327890-5494-1-git-send-email-helen.fornazier%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Outreachy kernel] [PATCH] Staging: i2o: Add "const" in variable declaration
2015-03-26 6:34 ` [Outreachy kernel] " Julia Lawall
@ 2015-03-26 12:12 ` Helen Fornazier
0 siblings, 0 replies; 3+ messages in thread
From: Helen Fornazier @ 2015-03-26 12:12 UTC (permalink / raw)
To: Julia Lawall; +Cc: outreachy-kernel
[-- Attachment #1: Type: text/plain, Size: 1810 bytes --]
On Thu, Mar 26, 2015 at 3:34 AM, Julia Lawall <julia.lawall@lip6.fr> wrote:
> On Wed, 25 Mar 2015, Helen Fornazier wrote:
>
> > 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.
>
> > Signed-off-by: Helen Fornazier <helen.fornazier@gmail.com>
> > ---
> > drivers/staging/i2o/debug.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/staging/i2o/debug.c b/drivers/staging/i2o/debug.c
> > index 12b783b2..f703e00 100644
> > --- a/drivers/staging/i2o/debug.c
> > +++ b/drivers/staging/i2o/debug.c
> > @@ -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
> >
> > --
> > 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/1427327890-5494-1-git-send-email-helen.fornazier%40gmail.com
> .
> > For more options, visit https://groups.google.com/d/optout.
> >
>
--
Helen Fornazier
[-- Attachment #2: Type: text/html, Size: 3187 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-03-26 12:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-25 23:58 [PATCH] Staging: i2o: Add "const" in variable declaration Helen Fornazier
2015-03-26 6:34 ` [Outreachy kernel] " Julia Lawall
2015-03-26 12:12 ` Helen Fornazier
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.