All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Staging:octeon:ethernet-rx.c: Fix comparison with constant warning
@ 2016-03-05  8:27 Muraru Mihaela
  2016-03-11 18:13 ` [Outreachy kernel] " Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Muraru Mihaela @ 2016-03-05  8:27 UTC (permalink / raw)
  To: outreachy-kernel

Fix the comparison with a constant on the left side, by checking if the
variable is not null

It also reduce to silence the checkpatch.pl warning.

Signed-off-by: Muraru Mihaela <mihaela.muraru21@gmail.com>
---
 drivers/staging/octeon/ethernet-rx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/octeon/ethernet-rx.c b/drivers/staging/octeon/ethernet-rx.c
index ed55304..b54b0b2 100644
--- a/drivers/staging/octeon/ethernet-rx.c
+++ b/drivers/staging/octeon/ethernet-rx.c
@@ -449,7 +449,7 @@ void cvm_oct_rx_initialize(void)
 		}
 	}
 
-	if (NULL == dev_for_napi)
+	if (!dev_for_napi)
 		panic("No net_devices were allocated.");
 
 	netif_napi_add(dev_for_napi, &cvm_oct_napi, cvm_oct_napi_poll,
-- 
1.9.1



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

* Re: [Outreachy kernel] [PATCH] Staging:octeon:ethernet-rx.c: Fix comparison with constant warning
  2016-03-05  8:27 [PATCH] Staging:octeon:ethernet-rx.c: Fix comparison with constant warning Muraru Mihaela
@ 2016-03-11 18:13 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2016-03-11 18:13 UTC (permalink / raw)
  To: Muraru Mihaela; +Cc: outreachy-kernel

On Sat, Mar 05, 2016 at 10:27:03AM +0200, Muraru Mihaela wrote:
> Fix the comparison with a constant on the left side, by checking if the
> variable is not null
> 
> It also reduce to silence the checkpatch.pl warning.
> 
> Signed-off-by: Muraru Mihaela <mihaela.muraru21@gmail.com>
> ---
>  drivers/staging/octeon/ethernet-rx.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Does not apply to my tree :(



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

end of thread, other threads:[~2016-03-11 18:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-05  8:27 [PATCH] Staging:octeon:ethernet-rx.c: Fix comparison with constant warning Muraru Mihaela
2016-03-11 18:13 ` [Outreachy kernel] " Greg KH

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.