netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers:net:ifb: Fixed coding style error:assignment in if statement
@ 2013-08-19 23:39 Sanil Kumar D
  2013-08-21  6:34 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Sanil Kumar D @ 2013-08-19 23:39 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-kernel, Sanil Kumar D

Fixed coding style error (assignment within if statement at 2 places in drivers/net/ifb.c)

Signed-off-by: Sanil Kumar D <skd.linux@gmail.com>
---
 drivers/net/ifb.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ifb.c b/drivers/net/ifb.c
index a3bed28..f3fa85a 100644
--- a/drivers/net/ifb.c
+++ b/drivers/net/ifb.c
@@ -68,7 +68,8 @@ static void ri_tasklet(unsigned long dev)
 	struct sk_buff *skb;
 
 	txq = netdev_get_tx_queue(_dev, 0);
-	if ((skb = skb_peek(&dp->tq)) == NULL) {
+	skb = skb_peek(&dp->tq);
+	if (skb == NULL) {
 		if (__netif_tx_trylock(txq)) {
 			skb_queue_splice_tail_init(&dp->rq, &dp->tq);
 			__netif_tx_unlock(txq);
@@ -112,7 +113,8 @@ static void ri_tasklet(unsigned long dev)
 	}
 
 	if (__netif_tx_trylock(txq)) {
-		if ((skb = skb_peek(&dp->rq)) == NULL) {
+		skb = skb_peek(&dp->rq);
+		if (skb == NULL) {
 			dp->tasklet_pending = 0;
 			if (netif_queue_stopped(_dev))
 				netif_wake_queue(_dev);
-- 
1.7.9.5

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

* Re: [PATCH] drivers:net:ifb: Fixed coding style error:assignment in if statement
  2013-08-19 23:39 [PATCH] drivers:net:ifb: Fixed coding style error:assignment in if statement Sanil Kumar D
@ 2013-08-21  6:34 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-08-21  6:34 UTC (permalink / raw)
  To: skd.linux; +Cc: netdev, linux-kernel

From: Sanil Kumar D <skd.linux@gmail.com>
Date: Tue, 20 Aug 2013 05:09:37 +0530

> +	if (skb == NULL) {

"!skb" is preferred.

> +		if (skb == NULL) {

Likewise.

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

end of thread, other threads:[~2013-08-21  6:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-19 23:39 [PATCH] drivers:net:ifb: Fixed coding style error:assignment in if statement Sanil Kumar D
2013-08-21  6:34 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).