Skip to contentSkip to conversation

staging: rts5208: Fix long line in C func call argument

PATCH Superseded R Veera Kumar 2 participants 4 messages Mar 14, 2020 Staging

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: rts5208: Fix long line in C func call argument

A simple fix of long line in C function call argument. Found using checkpatch.pl.

---
 drivers/staging/rts5208/rtsx_chip.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/rts5208/rtsx_chip.c +2 -1
index 17c4131f5f62..c6f9375468eb 100644
@@ -940,7 +940,8 @@ static void rtsx_monitor_aspm_config(struct rtsx_chip *chip)
 		if (maybe_support_aspm)
 			chip->aspm_l0s_l1_en = 0x03;
 
-		dev_dbg(rtsx_dev(chip), "aspm_level[0] = 0x%02x, aspm_level[1] = 0x%02x\n",
+		dev_dbg(rtsx_dev(chip),
+			"aspm_level[0] = 0x%02x, aspm_level[1] = 0x%02x\n",
 			chip->aspm_level[0], chip->aspm_level[1]);
 
 		if (chip->aspm_l0s_l1_en) {
Signature · 1 line
2.20.1
#1 lore raw
Quoted 1 line · R Veera Kumar

A simple fix of long line in C function call argument.

Try to rewrite the whole thing without using the word "fix". What did you do and why?

Simple is not a good word to use, because it is your opinion. It is probably everyone's opinion in this case, but it is still an opinion.

julia

Quoted 29 lines

Found using checkpatch.pl.

---
 drivers/staging/rts5208/rtsx_chip.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/rts5208/rtsx_chip.c +2 -2
index 17c4131f5f62..c6f9375468eb 100644
@@ -940,7 +940,8 @@ static void rtsx_monitor_aspm_config(struct rtsx_chip *chip)
 		if (maybe_support_aspm)
 			chip->aspm_l0s_l1_en = 0x03;
 
-		dev_dbg(rtsx_dev(chip), "aspm_level[0] = 0x%02x, aspm_level[1] = 0x%02x\n",
+		dev_dbg(rtsx_dev(chip),
+			"aspm_level[0] = 0x%02x, aspm_level[1] = 0x%02x\n",
 			chip->aspm_level[0], chip->aspm_level[1]);
 
 		if (chip->aspm_l0s_l1_en) {
--

2.20.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 view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20200314060539.GA2709%40tulip.local.

#2 lore raw
Quoted 6 lines · Julia Lawall
Quoted 1 line · R Veera Kumar

A simple fix of long line in C function call argument.

Quoted 8 lines

Try to rewrite the whole thing without using the word "fix". What did you do and why?

Simple is not a good word to use, because it is your opinion. It is probably everyone's opinion in this case, but it is still an opinion.

julia

Is subject line ok? I mean the word 'fix' in it.

Is this ok for body:

A correction of long line function call with arguments exceeding the 80 columns limit of coding style.

Quoted 25 lines
Quoted 25 lines

Found using checkpatch.pl.

---
 drivers/staging/rts5208/rtsx_chip.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/rts5208/rtsx_chip.c +2 -2
index 17c4131f5f62..c6f9375468eb 100644
@@ -940,7 +940,8 @@ static void rtsx_monitor_aspm_config(struct rtsx_chip *chip)
 		if (maybe_support_aspm)
 			chip->aspm_l0s_l1_en = 0x03;
 
-		dev_dbg(rtsx_dev(chip), "aspm_level[0] = 0x%02x, aspm_level[1] = 0x%02x\n",
+		dev_dbg(rtsx_dev(chip),
+			"aspm_level[0] = 0x%02x, aspm_level[1] = 0x%02x\n",
 			chip->aspm_level[0], chip->aspm_level[1]);
 
 		if (chip->aspm_l0s_l1_en) {
--

2.20.1

#3 lore raw
Quoted 16 lines · R Veera Kumar
Quoted 6 lines · Julia Lawall
Quoted 1 line · R Veera Kumar

A simple fix of long line in C function call argument.

Quoted 8 lines

Try to rewrite the whole thing without using the word "fix". What did you do and why?

Simple is not a good word to use, because it is your opinion. It is probably everyone's opinion in this case, but it is still an opinion.

julia

Quoted 6 lines

Is subject line ok? I mean the word 'fix' in it.

Is this ok for body:

A correction of long line function call with arguments exceeding the 80 columns limit of coding style.

No.

What you did: add a newline after the first argument Why did you do it: respect the 80 character line limit

I guess one could live with Fix in the subject line, but the current subject line is too verbose. All of the code in the kernel is C code, for example, so there is not much point to mention that. Something like "shorten long line" would be fine.

julia

Quoted 27 lines
Quoted 26 lines
Quoted 26 lines

Found using checkpatch.pl.

---
 drivers/staging/rts5208/rtsx_chip.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/rts5208/rtsx_chip.c +2 -2
index 17c4131f5f62..c6f9375468eb 100644
@@ -940,7 +940,8 @@ static void rtsx_monitor_aspm_config(struct rtsx_chip *chip)
 		if (maybe_support_aspm)
 			chip->aspm_l0s_l1_en = 0x03;
 
-		dev_dbg(rtsx_dev(chip), "aspm_level[0] = 0x%02x, aspm_level[1] = 0x%02x\n",
+		dev_dbg(rtsx_dev(chip),
+			"aspm_level[0] = 0x%02x, aspm_level[1] = 0x%02x\n",
 			chip->aspm_level[0], chip->aspm_level[1]);
 
 		if (chip->aspm_l0s_l1_en) {
--

2.20.1