Skip to contentSkip to conversation

Staging: wilc1000: wilc_wfi_cfgoperations: Fixed a coding style issue

PATCH In review Santha Meena Ramamoorthy 2 participants 2 messages Feb 18, 2018 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: wilc1000: wilc_wfi_cfgoperations: Fixed a coding style issue

Fixed the checkpatch warning "braces {} are not necessary for single statement blocks"

---
 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +1 -2
index 621810d..df04bf80 100644
@@ -287,9 +287,8 @@ static void remove_network_from_shadow(struct timer_list *unused)
 		}
 	}
 
-	if (last_scanned_cnt != 0) {
+	if (last_scanned_cnt != 0)
 		mod_timer(&hAgingTimer, jiffies + msecs_to_jiffies(AGING_TIME));
-	}
 }
 
 static void clear_duringIP(struct timer_list *unused)
Signature · 1 line
2.7.4
#1 lore raw
Quoted 2 lines · Santha Meena Ramamoorthy

Fixed the checkpatch warning "braces {} are not necessary for single statement blocks"

Thank you for your patch.

The change is fine, but the subject line and commit message could be improved. For the subject line, there are two parts: where the change is and what is done. For the where the change is part, there is no algorithm. You need to see what others have done on this file. You can do that by saying git log --oneline on the file name. Typically, the actual file name is not included.

Then for describing what is done, the word "fix" is not very helpful. It doesn't indicate how the fix was done. In this case you could say Remove unneeded braces.

Then in the commit message you can provide more information about what you have done and why. In this case, it could be something like "Remove braces around a single-statement block to conform to the Linux kernel coding style. Problem found using checkpatch."

Please send a v2.

julia

Quoted 31 lines
---
 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +1 -3
index 621810d..df04bf80 100644
@@ -287,9 +287,8 @@ static void remove_network_from_shadow(struct timer_list *unused)
 		}
 	}
 
-	if (last_scanned_cnt != 0) {
+	if (last_scanned_cnt != 0)
 		mod_timer(&hAgingTimer, jiffies + msecs_to_jiffies(AGING_TIME));
-	}
 }
 
 static void clear_duringIP(struct timer_list *unused)
--

2.7.4

--
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/1518949244-48499-1-git-send-email-santhameena13%40gmail.com.
For more options, visit https://groups.google.com/d/optout.