mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] staging: unisys: visornic: Made comments look nicer
@ 2016-03-17  3:00 Gavin O'Leary
  2016-03-17  3:27 ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Gavin O'Leary @ 2016-03-17  3:00 UTC (permalink / raw)
  To: gregkh; +Cc: sparmaintainer, devel, linux-kernel, Gavin O'Leary

Made comments not break coding style guidlines and easier to read.

Signed-off-by: Gavin O'Leary <gavinoleary3@gmail.com>
---
 drivers/staging/unisys/visornic/visornic_main.c | 29 +++++++++++++++----------
 1 file changed, 17 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/unisys/visornic/visornic_main.c b/drivers/staging/unisys/visornic/visornic_main.c
index 0519470..50ad44e 100644
--- a/drivers/staging/unisys/visornic/visornic_main.c
+++ b/drivers/staging/unisys/visornic/visornic_main.c
@@ -1215,11 +1215,13 @@ visornic_rx(struct uiscmdrsp *cmdrsp)
 					"repost_return failed");
 			return rx_count;
 		}
-		/* length rcvd is greater than firstfrag in this skb rcv buf  */
-		skb->tail += RCVPOST_BUF_SIZE;	/* amount in skb->data */
-		skb->data_len = skb->len - RCVPOST_BUF_SIZE;	/* amount that
-								   will be in
-								   frag_list */
+		/* length rcvd is greater than firstfrag in this skb rcv buf*/
+
+		/*amount in skb->data */
+		skb->tail += RCVPOST_BUF_SIZE;
+
+		/* amount that will be in frag_list */
+		skb->data_len = skb->len - RCVPOST_BUF_SIZE;
 	} else {
 		/* data fits in this skb - no chaining - do
 		 * PRECAUTIONARY check
@@ -1313,14 +1315,18 @@ visornic_rx(struct uiscmdrsp *cmdrsp)
 						break;
 					}
 				}
+
+				/* accept packet, dest matches a multicast
+				 * address
+				 */
 				if (found_mc)
-					break;	/* accept packet, dest
-						   matches a multicast
-						   address */
+					break;
 			}
+
+		/* accept packet, dest matches a multicast address */
 		} else if (skb->pkt_type == PACKET_HOST) {
-			break;	/* accept packet, h_dest must match vnic
-				   mac address */
+			break;
+
 		} else if (skb->pkt_type == PACKET_OTHERHOST) {
 			/* something is not right */
 			dev_err(&devdata->netdev->dev,
@@ -1618,8 +1624,7 @@ service_resp_queue(struct uiscmdrsp *cmdrsp, struct visornic_devdata *devdata,
 	unsigned long flags;
 	struct net_device *netdev;
 
-	/* TODO: CLIENT ACQUIRE -- Don't really need this at the
-	 * moment */
+	/* TODO: CLIENT ACQUIRE -- Don't really need this at the moment */
 	for (;;) {
 		if (!visorchannel_signalremove(devdata->dev->visorchannel,
 					       IOCHAN_FROM_IOPART,
-- 
1.9.1

^ permalink raw reply	[flat|nested] 3+ messages in thread
* [PATCH] staging: unisys: visornic: Made comments look nicer
@ 2016-03-17  2:55 Gavin O'Leary
  0 siblings, 0 replies; 3+ messages in thread
From: Gavin O'Leary @ 2016-03-17  2:55 UTC (permalink / raw)
  To: gregk; +Cc: sparmaintainer, devel, linux-kernel, Gavin O'Leary

Made comments not break coding style guidlines and easier to read.

Signed-off-by: Gavin O'Leary <gavinoleary3@gmail.com>
---
 drivers/staging/unisys/visornic/visornic_main.c | 29 +++++++++++++++----------
 1 file changed, 17 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/unisys/visornic/visornic_main.c b/drivers/staging/unisys/visornic/visornic_main.c
index 0519470..50ad44e 100644
--- a/drivers/staging/unisys/visornic/visornic_main.c
+++ b/drivers/staging/unisys/visornic/visornic_main.c
@@ -1215,11 +1215,13 @@ visornic_rx(struct uiscmdrsp *cmdrsp)
 					"repost_return failed");
 			return rx_count;
 		}
-		/* length rcvd is greater than firstfrag in this skb rcv buf  */
-		skb->tail += RCVPOST_BUF_SIZE;	/* amount in skb->data */
-		skb->data_len = skb->len - RCVPOST_BUF_SIZE;	/* amount that
-								   will be in
-								   frag_list */
+		/* length rcvd is greater than firstfrag in this skb rcv buf*/
+
+		/*amount in skb->data */
+		skb->tail += RCVPOST_BUF_SIZE;
+
+		/* amount that will be in frag_list */
+		skb->data_len = skb->len - RCVPOST_BUF_SIZE;
 	} else {
 		/* data fits in this skb - no chaining - do
 		 * PRECAUTIONARY check
@@ -1313,14 +1315,18 @@ visornic_rx(struct uiscmdrsp *cmdrsp)
 						break;
 					}
 				}
+
+				/* accept packet, dest matches a multicast
+				 * address
+				 */
 				if (found_mc)
-					break;	/* accept packet, dest
-						   matches a multicast
-						   address */
+					break;
 			}
+
+		/* accept packet, dest matches a multicast address */
 		} else if (skb->pkt_type == PACKET_HOST) {
-			break;	/* accept packet, h_dest must match vnic
-				   mac address */
+			break;
+
 		} else if (skb->pkt_type == PACKET_OTHERHOST) {
 			/* something is not right */
 			dev_err(&devdata->netdev->dev,
@@ -1618,8 +1624,7 @@ service_resp_queue(struct uiscmdrsp *cmdrsp, struct visornic_devdata *devdata,
 	unsigned long flags;
 	struct net_device *netdev;
 
-	/* TODO: CLIENT ACQUIRE -- Don't really need this at the
-	 * moment */
+	/* TODO: CLIENT ACQUIRE -- Don't really need this at the moment */
 	for (;;) {
 		if (!visorchannel_signalremove(devdata->dev->visorchannel,
 					       IOCHAN_FROM_IOPART,
-- 
1.9.1

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

end of thread, other threads:[~2016-03-17  3:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-17  3:00 [PATCH] staging: unisys: visornic: Made comments look nicer Gavin O'Leary
2016-03-17  3:27 ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2016-03-17  2:55 Gavin O'Leary

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®