Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1699289

[PATCH 3/6] net: moxa: Fix comparison to NULL could be written with !

Path csiph.com!fu-berlin.de!bofh.it!news.nic.it!robomod
From SZ Lin <sz.lin@moxa.com>
Newsgroups linux.kernel
Subject [PATCH 3/6] net: moxa: Fix comparison to NULL could be written with !
Date Sat, 29 Jul 2017 12:50:01 +0200
Message-ID <u8xtL-ZD-15@gated-at.bofh.it> (permalink)
References <u8xtL-ZD-1@gated-at.bofh.it>
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Eo9CLe1groAPDjrZ9cemkZmBypF4ELdnR7rji0Va3Lc=; b=PguqQ6Cs5tqBF4IpJBPjCbWJHy7cWN92rQSqBUYd7NWlVH2K/1zhc8j53stKKrBLzc He8jIs3TbzD6MrQsRmhFJtJEPMXaGy1VFklNoplpaHURTd6MF5BF3OpXDx7a7cNSl9Pu u5z/W9wcEr+jS4aP1mIVEOzOgBwveReQFmlXR5oXaZRrui1KpND9K+UWoa7WjXHUHIOi g0su2FXztw9aYeo4yDyXOuoh0tBSxRmEfDPciW/bTK//gsu72OUnj1i+ScBJqsj+PYuP Fr9zZCUn5GUWy3kHam55y9xXl/ghVPQ2FKOWjDcoBSCAg4ATai0ogc6P2FTpDsfRETOW YI/Q==
X-Gm-Message-State AIVw111IhNvaggRiITD499KYeEMmrPd0u8GY8+sO8Ah4RdbHN9xdkO/U 3kGqa5wPYiyzeQ==
X-Received by 10.84.164.193 with SMTP id l1mr11160299plg.279.1501325036325; Sat, 29 Jul 2017 03:43:56 -0700 (PDT)
X-Mailer git-send-email 2.13.3
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 32
Organization linux.* mail to news gateway
X-Original-Cc jarod@redhat.com, jonas.jensen@gmail.com, edumazet@google.com, bhumirks@gmail.com, tklauser@distanz.ch, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, SZ Lin <sz.lin@moxa.com>
X-Original-Date Sat, 29 Jul 2017 18:42:36 +0800
X-Original-Message-ID <20170729104239.14999-4-sz.lin@moxa.com>
X-Original-References <20170729104239.14999-1-sz.lin@moxa.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1699289

Show key headers only | View raw


Fixed coding style for null comparisons in moxart_ether driver
to be more consistent with the rest of the kernel coding style

Signed-off-by: SZ Lin <sz.lin@moxa.com>
---
 drivers/net/ethernet/moxa/moxart_ether.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/moxa/moxart_ether.c b/drivers/net/ethernet/moxa/moxart_ether.c
index 9997e72103d5..1d6384873393 100644
--- a/drivers/net/ethernet/moxa/moxart_ether.c
+++ b/drivers/net/ethernet/moxa/moxart_ether.c
@@ -494,7 +494,7 @@ static int moxart_mac_probe(struct platform_device *pdev)
 	priv->tx_desc_base = dma_alloc_coherent(NULL, TX_REG_DESC_SIZE *
 						TX_DESC_NUM, &priv->tx_base,
 						GFP_DMA | GFP_KERNEL);
-	if (priv->tx_desc_base == NULL) {
+	if (!priv->tx_desc_base) {
 		ret = -ENOMEM;
 		goto init_fail;
 	}
@@ -502,7 +502,7 @@ static int moxart_mac_probe(struct platform_device *pdev)
 	priv->rx_desc_base = dma_alloc_coherent(NULL, RX_REG_DESC_SIZE *
 						RX_DESC_NUM, &priv->rx_base,
 						GFP_DMA | GFP_KERNEL);
-	if (priv->rx_desc_base == NULL) {
+	if (!priv->rx_desc_base) {
 		ret = -ENOMEM;
 		goto init_fail;
 	}
-- 
2.13.3

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/6] net: moxa: Fix style issues SZ Lin <sz.lin@moxa.com> - 2017-07-29 12:50 +0200
  [PATCH 2/6] net: moxa: Prefer 'unsigned int' to bare use of 'unsigned' SZ Lin <sz.lin@moxa.com> - 2017-07-29 12:50 +0200
  [PATCH 3/6] net: moxa: Fix comparison to NULL could be written with ! SZ Lin <sz.lin@moxa.com> - 2017-07-29 12:50 +0200
  [PATCH 5/6] net: moxa: Fix for typo in comment to function moxart_mac_setup_desc_ring() SZ Lin <sz.lin@moxa.com> - 2017-07-29 12:50 +0200
  [PATCH 4/6] net: moxa: Remove extra space after a cast SZ Lin <sz.lin@moxa.com> - 2017-07-29 12:50 +0200
  [PATCH 1/6] net: moxa: Remove braces from single-line body SZ Lin <sz.lin@moxa.com> - 2017-07-29 12:50 +0200
  [PATCH 6/6] net: moxa: Add spaces preferred around that '{+,-}' SZ Lin <sz.lin@moxa.com> - 2017-07-29 12:50 +0200
  Re: [PATCH 0/6] net: moxa: Fix style issues David Miller <davem@davemloft.net> - 2017-07-29 23:10 +0200

csiph-web