Netdev List
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Mitch Williams <mitch.a.williams@intel.com>,
	netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com,
	jogreene@redhat.com, Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next v2 13/15] i40evf: make comparisons consistent
Date: Thu, 20 Nov 2014 15:09:11 -0800	[thread overview]
Message-ID: <1416524953-15161-14-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1416524953-15161-1-git-send-email-jeffrey.t.kirsher@intel.com>

From: Mitch Williams <mitch.a.williams@intel.com>

Most of the null-checking in this driver is of the style if (!foo),
except these few. Make these checks consistent with the rest of the
code.

Change-ID: I991924f34072fa607a1b626a8b3f1fa5195d43e9
Reported-by: Joe Perches <joe@perches.com>
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/i40evf/i40evf_main.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index 777d3a5..233710c 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -669,9 +669,9 @@ i40evf_vlan_filter *i40evf_add_vlan(struct i40evf_adapter *adapter, u16 vlan)
 	struct i40evf_vlan_filter *f;
 
 	f = i40evf_find_vlan(adapter, vlan);
-	if (NULL == f) {
+	if (!f) {
 		f = kzalloc(sizeof(*f), GFP_ATOMIC);
-		if (NULL == f)
+		if (!f)
 			return NULL;
 
 		f->vlan = vlan;
@@ -774,9 +774,9 @@ i40evf_mac_filter *i40evf_add_filter(struct i40evf_adapter *adapter,
 		udelay(1);
 
 	f = i40evf_find_filter(adapter, macaddr);
-	if (NULL == f) {
+	if (!f) {
 		f = kzalloc(sizeof(*f), GFP_ATOMIC);
-		if (NULL == f) {
+		if (!f) {
 			clear_bit(__I40EVF_IN_CRITICAL_TASK,
 				  &adapter->crit_section);
 			return NULL;
@@ -2138,7 +2138,7 @@ static void i40evf_init_task(struct work_struct *work)
 	ether_addr_copy(netdev->perm_addr, adapter->hw.mac.addr);
 
 	f = kzalloc(sizeof(*f), GFP_ATOMIC);
-	if (NULL == f)
+	if (!f)
 		goto err_sw_init;
 
 	ether_addr_copy(f->macaddr, adapter->hw.mac.addr);
-- 
1.9.3

  parent reply	other threads:[~2014-11-20 23:09 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-20 23:08 [net-next v2 00/15][pull request] Intel Wired LAN Driver Updates 2014-11-20 Jeff Kirsher
2014-11-20 23:08 ` [net-next v2 01/15] ixgbevf: Update ixgbevf_alloc_rx_buffers to handle clearing of status bits Jeff Kirsher
2014-11-20 23:09 ` [net-next v2 02/15] ixgbevf: Test Rx status bits directly out of the descriptor Jeff Kirsher
2014-11-20 23:09 ` [net-next v2 03/15] ixgbevf: Combine the logic for post Rx processing into single function Jeff Kirsher
2014-11-20 23:09 ` [net-next v2 04/15] ixgbevf: Cleanup variable usage, improve stack performance Jeff Kirsher
2014-11-20 23:09 ` [net-next v2 05/15] ixgbevf: reorder main loop in ixgbe_clean_rx_irq to allow for do/while/continue Jeff Kirsher
2014-11-20 23:09 ` [net-next v2 06/15] ixgbevf: Update Rx next to clean in real time Jeff Kirsher
2014-11-20 23:09 ` [net-next v2 07/15] ixgbevf: Change receive model to use double buffered page based receives Jeff Kirsher
2014-11-20 23:09 ` [net-next v2 08/15] ixgbevf: compare total_rx_packets and budget in ixgbevf_clean_rx_irq Jeff Kirsher
2014-11-21 11:07   ` David Laight
2014-11-21 14:59     ` Tantilov, Emil S
2014-11-20 23:09 ` [net-next v2 09/15] ixgbevf: add netpoll support Jeff Kirsher
2014-11-20 23:09 ` [net-next v2 10/15] i40e: don't overload fields Jeff Kirsher
2014-11-20 23:09 ` [net-next v2 11/15] i40evf: update header comments Jeff Kirsher
2014-11-20 23:09 ` [net-next v2 12/15] i40evf: make checkpatch happy Jeff Kirsher
2014-11-20 23:09 ` Jeff Kirsher [this message]
2014-11-20 23:09 ` [net-next v2 14/15] i40evf: remove unnecessary else Jeff Kirsher
2014-11-20 23:09 ` [net-next v2 15/15] i40e: trigger SW INT with no ITR wait Jeff Kirsher
2014-11-21 20:24 ` [net-next v2 00/15][pull request] Intel Wired LAN Driver Updates 2014-11-20 David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1416524953-15161-14-git-send-email-jeffrey.t.kirsher@intel.com \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=davem@davemloft.net \
    --cc=jogreene@redhat.com \
    --cc=mitch.a.williams@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@redhat.com \
    --cc=sassmann@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox