Staging: slicoss: Fix quoted sting split across the line
PATCH 1/1 Staging: slicoss: Fix quoted sting split across the line
This patch fixes the warning issued by checkpatch.pl by adding split string with '+'.
--- drivers/staging/slicoss/slicoss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/slicoss/slicoss.c +1 -1
@@ -99,7 +99,7 @@#include "slic.h" static uint slic_first_init =1 ; -static char *slic_banner ="Alacritech SLIC Technology(tm) Server " +static char *slic_banner ="Alacritech SLIC Technology(tm) Server" +"and Storage Accelerator (Non-Accelerated)" ;static char *slic_proc_version ="2.0.351 2006/07/14 12:26:00" ;
Signature · 1 line
1.9.1
Quoted 13 lines · Ksenija Stanojevic
This patch fixes the warning issued by checkpatch.pl by adding split string with '+'.
Signed-off-by Ksenija Stanojevic <[email protected]>--- drivers/staging/slicoss/slicoss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/slicoss/slicoss.c +0
-0
drivers/staging/slicoss/slicoss.c line 103
Quoted 6 lines
drivers/staging/slicoss/slicoss.c +1
-1@@ -99,7 +99,7 @@#include "slic.h" static uint slic_first_init =1 ; -static char *slic_banner ="Alacritech SLIC Technology(tm) Server " +static char *slic_banner ="Alacritech SLIC Technology(tm) Server" +"and Storage Accelerator (Non-Accelerated)" ;
+ is not the way of concatenating strings in C. It will just add the pointers together. And if it did work, you would have removed the space between Server and and. Checkpatch is suggesting that you just concatenate the strings to make one big string, even though it will exceed 80 columns. The idea is that the ability to grep for the string, without worrying about where it is cut up, is more beneficial than respecting 80 columns in this case.
julia
Quoted 12 lines
drivers/staging/slicoss/slicoss.c +0
-1static char *slic_proc_version ="2.0.351 2006/07/14 12:26:00" ; --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/1424710271-3310-1-git-send-email-ksenija.stanojevic%40gmail.com.
For more options, visit https://groups.google.com/d/optout.