mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: SZ Lin <sz.lin@moxa.com>
To: davem@davemloft.net
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>
Subject: [PATCH 3/6] net: moxa: Fix comparison to NULL could be written with !
Date: Sat, 29 Jul 2017 18:42:36 +0800	[thread overview]
Message-ID: <20170729104239.14999-4-sz.lin@moxa.com> (raw)
In-Reply-To: <20170729104239.14999-1-sz.lin@moxa.com>

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

  parent reply	other threads:[~2017-07-29 10:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-29 10:42 [PATCH 0/6] net: moxa: Fix style issues SZ Lin
2017-07-29 10:42 ` [PATCH 1/6] net: moxa: Remove braces from single-line body SZ Lin
2017-07-29 10:42 ` [PATCH 2/6] net: moxa: Prefer 'unsigned int' to bare use of 'unsigned' SZ Lin
2017-07-29 10:42 ` SZ Lin [this message]
2017-07-29 10:42 ` [PATCH 4/6] net: moxa: Remove extra space after a cast SZ Lin
2017-07-29 10:42 ` [PATCH 5/6] net: moxa: Fix for typo in comment to function moxart_mac_setup_desc_ring() SZ Lin
2017-07-29 10:42 ` [PATCH 6/6] net: moxa: Add spaces preferred around that '{+,-}' SZ Lin
2017-07-29 21:02 ` [PATCH 0/6] net: moxa: Fix style issues 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=20170729104239.14999-4-sz.lin@moxa.com \
    --to=sz.lin@moxa.com \
    --cc=bhumirks@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jarod@redhat.com \
    --cc=jonas.jensen@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=tklauser@distanz.ch \
    /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

all inboxes | Powered by JetHome®