* [PATCH] Staging: sm750fb: sm750: fixed coding style issues
@ 2017-11-22 15:42 Patryk Kocielnik
2017-11-22 16:03 ` Joe Perches
0 siblings, 1 reply; 4+ messages in thread
From: Patryk Kocielnik @ 2017-11-22 15:42 UTC (permalink / raw)
To: sudipm.mukherjee; +Cc: devel, linux-kernel, Patryk Kocielnik
Cleaned checkpatch warnings by fixing coding style issues.
Signed-off-by: Patryk Kocielnik <patryk.kocielnik@gmail.com>
---
drivers/staging/sm750fb/sm750.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index 67207b055..41beeb9b9 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -32,7 +32,7 @@
static int g_hwcursor = 1;
static int g_noaccel;
static int g_nomtrr;
-static const char *g_fbmode[] = {NULL, NULL};
+static const char * const g_fbmode[] = {NULL, NULL};
static const char *g_def_fbmode = "1024x768-32@60";
static char *g_settings;
static int g_dualview;
@@ -749,7 +749,7 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)
lynx750_ext, NULL, vesa_modes,
};
int cdb[] = {ARRAY_SIZE(lynx750_ext), 0, VESA_MODEDB_SIZE};
- static const char *mdb_desc[] = {
+ static const char * const mdb_desc[] = {
"driver prepared modes",
"kernel prepared default modedb",
"kernel HELPERS prepared vesa_modes",
--
2.14.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Staging: sm750fb: sm750: fixed coding style issues
2017-11-22 15:42 [PATCH] Staging: sm750fb: sm750: fixed coding style issues Patryk Kocielnik
@ 2017-11-22 16:03 ` Joe Perches
[not found] ` <CAGU7hBg+=QbhsS+eMiAhQTtr_R1B4u9hfyOH5KkGRSYat=fJSg@mail.gmail.com>
0 siblings, 1 reply; 4+ messages in thread
From: Joe Perches @ 2017-11-22 16:03 UTC (permalink / raw)
To: Patryk Kocielnik, sudipm.mukherjee; +Cc: devel, linux-kernel
On Wed, 2017-11-22 at 16:42 +0100, Patryk Kocielnik wrote:
> Cleaned checkpatch warnings by fixing coding style issues.
checkpatch is not always correct.
> Signed-off-by: Patryk Kocielnik <patryk.kocielnik@gmail.com>
> ---
> drivers/staging/sm750fb/sm750.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
[]
> @@ -32,7 +32,7 @@
> static int g_hwcursor = 1;
> static int g_noaccel;
> static int g_nomtrr;
> -static const char *g_fbmode[] = {NULL, NULL};
> +static const char * const g_fbmode[] = {NULL, NULL};
Make sure you compile any file modified by a patch
_before_ submitting the proposed patch.
> static const char *g_def_fbmode = "1024x768-32@60";
> static char *g_settings;
> static int g_dualview;
> @@ -749,7 +749,7 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)
> lynx750_ext, NULL, vesa_modes,
> };
> int cdb[] = {ARRAY_SIZE(lynx750_ext), 0, VESA_MODEDB_SIZE};
> - static const char *mdb_desc[] = {
> + static const char * const mdb_desc[] = {
> "driver prepared modes",
> "kernel prepared default modedb",
> "kernel HELPERS prepared vesa_modes",
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Staging: sm750fb: sm750: fixed coding style issues
[not found] ` <CAGU7hBg+=QbhsS+eMiAhQTtr_R1B4u9hfyOH5KkGRSYat=fJSg@mail.gmail.com>
@ 2017-11-22 17:35 ` Patryk Kocielnik
2017-11-22 17:45 ` Joe Perches
1 sibling, 0 replies; 4+ messages in thread
From: Patryk Kocielnik @ 2017-11-22 17:35 UTC (permalink / raw)
To: Joe Perches; +Cc: Sudip Mukherjee, devel, linux-kernel
Joe,
Thank you for your comments!
> checkpatch is not always correct.
I did compile it beforehand and it was clean. Did I miss anything?
Regards,
Patryk
On 22 November 2017 at 18:33, Patryk Kocielnik
<patryk.kocielnik@gmail.com> wrote:
> Joe,
>
> Thank you for your comments!
>
> I did compile it beforehand and it was clean. Did I miss anything?
>
> Regards,
> Patryk
>
> On 22 November 2017 at 17:03, Joe Perches <joe@perches.com> wrote:
>>
>> On Wed, 2017-11-22 at 16:42 +0100, Patryk Kocielnik wrote:
>> > Cleaned checkpatch warnings by fixing coding style issues.
>>
>> checkpatch is not always correct.
>>
>> > Signed-off-by: Patryk Kocielnik <patryk.kocielnik@gmail.com>
>> > ---
>> > drivers/staging/sm750fb/sm750.c | 4 ++--
>> > 1 file changed, 2 insertions(+), 2 deletions(-)
>> >
>> > diff --git a/drivers/staging/sm750fb/sm750.c
>> > b/drivers/staging/sm750fb/sm750.c
>> []
>> > @@ -32,7 +32,7 @@
>> > static int g_hwcursor = 1;
>> > static int g_noaccel;
>> > static int g_nomtrr;
>> > -static const char *g_fbmode[] = {NULL, NULL};
>> > +static const char * const g_fbmode[] = {NULL, NULL};
>>
>> Make sure you compile any file modified by a patch
>> _before_ submitting the proposed patch.
>>
>> > static const char *g_def_fbmode = "1024x768-32@60";
>> > static char *g_settings;
>> > static int g_dualview;
>> > @@ -749,7 +749,7 @@ static int lynxfb_set_fbinfo(struct fb_info *info,
>> > int index)
>> > lynx750_ext, NULL, vesa_modes,
>> > };
>> > int cdb[] = {ARRAY_SIZE(lynx750_ext), 0, VESA_MODEDB_SIZE};
>> > - static const char *mdb_desc[] = {
>> > + static const char * const mdb_desc[] = {
>> > "driver prepared modes",
>> > "kernel prepared default modedb",
>> > "kernel HELPERS prepared vesa_modes",
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Staging: sm750fb: sm750: fixed coding style issues
[not found] ` <CAGU7hBg+=QbhsS+eMiAhQTtr_R1B4u9hfyOH5KkGRSYat=fJSg@mail.gmail.com>
2017-11-22 17:35 ` Patryk Kocielnik
@ 2017-11-22 17:45 ` Joe Perches
1 sibling, 0 replies; 4+ messages in thread
From: Joe Perches @ 2017-11-22 17:45 UTC (permalink / raw)
To: Patryk Kocielnik; +Cc: Sudip Mukherjee, devel, linux-kernel
On Wed, 2017-11-22 at 18:33 +0100, Patryk Kocielnik wrote:
> Joe,
>
> Thank you for your comments!
>
> I did compile it beforehand and it was clean. Did I miss anything?
You also have to compile it afterhand...
i.e.: with your patch applied
$ make allyesconfig
[]
$ make drivers/staging/sm750fb/
[]
CC drivers/staging/sm750fb/sm750.o
drivers/staging/sm750fb/sm750.c: In function ‘lynxfb_set_fbinfo’:
drivers/staging/sm750fb/sm750.c:807:19: error: assignment of read-only location ‘g_fbmode[index]’
g_fbmode[index] = g_def_fbmode;
^
drivers/staging/sm750fb/sm750.c:809:20: error: assignment of read-only location ‘g_fbmode[index]’
g_fbmode[index] = g_fbmode[0];
^
drivers/staging/sm750fb/sm750.c: In function ‘sm750fb_setup’:
drivers/staging/sm750fb/sm750.c:978:17: error: assignment of read-only location ‘g_fbmode[0]’
g_fbmode[0] = opt;
^
drivers/staging/sm750fb/sm750.c:982:17: error: assignment of read-only location ‘g_fbmode[1]’
g_fbmode[1] = opt;
^
scripts/Makefile.build:310: recipe for target 'drivers/staging/sm750fb/sm750.o' failed
make[1]: *** [drivers/staging/sm750fb/sm750.o] Error 1
Makefile:1674: recipe for target 'drivers/staging/sm750fb/' failed
make: *** [drivers/staging/sm750fb/] Error 2
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-11-22 17:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-22 15:42 [PATCH] Staging: sm750fb: sm750: fixed coding style issues Patryk Kocielnik
2017-11-22 16:03 ` Joe Perches
[not found] ` <CAGU7hBg+=QbhsS+eMiAhQTtr_R1B4u9hfyOH5KkGRSYat=fJSg@mail.gmail.com>
2017-11-22 17:35 ` Patryk Kocielnik
2017-11-22 17:45 ` Joe Perches
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.