partition: Remove trailing spaces and correct indenting
PATCH 1/1 partition: Remove trailing spaces and correct indenting
Reply-To:
Quoted 2 lines
remove trailing spaces
correct indenting
--- block/partitions/mac.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
block/partitions/mac.c +3 -5
@@ -97,16 +97,14 @@ int mac_partition(struct parsed_partitions *state)int goodness =0 ;mac_fix_string (part->processor,16 ); -mac_fix_string (part->name,32 ); -mac_fix_string (part->type,32 ); - +mac_fix_string (part->name,32 );mac_fix_string (part->type,32 );if ((be32_to_cpu (part->status) &MAC_STATUS_BOOTABLE ) &&strcasecmp (part->processor,"powerpc" ) ==0 ) goodness++;if (strcasecmp (part->type,"Apple_UNIX_SVR2" ) ==0 - || (strncasecmp (part->type,"Linux" ,5 ) ==0 - &&strcasecmp (part->type,"Linux_swap" ) !=0 )) { + || (strncasecmp (part->type,"Linux" ,5 ) ==0 + &&strcasecmp (part->type,"Linux_swap" ) !=0 )) {int i, l; goodness++;
Signature · 1 line
2.7.4
Quoted 1 line · kidega
Reply-To:
It seems this is your first attempt to patch something in the linux kernel.
You should read https://kernelnewbies.org/ and you should start with files in drivers/staging.
The Reply-To: line should not exist here
Quoted 2 lines
Quoted 2 lines
remove trailing spaces
correct indenting
The leading "> " uses should not exist here.
Quoted 1 line
Signed-off-by kidega <[email protected]>
You need your full legal name here.
block/partitions/mac.c
Quoted 1 line
block/partitions/mac.c +0
-0
This file probably does not need style changes as it's pretty old and unlikely to change.
But if it did:
block/partitions/mac.c int mac_partition(struct parsed_partitions *state) · line 100
Quoted 8 lines
block/partitions/mac.c +1
-3@@ -97,16 +97,14 @@ int mac_partition(struct parsed_partitions *state)int goodness =0 ;mac_fix_string (part->processor,16 ); -mac_fix_string (part->name,32 ); -mac_fix_string (part->type,32 ); - +mac_fix_string (part->name,32 );mac_fix_string (part->type,32 );
This needs separate lines for each single statement.
block/partitions/mac.c int mac_partition(struct parsed_partitions *state) · line 107
Quoted 9 lines
block/partitions/mac.c +2
-2if ((be32_to_cpu (part->status) &MAC_STATUS_BOOTABLE ) &&strcasecmp (part->processor,"powerpc" ) ==0 ) goodness++;if (strcasecmp (part->type,"Apple_UNIX_SVR2" ) ==0 - || (strncasecmp (part->type,"Linux" ,5 ) ==0 - &&strcasecmp (part->type,"Linux_swap" ) !=0 )) { + || (strncasecmp (part->type,"Linux" ,5 ) ==0 + &&strcasecmp (part->type,"Linux_swap" ) !=0 )) {
This is making the indentation worse as the parenthesized sub-test block is now unaligned.
And some would prefer moving the && || to the end of the previous line like:
--- block/partitions/mac.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
block/partitions/mac.c +7 -7
@@ -98,15 +98,15 @@ int mac_partition(struct parsed_partitions *state)mac_fix_string (part->processor,16 );mac_fix_string (part->name,32 ); -mac_fix_string (part->type,32 ); - -if ((be32_to_cpu (part->status) &MAC_STATUS_BOOTABLE ) - &&strcasecmp (part->processor,"powerpc" ) ==0 ) +mac_fix_string (part->type,32 ); + +if ((be32_to_cpu (part->status) &MAC_STATUS_BOOTABLE ) && +strcasecmp (part->processor,"powerpc" ) ==0 ) goodness++; -if (strcasecmp (part->type,"Apple_UNIX_SVR2" ) ==0 - || (strncasecmp (part->type,"Linux" ,5 ) ==0 - &&strcasecmp (part->type,"Linux_swap" ) !=0 )) { +if (strcasecmp (part->type,"Apple_UNIX_SVR2" ) ==0 || + (strncasecmp (part->type,"Linux" ,5 ) ==0 && +strcasecmp (part->type,"Linux_swap" ) !=0 )) {int i, l; goodness++;