All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] QLGE: qlge_main: Fix style
@ 2021-12-01 14:39 Adam Kandur
  2021-12-01 14:53 ` Greg KH
  2021-12-03  8:14 ` Dan Carpenter
  0 siblings, 2 replies; 4+ messages in thread
From: Adam Kandur @ 2021-12-01 14:39 UTC (permalink / raw)
  To: netdev; +Cc: linux-staging, linux-kernel

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




[-- Attachment #2: 0001-QLGE-qlge_main-Fix-style.patch --]
[-- Type: application/octet-stream, Size: 2626 bytes --]

From 41266a72ae2ad8fb45e96e455c519177bfd23bc0 Mon Sep 17 00:00:00 2001
From: Adam Kandur <rndd@tuta.io>
Date: Wed, 1 Dec 2021 17:32:11 +0300
Subject: [PATCH] QLGE: qlge_main: Fix style

---
 drivers/staging/qlge/qlge_main.c | 28 +++++++++++++---------------
 1 file changed, 13 insertions(+), 15 deletions(-)

diff --git a/drivers/staging/qlge/qlge_main.c b/drivers/staging/qlge/qlge_main.c
index 9873bb2a9..c86e2a936 100644
--- a/drivers/staging/qlge/qlge_main.c
+++ b/drivers/staging/qlge/qlge_main.c
@@ -1200,11 +1200,11 @@ static void qlge_unmap_send(struct qlge_adapter *qdev,
 			 * element and there is more than 6 frags,
 			 * then its an OAL.
 			 */
-			if (i == 7) {
+			if (i == 7)
 				netif_printk(qdev, tx_done, KERN_DEBUG,
 					     qdev->ndev,
 					     "unmapping OAL area.\n");
-			}
+
 			dma_unmap_single(&qdev->pdev->dev,
 					 dma_unmap_addr(&tx_ring_desc->map[i],
 							mapaddr),
@@ -1236,10 +1236,10 @@ static int qlge_map_send(struct qlge_adapter *qdev,
 	struct tx_buf_desc *tbd = mac_iocb_ptr->tbd;
 	int frag_cnt = skb_shinfo(skb)->nr_frags;
 
-	if (frag_cnt) {
+	if (frag_cnt)
 		netif_printk(qdev, tx_queued, KERN_DEBUG, qdev->ndev,
 			     "frag_cnt = %d.\n", frag_cnt);
-	}
+
 	/*
 	 * Map the skb buffer first.
 	 */
@@ -3351,12 +3351,11 @@ static void qlge_free_irq(struct qlge_adapter *qdev)
 
 	for (i = 0; i < qdev->intr_count; i++, intr_context++) {
 		if (intr_context->hooked) {
-			if (test_bit(QL_MSIX_ENABLED, &qdev->flags)) {
+			if (test_bit(QL_MSIX_ENABLED, &qdev->flags))
 				free_irq(qdev->msi_x_entry[i].vector,
 					 &qdev->rx_ring[i]);
-			} else {
+			else
 				free_irq(qdev->pdev->irq, &qdev->rx_ring[0]);
-			}
 		}
 	}
 	qlge_disable_msix(qdev);
@@ -4128,22 +4127,21 @@ static void qlge_set_multicast_list(struct net_device *ndev)
 	if (ndev->flags & IFF_PROMISC) {
 		if (!test_bit(QL_PROMISCUOUS, &qdev->flags)) {
 			if (qlge_set_routing_reg
-			    (qdev, RT_IDX_PROMISCUOUS_SLOT, RT_IDX_VALID, 1)) {
+			    (qdev, RT_IDX_PROMISCUOUS_SLOT, RT_IDX_VALID, 1))
 				netif_err(qdev, hw, qdev->ndev,
 					  "Failed to set promiscuous mode.\n");
-			} else {
+			else
 				set_bit(QL_PROMISCUOUS, &qdev->flags);
-			}
-		}
 	} else {
 		if (test_bit(QL_PROMISCUOUS, &qdev->flags)) {
-			if (qlge_set_routing_reg
-			    (qdev, RT_IDX_PROMISCUOUS_SLOT, RT_IDX_VALID, 0)) {
+			if (qlge_set_routing_reg (qdev,
+						  RT_IDX_PROMISCUOUS_SLOT,
+						  RT_IDX_VALID,
+						  0))
 				netif_err(qdev, hw, qdev->ndev,
 					  "Failed to clear promiscuous mode.\n");
-			} else {
+			else
 				clear_bit(QL_PROMISCUOUS, &qdev->flags);
-			}
 		}
 	}
 
-- 
2.34.0


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

* Re: [PATCH] QLGE: qlge_main: Fix style
  2021-12-01 14:39 [PATCH] QLGE: qlge_main: Fix style Adam Kandur
@ 2021-12-01 14:53 ` Greg KH
  2021-12-03  8:14 ` Dan Carpenter
  1 sibling, 0 replies; 4+ messages in thread
From: Greg KH @ 2021-12-01 14:53 UTC (permalink / raw)
  To: Adam Kandur; +Cc: netdev, linux-staging, linux-kernel

On Wed, Dec 01, 2021 at 03:39:08PM +0100, Adam Kandur wrote:
> 
> 


Hi,

This is the friendly patch-bot of Greg Kroah-Hartman.  You have sent him
a patch that has triggered this response.  He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created.  Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.

You are receiving this message because of the following common error(s)
as indicated below:

- Your patch was attached, please place it inline so that it can be
  applied directly from the email message itself.

- Your patch does not have a Signed-off-by: line.  Please read the
  kernel file, Documentation/SubmittingPatches and resend it after
  adding that line.  Note, the line needs to be in the body of the
  email, before the patch, not at the bottom of the patch or in the
  email signature.

- Your patch did many different things all at once, making it difficult
  to review.  All Linux kernel patches need to only do one thing at a
  time.  If you need to do multiple things (such as clean up all coding
  style issues in a file/driver), do it in a sequence of patches, each
  one doing only one thing.  This will make it easier to review the
  patches to ensure that they are correct, and to help alleviate any
  merge issues that larger patches can cause.

- You did not specify a description of why the patch is needed, or
  possibly, any description at all, in the email body.  Please read the
  section entitled "The canonical patch format" in the kernel file,
  Documentation/SubmittingPatches for what is needed in order to
  properly describe the change.

- You did not write a descriptive Subject: for the patch, allowing Greg,
  and everyone else, to know what this patch is all about.  Please read
  the section entitled "The canonical patch format" in the kernel file,
  Documentation/SubmittingPatches for what a proper Subject: line should
  look like.

If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot

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

* Re: [PATCH] QLGE: qlge_main: Fix style
  2021-12-01 14:39 [PATCH] QLGE: qlge_main: Fix style Adam Kandur
  2021-12-01 14:53 ` Greg KH
@ 2021-12-03  8:14 ` Dan Carpenter
  2021-12-03  9:06   ` Adam Kandur
  1 sibling, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2021-12-03  8:14 UTC (permalink / raw)
  To: Adam Kandur; +Cc: netdev, linux-staging, linux-kernel

On Wed, Dec 01, 2021 at 03:39:08PM +0100, Adam Kandur wrote:
> 
> 

The original style was better.  Multi-line indents get curly braces for
readability even though they're not required by the C standard.

regards,
dan carpenter

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

* Re: [PATCH] QLGE: qlge_main: Fix style
  2021-12-03  8:14 ` Dan Carpenter
@ 2021-12-03  9:06   ` Adam Kandur
  0 siblings, 0 replies; 4+ messages in thread
From: Adam Kandur @ 2021-12-03  9:06 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: Netdev, Linux Staging, Linux Kernel

Thank you for the answer.



Dec 3, 2021, 11:14 by dan.carpenter@oracle.com:

> On Wed, Dec 01, 2021 at 03:39:08PM +0100, Adam Kandur wrote:
>
>>
>>
>
> The original style was better.  Multi-line indents get curly braces for
> readability even though they're not required by the C standard.
>
> regards,
> dan carpenter
>


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

end of thread, other threads:[~2021-12-03  9:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-01 14:39 [PATCH] QLGE: qlge_main: Fix style Adam Kandur
2021-12-01 14:53 ` Greg KH
2021-12-03  8:14 ` Dan Carpenter
2021-12-03  9:06   ` Adam Kandur

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.