All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] staging: hp100: Remove spaces and extra blank lines
@ 2020-03-25  7:28 Soumyajit Deb
  2020-03-25  7:29 ` [PATCH 1/6] staging: hp100: Properly indent the multiline comment Soumyajit Deb
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Soumyajit Deb @ 2020-03-25  7:28 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: gregkh, perex, sbrivio, Soumyajit Deb

This patchset properly indents the multiline comments, add blank line
between end of multiline comment "*/" and function definition, correct
typo in comment,remove space after * in pointer declarations,add space
after "," in function arguments and remove space after opening
parenthesis "(" in if statement for the same file hp100.c present under 
drivers/staging/hp directory.

Soumyajit Deb (6):
  staging: hp100: Properly indent the multiline comment
  staging: hp100: Add blank line between end of comment and function
    definition
  Correct typo in the comment
  staging: hp100: Remove space after * in pointer declaration.
  Staging: hp100: Add space after "," in function arguments.
  staging: hp100: Remove space after opening parenthesis "("

 drivers/staging/hp/hp100.c | 33 +++++++++++++++++++++++----------
 1 file changed, 23 insertions(+), 10 deletions(-)

-- 
2.17.1



^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/6] staging: hp100: Properly indent the multiline comment
  2020-03-25  7:28 [PATCH 0/6] staging: hp100: Remove spaces and extra blank lines Soumyajit Deb
@ 2020-03-25  7:29 ` Soumyajit Deb
  2020-03-25 12:38   ` Greg KH
  2020-03-25  7:29 ` [PATCH 2/6] staging: hp100: Add blank line between end of comment and function definition Soumyajit Deb
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 10+ messages in thread
From: Soumyajit Deb @ 2020-03-25  7:29 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: gregkh, perex, sbrivio, Soumyajit Deb

Shifted the end of multiline comment "*/" to next line.
Reported by checkpatch.pl

Signed-off-by: Soumyajit Deb <debsoumyajit100@gmail.com>
---
 drivers/staging/hp/hp100.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/hp/hp100.c b/drivers/staging/hp/hp100.c
index 67320292d254..d421b2978ae6 100644
--- a/drivers/staging/hp/hp100.c
+++ b/drivers/staging/hp/hp100.c
@@ -262,7 +262,9 @@ static void hp100_RegisterDump(struct net_device *dev);
  * This work *only* for memory fragments part of lp->page_vaddr,
  * because it was properly DMA allocated via pci_alloc_consistent(),
  * so we just need to "retrieve" the original mapping to bus/phys/dma
- * address - Jean II */
+ * address - Jean II
+ */
+
 static inline dma_addr_t virt_to_whatever(struct net_device *dev, u32 *ptr)
 {
 	struct hp100_private *lp = netdev_priv(dev);
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/6] staging: hp100: Add blank line between end of comment and function definition
  2020-03-25  7:28 [PATCH 0/6] staging: hp100: Remove spaces and extra blank lines Soumyajit Deb
  2020-03-25  7:29 ` [PATCH 1/6] staging: hp100: Properly indent the multiline comment Soumyajit Deb
@ 2020-03-25  7:29 ` Soumyajit Deb
  2020-03-25 12:39   ` Greg KH
  2020-03-25  7:29 ` [PATCH 3/6] staging: hp100: Correct typo in the comment Soumyajit Deb
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 10+ messages in thread
From: Soumyajit Deb @ 2020-03-25  7:29 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: gregkh, perex, sbrivio, Soumyajit Deb

Add blank line after end of multiline comment "*/" and start of function
definition for better readability of the code.
Reported by checkpatch.pl

Signed-off-by: Soumyajit Deb <debsoumyajit100@gmail.com>
---
 drivers/staging/hp/hp100.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/staging/hp/hp100.c b/drivers/staging/hp/hp100.c
index d421b2978ae6..0614366ef914 100644
--- a/drivers/staging/hp/hp100.c
+++ b/drivers/staging/hp/hp100.c
@@ -348,6 +348,7 @@ static __init int hp100_isa_probe1(struct net_device *dev, int ioaddr)
  err:
 	return -ENODEV;
 }
+
 /*
  * Probe for ISA board.
  * EISA and PCI are handled by device infrastructure.
@@ -1095,6 +1096,7 @@ static int hp100_open(struct net_device *dev)
 }
 
 /* The close function is called when the interface is to be brought down */
