Skip to contentSkip to conversation

staging: greybus: Add blank line after struct declaration

PATCH Superseded Dorine Tipo 3 participants 4 messages Mar 10, 2024 – Mar 11, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: greybus: Add blank line after struct declaration

Add a blank line after the loopback_class struct declaration to silence checkpatch warning Please use a blank line after function/struct/union/enum declarations.

---
 drivers/staging/greybus/loopback.c | 1 +
 1 file changed, 1 insertion(+)
drivers/staging/greybus/loopback.c +1 -0
index bb33379b5297..4313d3bbc23a 100644
@@ -101,6 +101,7 @@ struct gb_loopback {
 static struct class loopback_class = {
 	.name		= "gb_loopback",
 };
+
 static DEFINE_IDA(loopback_ida);
 
 /* Min/max values in jiffies */

--
2.25.1

#1 lore raw

PATCH v2 1/1 staging: greybus: Add blank line after struct declaration

Add a blank line after the loopback_class struct declaration to improve code readability and adherence to coding style guidelines

---
Changes in v2:
- Make the commit message clearer

 drivers/staging/greybus/loopback.c | 1 +
 1 file changed, 1 insertion(+)
drivers/staging/greybus/loopback.c +1 -0
index bb33379b5297..4313d3bbc23a 100644
@@ -101,6 +101,7 @@ struct gb_loopback {
 static struct class loopback_class = {
 	.name		= "gb_loopback",
 };
+
 static DEFINE_IDA(loopback_ida);
 
 /* Min/max values in jiffies */

--
2.25.1

Acked-by on v2 1/1
#2 lore raw
Quoted 4 lines · Dorine Tipo

Add a blank line after the loopback_class struct declaration to improve code readability and adherence to coding style guidelines

Quoted 24 lines

---
Changes in v2:
- Make the commit message clearer

 drivers/staging/greybus/loopback.c | 1 +
 1 file changed, 1 insertion(+)
drivers/staging/greybus/loopback.c +1 -1
index bb33379b5297..4313d3bbc23a 100644
@@ -101,6 +101,7 @@ struct gb_loopback {
 static struct class loopback_class = {
 	.name		= "gb_loopback",
 };
+
 static DEFINE_IDA(loopback_ida);
 
 /* Min/max values in jiffies */
--

2.25.1

#3 lore raw
In reply to Dorine Tipo
Quoted 2 lines · Dorine Tipo

Add a blank line after the loopback_class struct declaration to silence checkpatch warning Please use a blank line after

Hi Dorine,

I think you have a few patches posted where using a similar phrase '...to silence checkpatch warning'.

The phrase is awkward because we never have a goal of silencing any warnings. We 'address' them. This checkpatch warning is reporting something that does not adhere to the kernel coding style. So, more fitting to say - "...to adhere to the kernel coding style." Adding 'Issue found using checkpatch' or the actual checkpatch warnging is commonly added.

When you are addressing checkpatch warnings, you can bet you are not the first one to address it. So, you can search on previous commit messages and see what was well received, and if you search on Lore history, you can also see what was not well received. The Outreachy mailing list is a treasure trove of checkpatch commits.

This, linked in the First Patch Tutorial, is helpful -
https://kernelnewbies.org/PatchPhilosophy

- Alison

Quoted 23 lines

function/struct/union/enum declarations.

---
 drivers/staging/greybus/loopback.c | 1 +
 1 file changed, 1 insertion(+)
drivers/staging/greybus/loopback.c +1 -1
index bb33379b5297..4313d3bbc23a 100644
@@ -101,6 +101,7 @@ struct gb_loopback {
 static struct class loopback_class = {
 	.name		= "gb_loopback",
 };
+
 static DEFINE_IDA(loopback_ida);
 
 /* Min/max values in jiffies */
--

2.25.1