Skip to contentSkip to conversation

Staging: mt7621-dma: Fix checkpatch issues

PATCH Superseded Bhanusree Pola 2 participants 6 messages Feb 23, 2019

Subsystems (2)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

cover Staging: mt7621-dma: Fix checkpatch issues

This patch series cleans up the following checkpatch.pl issues:
CHECK: Alignment should match open parenthesis
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'

Bhanusree Pola (2):
Staging: mt761-dma: Alignment should match open paranthesis
Staging: mt7621_dma: Prefer unsigned int over just unsigned

 drivers/staging/mt7621-dma/mtk-hsdma.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/2 Staging: mt761-dma: Alignment should match open paranthesis

Parameters are aligned such that it matches open paranthesis. Issue found with checkpatch.pl

---
 drivers/staging/mt7621-dma/mtk-hsdma.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/mt7621-dma/mtk-hsdma.c +3 -3
index d67a2504adb1..54bf89e2f629 100644
@@ -242,7 +242,7 @@ static void hsdma_dump_desc(struct mtk_hsdam_engine *hsdma,
 	int i;
 
 	dev_dbg(hsdma->ddev.dev, "tx idx: %d, rx idx: %d\n",
-			chan->tx_idx, chan->rx_idx);
+		chan->tx_idx, chan->rx_idx);
 
 	for (i = 0; i < HSDMA_DESCS_NUM; i++) {
 		tx_desc = &chan->tx_ring[i];
@@ -576,8 +576,8 @@ static void mtk_hsdam_free_desc(struct mtk_hsdam_engine *hsdma,
 {
 	if (chan->tx_ring) {
 		dma_free_coherent(hsdma->ddev.dev,
-				2 * HSDMA_DESCS_NUM * sizeof(*chan->tx_ring),
-				chan->tx_ring, chan->desc_addr);
+				  2 * HSDMA_DESCS_NUM * sizeof(*chan->tx_ring),
+				  chan->tx_ring, chan->desc_addr);
 		chan->tx_ring = NULL;
 		chan->rx_ring = NULL;
 	}
Signature · 1 line
2.17.1
#2 lore raw

PATCH 2/2 Staging: mt7621_dma: Prefer unsigned int over just unsigned

In reply to Bhanusree Pola

Fixes checkpatch.pl warning:
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'

---
 drivers/staging/mt7621-dma/mtk-hsdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/mt7621-dma/mtk-hsdma.c +1 -1
index 54bf89e2f629..fa7631cfbb78 100644
@@ -191,7 +191,7 @@ static inline u32 mtk_hsdma_read(struct mtk_hsdam_engine *hsdma, u32 reg)
 }
 
 static inline void mtk_hsdma_write(struct mtk_hsdam_engine *hsdma,
-				   unsigned reg, u32 val)
+				   unsigned int reg, u32 val)
 {
 	writel(val, hsdma->base + reg);
 }
Signature · 1 line
2.17.1
#3 lore raw

Re: [Outreachy kernel] [PATCH 2/2] Staging: mt7621_dma: Prefer unsigned int over just unsigned

Quoted 2 lines · Bhanusree Pola

Fixes checkpatch.pl warning:
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'

Log messages are supposed to be in the imperative. So here it should be "Fix ...". But it would be even better to come up with a description that says something other than Fix. Explain what you have done and why.

julia

Quoted 29 lines
---
 drivers/staging/mt7621-dma/mtk-hsdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/mt7621-dma/mtk-hsdma.c +1 -2
index 54bf89e2f629..fa7631cfbb78 100644
@@ -191,7 +191,7 @@ static inline u32 mtk_hsdma_read(struct mtk_hsdam_engine *hsdma, u32 reg)
 }
 
 static inline void mtk_hsdma_write(struct mtk_hsdam_engine *hsdma,
-				   unsigned reg, u32 val)
+				   unsigned int reg, u32 val)
 {
 	writel(val, hsdma->base + reg);
 }
--

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/20190223081941.9629-3-bhanusreemahesh%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

#4 lore raw

Re: [Outreachy kernel] [PATCH 2/2] Staging: mt7621_dma: Prefer unsigned int over just unsigned

Quoted 12 lines · Julia Lawall
Quoted 2 lines · Bhanusree Pola

Fixes checkpatch.pl warning:
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'

Log messages are supposed to be in the imperative. So here it should be "Fix ...". But it would be even better to come up with a description that says something other than Fix. Explain what you have done and why.

should i change the log message and resend it ?

Quoted 38 lines

julia

Quoted 22 lines
---
 drivers/staging/mt7621-dma/mtk-hsdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/mt7621-dma/mtk-hsdma.c +1 -2
index 54bf89e2f629..fa7631cfbb78 100644
@@ -191,7 +191,7 @@ static inline u32 mtk_hsdma_read(struct mtk_hsdam_engine *hsdma, u32 reg)
 }
 
 static inline void mtk_hsdma_write(struct mtk_hsdam_engine *hsdma,
-                                unsigned reg, u32 val)
+                                unsigned int reg, u32 val)
 {
      writel(val, hsdma->base + reg);
 }
--

2.17.1

Quoted 7 lines

--
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/20190223081941.9629-3-bhanusreemahesh%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
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/alpine.DEB.2.21.1902231506310.2551%40hadrien.
For more options, visit https://groups.google.com/d/optout.

#5 lore raw

Re: [Outreachy kernel] [PATCH 2/2] Staging: mt7621_dma: Prefer unsigned int over just unsigned

Quoted 6 lines · Bhanusree Mahesh
Quoted 5 lines · Julia Lawall

On Sat, 23 Feb 2019, Bhanusree Pola wrote:

Quoted 8 lines
Quoted 7 lines
Quoted 2 lines

Fixes checkpatch.pl warning:
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'

Log messages are supposed to be in the imperative. So here it should be "Fix ...". But it would be even better to come up with a description that says something other than Fix. Explain what you have done and why.

should i change the log message and resend it ?

Yes please.

julia

Quoted 47 lines
Quoted 25 lines

julia

Quoted 22 lines
---
 drivers/staging/mt7621-dma/mtk-hsdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/mt7621-dma/mtk-hsdma.c +1 -2
index 54bf89e2f629..fa7631cfbb78 100644
@@ -191,7 +191,7 @@ static inline u32 mtk_hsdma_read(struct mtk_hsdam_engine *hsdma, u32 reg)
 }
 
 static inline void mtk_hsdma_write(struct mtk_hsdam_engine *hsdma,
-                                unsigned reg, u32 val)
+                                unsigned int reg, u32 val)
 {
      writel(val, hsdma->base + reg);
 }
--

2.17.1

Quoted 14 lines
Quoted 7 lines

--
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/20190223081941.9629-3-bhanusreemahesh%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
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/alpine.DEB.2.21.1902231506310.2551%40hadrien.
For more options, visit https://groups.google.com/d/optout.

--
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/CAB0Mk-Nr3GrXEnVE4pdQG6snUpXq3pOqx%3D19nNpZYCDLEtcF4Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.