Skip to contentSkip to conversation

Staging: gasket: gasket_interuppt.c: Fix string split issue.

PATCH Superseded Sanjana Sanikommu 3 participants 5 messages Mar 17, 2019 – Mar 18, 2019 Staging

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: gasket: gasket_interuppt.c: Fix string split issue.

Remove string " across the line.
Issue found by checkpatch.pl semantic patch results for rtw_ap.c

---
 drivers/staging/gasket/gasket_interrupt.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/gasket/gasket_interrupt.c +4 -4
index ff61b782df30..da517c2990ea 100644
@@ -97,8 +97,8 @@ static void gasket_interrupt_setup(struct gasket_dev *gasket_dev)
 		 * modify-write and shift based on the packing index.
 		 */
 		dev_dbg(gasket_dev->dev,
-			"Setting up interrupt index %d with index 0x%llx and "
-			"packing %d\n",
+			"Setting up interrupt index %d with index 0x%llx and
+			packing %d\n",
 			interrupt_data->interrupts[i].index,
 			interrupt_data->interrupts[i].reg,
 			interrupt_data->interrupts[i].packing);
@@ -120,8 +120,8 @@ static void gasket_interrupt_setup(struct gasket_dev *gasket_dev)
 				break;
 			default:
 				dev_dbg(gasket_dev->dev,
-					"Found interrupt description with "
-					"unknown enum %d\n",
+					"Found interrupt description with
+					unknown enum %d\n",
 					interrupt_data->interrupts[i].packing);
 				return;
 			}
Signature · 1 line
2.17.1
#1 lore raw
Quoted 2 lines · Sanjana Sanikommu

Remove string " across the line.
Issue found by checkpatch.pl semantic patch results for rtw_ap.c

You should put the whole string on a single line, even if it goes over 80 characters. Then if someone sees the string in debugging output, they can use grep to find where the issue occurred, without worrying about line breaks.

julia

Quoted 42 lines
---
 drivers/staging/gasket/gasket_interrupt.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/gasket/gasket_interrupt.c +4 -5
index ff61b782df30..da517c2990ea 100644
@@ -97,8 +97,8 @@ static void gasket_interrupt_setup(struct gasket_dev *gasket_dev)
 		 * modify-write and shift based on the packing index.
 		 */
 		dev_dbg(gasket_dev->dev,
-			"Setting up interrupt index %d with index 0x%llx and "
-			"packing %d\n",
+			"Setting up interrupt index %d with index 0x%llx and
+			packing %d\n",
 			interrupt_data->interrupts[i].index,
 			interrupt_data->interrupts[i].reg,
 			interrupt_data->interrupts[i].packing);
@@ -120,8 +120,8 @@ static void gasket_interrupt_setup(struct gasket_dev *gasket_dev)
 				break;
 			default:
 				dev_dbg(gasket_dev->dev,
-					"Found interrupt description with "
-					"unknown enum %d\n",
+					"Found interrupt description with
+					unknown enum %d\n",
 					interrupt_data->interrupts[i].packing);
 				return;
 			}
--

2.17.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/20190317173107.3814-1-sanjana99reddy99%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

#2 lore raw
Quoted 5 lines · Julia Lawall

On Sun, 17 Mar 2019, Sanjana Sanikommu wrote:

Quoted 8 lines
Quoted 2 lines

Remove string " across the line.
Issue found by checkpatch.pl semantic patch results for rtw_ap.c

You should put the whole string on a single line, even if it goes over 80 characters. Then if someone sees the string in debugging output, they can use grep to find where the issue occurred, without worrying about line breaks.

Sure I would be putting whole string in single lline. Thank you
Sanjana.

Quoted 60 lines

julia

Review

Quoted 7 lines
Signed-off-by Sanjana Sanikommu <[email protected] <javascript:>>

---

 drivers/staging/gasket/gasket_interrupt.c | 8 ++++---- 
 1 file changed, 4 insertions(+), 4 deletions(-) 
(quoted diff) +0 -0

b/drivers/staging/gasket/gasket_interrupt.c

drivers/staging/gasket/gasket_interrupt.c static void gasket_interrupt_setup(struct gasket_dev

Quoted 4 lines

index ff61b782df30..da517c2990ea 100644

drivers/staging/gasket/gasket_interrupt.c +0 -0
@@ -97,8 +97,8 @@ static void gasket_interrupt_setup(struct gasket_dev 

*gasket_dev)

drivers/staging/gasket/gasket_interrupt.c static void gasket_interrupt_setup(struct gasket_dev *gasket_dev)

Quoted 4 lines
drivers/staging/gasket/gasket_interrupt.c +0 -1
                  * modify-write and shift based on the packing index. 
                  */ 
                 dev_dbg(gasket_dev->dev, 
-                        "Setting up interrupt index %d with index 

0x%llx and "

drivers/staging/gasket/gasket_interrupt.c static void gasket_interrupt_setup(struct gasket_dev · line 100

Quoted 2 lines
drivers/staging/gasket/gasket_interrupt.c +1 -1
-                        "packing %d\n", 
+                        "Setting up interrupt index %d with index 

0x%llx and

drivers/staging/gasket/gasket_interrupt.c static void gasket_interrupt_setup(struct gasket_dev

Quoted 5 lines
drivers/staging/gasket/gasket_interrupt.c +1 -0
+                        packing %d\n", 
                         interrupt_data->interrupts[i].index, 
                         interrupt_data->interrupts[i].reg, 
                         interrupt_data->interrupts[i].packing); 
@@ -120,8 +120,8 @@ static void gasket_interrupt_setup(struct gasket_dev 

*gasket_dev)

drivers/staging/gasket/gasket_interrupt.c static void gasket_interrupt_setup(struct gasket_dev *gasket_dev)

Quoted 4 lines
drivers/staging/gasket/gasket_interrupt.c +0 -1
                                 break; 
                         default: 
                                 dev_dbg(gasket_dev->dev, 
-                                        "Found interrupt description 

with "

drivers/staging/gasket/gasket_interrupt.c static void gasket_interrupt_setup(struct gasket_dev · line 123

Quoted 2 lines
drivers/staging/gasket/gasket_interrupt.c +1 -1
-                                        "unknown enum %d\n", 
+                                        "Found interrupt description 

with

drivers/staging/gasket/gasket_interrupt.c static void gasket_interrupt_setup(struct gasket_dev · line 125

Quoted 2 lines
drivers/staging/gasket/gasket_interrupt.c +1 -0
+                                        unknown enum %d\n", 
 
                                         interrupt_data->interrupts[i].packing); 
Quoted 7 lines
drivers/staging/gasket/gasket_interrupt.c +0 -0
                                 return; 
                         } 
Signature · 4 lines
2.17.1 

-- 
You received this message because you are subscribed to the Google 

Groups "outreachy-kernel" group.

Quoted 1 line

To unsubscribe from this group and stop receiving emails from it, send

an email to [email protected] <javascript:>.

Quoted 1 line

To post to this group, send email to [email protected]

<javascript:>.

Quoted 1 line

To view this discussion on the web visit

https://groups.google.com/d/msgid/outreachy-kernel/20190317173107.3814-1-sanjana99reddy99%40gmail.com.

Quoted 2 lines

For more options, visit https://groups.google.com/d/optout.

maintainer
#3 lore raw
In reply to Sanjana Sanikommu
Quoted 13 lines · Sanjana Sanikommu

Remove string " across the line.
Issue found by checkpatch.pl semantic patch results for rtw_ap.c

---
 drivers/staging/gasket/gasket_interrupt.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/gasket/gasket_interrupt.c +0 -0
index ff61b782df30..da517c2990ea 100644

drivers/staging/gasket/gasket_interrupt.c static void gasket_interrupt_setup(struct gasket_dev *gasket_dev) · line 101

Quoted 7 lines
drivers/staging/gasket/gasket_interrupt.c +2 -2
@@ -97,8 +97,8 @@ static void gasket_interrupt_setup(struct gasket_dev *gasket_dev)
 		 * modify-write and shift based on the packing index.
 		 */
 		dev_dbg(gasket_dev->dev,
-			"Setting up interrupt index %d with index 0x%llx and "
-			"packing %d\n",
+			"Setting up interrupt index %d with index 0x%llx and
+			packing %d\n",

That did not do what you think it did :(

Are you familiar with how C treats strings?

thanks,

greg k-h

#4 lore raw
Quoted 22 lines · gregkh

Review

Quoted 9 lines · Sanjana Sanikommu

Remove string " across the line.
Issue found by checkpatch.pl semantic patch results for rtw_ap.c

Signed-off-by Sanjana Sanikommu <[email protected] <javascript:>>

---

 drivers/staging/gasket/gasket_interrupt.c | 8 ++++---- 
 1 file changed, 4 insertions(+), 4 deletions(-) 
(quoted diff) +0 -0

b/drivers/staging/gasket/gasket_interrupt.c

drivers/staging/gasket/gasket_interrupt.c static void gasket_interrupt_setup(struct gasket_dev

Quoted 4 lines

index ff61b782df30..da517c2990ea 100644

drivers/staging/gasket/gasket_interrupt.c +0 -0
@@ -97,8 +97,8 @@ static void gasket_interrupt_setup(struct gasket_dev 

*gasket_dev)

drivers/staging/gasket/gasket_interrupt.c static void gasket_interrupt_setup(struct gasket_dev *gasket_dev)

Quoted 4 lines
drivers/staging/gasket/gasket_interrupt.c +0 -1
                  * modify-write and shift based on the packing index. 
                  */ 
                 dev_dbg(gasket_dev->dev, 
-                        "Setting up interrupt index %d with index 

0x%llx and "

Quoted 9 lines

drivers/staging/gasket/gasket_interrupt.c static void gasket_interrupt_setup(struct gasket_dev · line 100

Quoted 2 lines
drivers/staging/gasket/gasket_interrupt.c +1 -1
-                        "packing %d\n", 
+                        "Setting up interrupt index %d with index 

0x%llx and

drivers/staging/gasket/gasket_interrupt.c static void gasket_interrupt_setup(struct gasket_dev *gasket_dev) · line 101

Quoted 1 line
drivers/staging/gasket/gasket_interrupt.c +1 -0
+                        packing %d\n", 

That did not do what you think it did :(

Are you familiar with how C treats strings?

1. Yes, I am familiar how strings are treated in C. In this case I was
confused
by also considering the warning. I thought not raise new bugs by
fixing the present ones.

2. I corrected them v2 but has few typo. I would send them in v3.

Thank you

Sanjana

Quoted 5 lines

thanks,

greg k-h