Thread (7 messages) flat view 7 messages, 3 authors, 2014-07-09

Re: [PATCH net-next 1/3 v4] pktgen: Fill the payload optionally with a pattern

From: David Miller <davem@davemloft.net>
Date: 2014-07-08 18:28:41
Also in: lkml

From: Zoltan Kiss <redacted>
Date: Wed, 2 Jul 2014 20:54:13 +0100
quoted hunk ↗ jump to hunk
@@ -1129,11 +1133,13 @@ static ssize_t pktgen_if_write(struct file *file,
 		i += len;
 
 		if (node_possible(value)) {
+			int j;
 			pkt_dev->node = value;
 			sprintf(pg_result, "OK: node=%d", pkt_dev->node);
-			if (pkt_dev->page) {
-				put_page(pkt_dev->page);
-				pkt_dev->page = NULL;
+			for (j = 0; j < MAX_SKB_FRAGS; ++j)
+				if (pkt_dev->pages[j]) {
+					put_page(pkt_dev->pages[j]);
+					pkt_dev->pages[j] = NULL;
 			}
 		}
I'm scratching my head with the bracing created here, and it's because
the indentation is wrong:

	for () /* <-- no openning curly brace */
		if () {
			x;
			y;
	} /* <-- thus, wrong indentation */

Please resubmit this series with this fixed and #3 adjusted as per the
feedback you've received.

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help