+
 static int hp100_close(struct net_device *dev)
 {
 	int ioaddr = dev->base_addr;
@@ -1128,6 +1130,7 @@ static int hp100_close(struct net_device *dev)
 /*
  * Configure the PDL Rx rings and LAN
  */
+
 static void hp100_init_pdls(struct net_device *dev)
 {
 	struct hp100_private *lp = netdev_priv(dev);
@@ -1177,6 +1180,7 @@ static void hp100_init_pdls(struct net_device *dev)
 
 /* These functions "format" the entries in the pdl structure   */
 /* They return how much memory the fragments need.            */
+
 static int hp100_init_rxpdl(struct net_device *dev,
 			    register hp100_ring_t * ringptr,
 			    register u32 * pdlptr)
@@ -1226,6 +1230,7 @@ static int hp100_init_txpdl(struct net_device *dev,
  * Returns: 0 if unable to allocate skb_buff
  *          1 if successful
  */
+
 static int hp100_build_rx_pdl(hp100_ring_t * ringptr,
 			      struct net_device *dev)
 {
@@ -1308,6 +1313,7 @@ static int hp100_build_rx_pdl(hp100_ring_t * ringptr,
  *      b.  Put the physical address of the buffer into the PDL.
  *      c.  Output physical address of PDL to adapter.
  */
+
 static void hp100_rxfill(struct net_device *dev)
 {
 	int ioaddr = dev->base_addr;
@@ -1455,6 +1461,7 @@ static int hp100_check_lan(struct net_device *dev)
  */
 
 /* tx function for busmaster mode */
+
 static netdev_tx_t hp100_start_xmit_bm(struct sk_buff *skb,
 				       struct net_device *dev)
 {
@@ -1570,6 +1577,7 @@ static netdev_tx_t hp100_start_xmit_bm(struct sk_buff *skb,
  *
  * Needs the PERFORMANCE page selected.
  */
+
 static void hp100_clean_txring(struct net_device *dev)
 {
 	struct hp100_private *lp = netdev_priv(dev);
@@ -1605,6 +1613,7 @@ static void hp100_clean_txring(struct net_device *dev)
 }
 
 /* tx function for slave modes */
+
 static netdev_tx_t hp100_start_xmit(struct sk_buff *skb,
 				    struct net_device *dev)
 {
@@ -1838,6 +1847,7 @@ static void hp100_rx(struct net_device *dev)
 /*
  * Receive Function for Busmaster Mode
  */
+
 static void hp100_rx_bm(struct net_device *dev)
 {
 	int ioaddr = dev->base_addr;
@@ -2408,6 +2418,7 @@ static void hp100_load_eeprom(struct net_device *dev, u_short probe_ioaddr)
  *                 LAN_100 - Connected to 100Mbit/s network
  *                 LAN_ERR - not connected or 100Mbit/s Hub down
  */
+
 static int hp100_sense_lan(struct net_device *dev)
 {
 	int ioaddr = dev->base_addr;
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 3/6] staging: hp100: Correct typo in the comment
  2020-03-25  7:28 [PATCH 0/6] staging: hp100: Remove spaces and extra blank lines Soumyajit Deb
  2020-03-25  7:29 ` [PATCH 1/6] staging: hp100: Properly indent the multiline comment Soumyajit Deb
  2020-03-25  7:29 ` [PATCH 2/6] staging: hp100: Add blank line between end of comment and function definition Soumyajit Deb
@ 2020-03-25  7:29 ` Soumyajit Deb
  2020-03-25  7:29 ` [PATCH 4/6] staging: hp100: Remove space after * in pointer declaration Soumyajit Deb
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Soumyajit Deb @ 2020-03-25  7:29 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: gregkh, perex, sbrivio, Soumyajit Deb

Correct typo in the comment by changing "overriden" to "overridden".
Reported by checkpatch.pl

Signed-off-by: Soumyajit Deb <debsoumyajit100@gmail.com>
---
 drivers/staging/hp/hp100.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/hp/hp100.c b/drivers/staging/hp/hp100.c
index 0614366ef914..3ff037430f3c 100644
--- a/drivers/staging/hp/hp100.c
+++ b/drivers/staging/hp/hp100.c
@@ -2443,7 +2443,7 @@ static int hp100_sense_lan(struct net_device *dev)
 
 	if (val_10 & HP100_AUI_ST) {	/* have we BNC or AUI onboard? */
 		/*
-		 * This can be overriden by dos utility, so if this has no effect,
+		 * This can be overridden by dos utility, so if this has no effect,
 		 * perhaps you need to download that utility from HP and set card
 		 * back to "auto detect".
 		 */
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 4/6] staging: hp100: Remove space after * in pointer declaration.
  2020-03-25  7:28 [PATCH 0/6] staging: hp100: Remove spaces and extra blank lines Soumyajit Deb
                   ` (2 preceding siblings ...)
  2020-03-25  7:29 ` [PATCH 3/6] staging: hp100: Correct typo in the comment Soumyajit Deb
@ 2020-03-25  7:29 ` Soumyajit Deb
  2020-03-25  7:29 ` [PATCH 5/6] Staging: hp100: Add space after "," in function arguments Soumyajit Deb
  2020-03-25  7:29 ` [PATCH 6/6] staging: hp100: Remove space after opening parenthesis "(" Soumyajit Deb
  5 siblings, 0 replies; 10+ messages in thread
From: Soumyajit Deb @ 2020-03-25  7:29 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: gregkh, perex, sbrivio, Soumyajit Deb

Remove space after * in pointer declaration to improve code readability
and to adhere to the standard coding style.
Reported by checkpatch.pl

Signed-off-by: Soumyajit Deb <debsoumyajit100@gmail.com>
---
 drivers/staging/hp/hp100.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/hp/hp100.c b/drivers/staging/hp/hp100.c
index 3ff037430f3c..f76e6b39b12d 100644
--- a/drivers/staging/hp/hp100.c
+++ b/drivers/staging/hp/hp100.c
@@ -1182,8 +1182,8 @@ static void hp100_init_pdls(struct net_device *dev)
 /* They return how much memory the fragments need.            */
 
 static int hp100_init_rxpdl(struct net_device *dev,
-			    register hp100_ring_t * ringptr,
-			    register u32 * pdlptr)
+			    register hp100_ring_t *ringptr,
+			    register u32 *pdlptr)
 {
 	/* pdlptr is starting address for this pdl */
 
@@ -1210,8 +1210,8 @@ static int hp100_init_rxpdl(struct net_device *dev,
 }
 
 static int hp100_init_txpdl(struct net_device *dev,
-			    register hp100_ring_t * ringptr,
-			    register u32 * pdlptr)
+			    register hp100_ring_t *ringptr,
+			    register u32 *pdlptr)
 {
 	if (0 != (((unsigned long) pdlptr) & 0xf))
 		printk("hp100: %s: Init txpdl: Unaligned pdlptr 0x%lx.\n", dev->name, (unsigned long) pdlptr);
@@ -1231,7 +1231,7 @@ static int hp100_init_txpdl(struct net_device *dev,
  *          1 if successful
  */
 
-static int hp100_build_rx_pdl(hp100_ring_t * ringptr,
+static int hp100_build_rx_pdl(hp100_ring_t *ringptr,
 			      struct net_device *dev)
 {
 #ifdef HP100_DEBUG_B
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 5/6] Staging: hp100: Add space after "," in function arguments.
  2020-03-25  7:28 [PATCH 0/6] staging: hp100: Remove spaces and extra blank lines Soumyajit Deb
                   ` (3 preceding siblings ...)
  2020-03-25  7:29 ` [PATCH 4/6] staging: hp100: Remove space after * in pointer declaration Soumyajit Deb
@ 2020-03-25  7:29 ` Soumyajit Deb
  2020-03-25  7:29 ` [PATCH 6/6] staging: hp100: Remove space after opening parenthesis "(" Soumyajit Deb
  5 siblings, 0 replies; 10+ messages in thread
From: Soumyajit Deb @ 2020-03-25  7:29 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: gregkh, perex, sbrivio, Soumyajit Deb

Add space after "," in function arguments to improve code readability.
Reported by checkpatch.pl

Signed-off-by: Soumyajit Deb <debsoumyajit100@gmail.com>
---
 drivers/staging/hp/hp100.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/hp/hp100.c b/drivers/staging/hp/hp100.c
index f76e6b39b12d..bc8bb48956c8 100644
--- a/drivers/staging/hp/hp100.c
+++ b/drivers/staging/hp/hp100.c
@@ -1804,7 +1804,7 @@ static void hp100_rx(struct net_device *dev)
 
 			u_char *ptr;
 
-			skb_reserve(skb,2);
+			skb_reserve(skb, 2);
 
 			/* ptr to start of the sk_buff data area */
 			skb_put(skb, pkt_len);
@@ -1812,7 +1812,7 @@ static void hp100_rx(struct net_device *dev)
 
 			/* Now transfer the data from the card into that area */
 			if (lp->mode == 2)
-				memcpy_fromio(ptr, lp->mem_ptr_virt,pkt_len);
+				memcpy_fromio(ptr, lp->mem_ptr_virt, pkt_len);
 			else	/* io mapped */
 				insl(ioaddr + HP100_REG_DATA32, ptr, pkt_len >> 2);
 
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 6/6] staging: hp100: Remove space after opening parenthesis "("
  2020-03-25  7:28 [PATCH 0/6] staging: hp100: Remove spaces and extra blank lines Soumyajit Deb
                   ` (4 preceding siblings ...)
  2020-03-25  7:29 ` [PATCH 5/6] Staging: hp100: Add space after "," in function arguments Soumyajit Deb
@ 2020-03-25  7:29 ` Soumyajit Deb
  5 siblings, 0 replies; 10+ messages in thread
From: Soumyajit Deb @ 2020-03-25  7:29 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: gregkh, perex, sbrivio, Soumyajit Deb

Remove space after opening parenthesis in if statement to improve code
readability and to adhere to the standard coding style.
Reported by checkpatch.pl

Signed-off-by: Soumyajit Deb <debsoumyajit100@gmail.com>
---
 drivers/staging/hp/hp100.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/hp/hp100.c b/drivers/staging/hp/hp100.c
index bc8bb48956c8..16fe9c7879cf 100644
--- a/drivers/staging/hp/hp100.c
+++ b/drivers/staging/hp/hp100.c
@@ -2455,7 +2455,7 @@ static int hp100_sense_lan(struct net_device *dev)
 	}
 
 	/* Those cards don't have a 100 Mbit connector */
-	if ( !strcmp(lp->id, "HWP1920")  ||
+	if (!strcmp(lp->id, "HWP1920")  ||
 	     (lp->pci_dev &&
 	      lp->pci_dev->vendor == PCI_VENDOR_ID &&
 	      (lp->pci_dev->device == PCI_DEVICE_ID_HP_J2970A ||
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/6] staging: hp100: Properly indent the multiline comment
  2020-03-25  7:29 ` [PATCH 1/6] staging: hp100: Properly indent the multiline comment Soumyajit Deb
@ 2020-03-25 12:38   ` Greg KH
       [not found]     ` <CAMS7mKDKRoNEGZbaLf5pkLfU=e9RZp17DJx1TEyyJsWW18gvBw@mail.gmail.com>
  0 siblings, 1 reply; 10+ messages in thread
From: Greg KH @ 2020-03-25 12:38 UTC (permalink / raw)
  To: Soumyajit Deb; +Cc: outreachy-kernel, perex, sbrivio

On Wed, Mar 25, 2020 at 12:59:00PM +0530, Soumyajit Deb wrote:
> Shifted the end of multiline comment "*/" to next line.
> Reported by checkpatch.pl
> 
> Signed-off-by: Soumyajit Deb <debsoumyajit100@gmail.com>
> ---
>  drivers/staging/hp/hp100.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/hp/hp100.c b/drivers/staging/hp/hp100.c
> index 67320292d254..d421b2978ae6 100644
> --- a/drivers/staging/hp/hp100.c
> +++ b/drivers/staging/hp/hp100.c
> @@ -262,7 +262,9 @@ static void hp100_RegisterDump(struct net_device *dev);
>   * This work *only* for memory fragments part of lp->page_vaddr,
>   * because it was properly DMA allocated via pci_alloc_consistent(),
>   * so we just need to "retrieve" the original mapping to bus/phys/dma
> - * address - Jean II */
> + * address - Jean II
> + */
> +

Why did you add the blank line here?  The comment is describing the
function:

>  static inline dma_addr_t virt_to_whatever(struct net_device *dev, u32 *ptr)

So it should be right up next to it.

thanks,

greg k-h


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/6] staging: hp100: Add blank line between end of comment and function definition
  2020-03-25  7:29 ` [PATCH 2/6] staging: hp100: Add blank line between end of comment and function definition Soumyajit Deb
@ 2020-03-25 12:39   ` Greg KH
  0 siblings, 0 replies; 10+ messages in thread
From: Greg KH @ 2020-03-25 12:39 UTC (permalink / raw)
  To: Soumyajit Deb; +Cc: outreachy-kernel, perex, sbrivio

On Wed, Mar 25, 2020 at 12:59:01PM +0530, Soumyajit Deb wrote:
> Add blank line after end of multiline comment "*/" and start of function
> definition for better readability of the code.
> Reported by checkpatch.pl
> 
> Signed-off-by: Soumyajit Deb <debsoumyajit100@gmail.com>
> ---
>  drivers/staging/hp/hp100.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/drivers/staging/hp/hp100.c b/drivers/staging/hp/hp100.c
> index d421b2978ae6..0614366ef914 100644
> --- a/drivers/staging/hp/hp100.c
> +++ b/drivers/staging/hp/hp100.c
> @@ -348,6 +348,7 @@ static __init int hp100_isa_probe1(struct net_device *dev, int ioaddr)
>   err:
>  	return -ENODEV;
>  }
> +
>  /*
>   * Probe for ISA board.
>   * EISA and PCI are handled by device infrastructure.
> @@ -1095,6 +1096,7 @@ static int hp100_open(struct net_device *dev)
>  }
>  
>  /* The close function is called when the interface is to be brought down */
> +
>  static int hp100_close(struct net_device *dev)

No, please do not add a blank line here, the comment describes the
function.  Not very well, but that's a different story :)

thanks,

greg k-h


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/6] staging: hp100: Properly indent the multiline comment
       [not found]       ` <20200325140828.GA3533410@kroah.com>
@ 2020-03-25 14:12         ` Soumyajit Deb
  0 siblings, 0 replies; 10+ messages in thread
From: Soumyajit Deb @ 2020-03-25 14:12 UTC (permalink / raw)
  To: Greg KH; +Cc: outreachy-kernel, perex, sbrivio

[-- Attachment #1: Type: text/plain, Size: 983 bytes --]

Sorry,I didn't know that reply has to be on the mailing list too.
Will keep that in mind from now on.
Thank you.

On Wed, 25 Mar 2020 at 19:38, Greg KH <gregkh@linuxfoundation.org> wrote:

> On Wed, Mar 25, 2020 at 06:15:42PM +0530, Soumyajit Deb wrote:
> > Okay, I will remove the blank line and send the v2 of this patch.
> > Thank You
>
> <snip>
>
> For some reason you sent this only to me, which is a bit rude to
> everyone else on the mailing list.  I'll be glad to respond if you
> resend it to everyone.
>
> thanks,
>
> greg k-h
>
>
>
>
> Great question, care to ask this on the XXXXXXXX mailing list and CC me?
> That
> way I can answer it in public to enable everyone else to know the answer,
> and
> let the search engines pick it up.
>
> Also, please read the following two links on why it is not good to
> directly email people:
>         http://www.arm.linux.org.uk/news/?newsitem=11
>         http://www.eyrie.org/~eagle/faqs/questions.html
>
> thanks,
>
> greg k-h
>

[-- Attachment #2: Type: text/html, Size: 1615 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-03-25 14:12 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-25  7:28 [PATCH 0/6] staging: hp100: Remove spaces and extra blank lines Soumyajit Deb
2020-03-25  7:29 ` [PATCH 1/6] staging: hp100: Properly indent the multiline comment Soumyajit Deb
2020-03-25 12:38   ` Greg KH
     [not found]     ` <CAMS7mKDKRoNEGZbaLf5pkLfU=e9RZp17DJx1TEyyJsWW18gvBw@mail.gmail.com>
     [not found]       ` <20200325140828.GA3533410@kroah.com>
2020-03-25 14:12         ` Soumyajit Deb
2020-03-25  7:29 ` [PATCH 2/6] staging: hp100: Add blank line between end of comment and function definition Soumyajit Deb
2020-03-25 12:39   ` Greg KH
2020-03-25  7:29 ` [PATCH 3/6] staging: hp100: Correct typo in the comment Soumyajit Deb
2020-03-25  7:29 ` [PATCH 4/6] staging: hp100: Remove space after * in pointer declaration Soumyajit Deb
2020-03-25  7:29 ` [PATCH 5/6] Staging: hp100: Add space after "," in function arguments Soumyajit Deb
2020-03-25  7:29 ` [PATCH 6/6] staging: hp100: Remove space after opening parenthesis "(" Soumyajit Deb

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.