staging/fbtft: Hush checkpatch.pl warning about unnecessary line continuations.
Subsystems (2)
PATCH 1/1 staging/fbtft: Hush checkpatch.pl warning about unnecessary line continuations.
Use a single fmt string with appropriate verbs as conversion specifiers, followed by the original string literals and the integer argument instead of using a backslash to escape a new line embedded inbetween quoted string literals passed as fmt arguments to dev_err() invoked in drivers/staging/fbtft/fb_ssd1331.c.
--- drivers/staging/fbtft/fb_ssd1331.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
drivers/staging/fbtft/fb_ssd1331.c +8 -6
@@ -129,17 +129,19 @@ static int set_gamma(struct fbtft_par *par, u32 *curves)for (i =0 ; i <63 ; i++) {if (i >0 && curves[i] <2 ) { -dev_err (par->info->device, -"Illegal value in Grayscale Lookup Table at index %d. " \ -"Must be greater than 1\n" , i); +dev_err (par->info->device,"%s %d. %s\n" , +"Illegal value in Grayscale Lookup Table at index" , + i, +"Must be greater than 1" );return -EINVAL ; } acc += curves[i]; tmp[i] = acc;if (acc >180 ) { -dev_err (par->info->device, -"Illegal value(s) in Grayscale Lookup Table. " \ -"At index=%d, the accumulated value has exceeded 180\n" , i); +dev_err (par->info->device,"%s%d, %s\n" , +"Illegal value(s) in Grayscale Lookup Table. At index=" , + i, +"the accumulated value has exceeded 180" );return -EINVAL ; } }
Signature · 1 line
2.10.2
Quoted 5 lines · Alexander Kapshuk
Use a single fmt string with appropriate verbs as conversion specifiers, followed by the original string literals and the integer argument instead of using a backslash to escape a new line embedded inbetween quoted string literals passed as fmt arguments to
dev_err()invoked indrivers/staging/fbtft/fb_ssd1331.c.
trivia:
drivers/staging/fbtft/fb_ssd1331.c static int set_gamma(struct fbtft_par *par, u32 *curves) · line 133
Quoted 13 lines
drivers/staging/fbtft/fb_ssd1331.c +2
-3@@ -129,17 +129,19 @@ static int set_gamma(struct fbtft_par *par, u32 *curves)for (i =0 ; i <63 ; i++) {if (i >0 && curves[i] <2 ) { -dev_err (par->info->device, -"Illegal value in Grayscale Lookup Table at index %d. " \ -"Must be greater than 1\n" , i); + dev_err(par->info->device, "%s %d. %s\n", + "Illegal value in Grayscale Lookup Table at index",
Most prefer the use of invalid not illegal.
Quoted 15 lines · Joe Perches
Quoted 5 lines · Alexander Kapshuk
Use a single fmt string with appropriate verbs as conversion specifiers, followed by the original string literals and the integer argument instead of using a backslash to escape a new line embedded inbetween quoted string literals passed as fmt arguments to
dev_err()invoked indrivers/staging/fbtft/fb_ssd1331.c.trivia:
Quoted 6 lines
drivers/staging/fbtft/fb_ssd1331.c +0
-0@@ -129,17 +129,19 @@ static int set_gamma(struct fbtft_par *par, u32 *curves)
Quoted 10 lines
drivers/staging/fbtft/fb_ssd1331.c static int set_gamma(struct fbtft_par *par, u32 *curves) · line 133
Quoted 7 lines
drivers/staging/fbtft/fb_ssd1331.c +2
-3for (i =0 ; i <63 ; i++) {if (i >0 && curves[i] <2 ) { -dev_err (par->info->device, -"Illegal value in Grayscale Lookup Table at index %d. " \ -"Must be greater than 1\n" , i); + dev_err(par->info->device, "%s %d. %s\n", + "Illegal value in Grayscale Lookup Table at index",Most prefer the use of invalid not illegal.
Thanks for your feedback.
I don't mind substituting invalid for illegal, unless the maintainers preferred to do that themselves instead.
My patch was addressing a checkpatch.pl warning only.
I'll wait a bit more to hear from the maintainers, before going ahead and sending another patch in.
Thanks.
Greg KH
maintainerQuoted 16 lines · Alexander Kapshuk
Use a single fmt string with appropriate verbs as conversion specifiers, followed by the original string literals and the integer argument instead of using a backslash to escape a new line embedded inbetween quoted string literals passed as fmt arguments to
dev_err()invoked indrivers/staging/fbtft/fb_ssd1331.c.Signed-off-by Alexander Kapshuk <[email protected]>--- drivers/staging/fbtft/fb_ssd1331.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)drivers/staging/fbtft/fb_ssd1331.c +0
-0
drivers/staging/fbtft/fb_ssd1331.c static int set_gamma(struct fbtft_par *par, u32 *curves) · line 135
Quoted 10 lines
drivers/staging/fbtft/fb_ssd1331.c +4
-3@@ -129,17 +129,19 @@ static int set_gamma(struct fbtft_par *par, u32 *curves)for (i =0 ; i <63 ; i++) {if (i >0 && curves[i] <2 ) { -dev_err (par->info->device, -"Illegal value in Grayscale Lookup Table at index %d. " \ -"Must be greater than 1\n" , i); +dev_err (par->info->device,"%s %d. %s\n" , +"Illegal value in Grayscale Lookup Table at index" , + i, +"Must be greater than 1" );
Huh? This should just be:
"Illegal value in Grayscale Lookup Table at index %d. Must be greater than 1\n", i);
Don't split the string for no good reason.
drivers/staging/fbtft/fb_ssd1331.c static int set_gamma(struct fbtft_par *par, u32 *curves) · line 144
Quoted 12 lines
drivers/staging/fbtft/fb_ssd1331.c +4
-3return -EINVAL ; } acc += curves[i]; tmp[i] = acc;if (acc >180 ) { -dev_err (par->info->device, -"Illegal value(s) in Grayscale Lookup Table. " \ -"At index=%d, the accumulated value has exceeded 180\n" , i); +dev_err (par->info->device,"%s%d, %s\n" , +"Illegal value(s) in Grayscale Lookup Table. At index=" , + i, +"the accumulated value has exceeded 180" );
Same here.
please fix.
thanks,
greg k-h
PATCH 1/1 staging/fbtft: Hush checkpatch.pl warning about unnecessary line continuations
Use a single string literal as the fmt argument passed to dev_err() instead of multiple string literals split with an embedded backslash character.
--- drivers/staging/fbtft/fb_ssd1331.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/fbtft/fb_ssd1331.c +4 -4
@@ -130,16 +130,16 @@ static int set_gamma(struct fbtft_par *par, u32 *curves)for (i =0 ; i <63 ; i++) {if (i >0 && curves[i] <2 ) {dev_err (par->info->device, -"Illegal value in Grayscale Lookup Table at index %d. " \ -"Must be greater than 1\n" , i); +"Illegal value in Grayscale Lookup Table at index %d. Must be greater than 1\n" , + i);return -EINVAL ; } acc += curves[i]; tmp[i] = acc;if (acc >180 ) {dev_err (par->info->device, -"Illegal value(s) in Grayscale Lookup Table. " \ -"At index=%d, the accumulated value has exceeded 180\n" , i); +"Illegal value(s) in Grayscale Lookup Table. At index=%d, the accumulated value has exceeded 180\n" , + i);return -EINVAL ; } }
Signature · 1 line
2.10.2