linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Young <youngcdev@gmail.com>
To: unlisted-recipients:; (no To-header on input)
Cc: Benjamin Young <youngcdev@gmail.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	tolga ceylan <tolga.ceylan@gmail.com>,
	"Ravindran, Madhusudhanan (M.)" <mravindr@visteon.com>,
	devel@driverdev.osuosl.org (open list:STAGING SUBSYSTEM),
	linux-kernel@vger.kernel.org (open list)
Subject: [PATCH] staging: netlogic: Coding Style Fix Comparison to NULL could be written with !
Date: Sat, 12 Dec 2015 06:45:59 -0800	[thread overview]
Message-ID: <1449931562-23133-1-git-send-email-youngcdev@gmail.com> (raw)

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

Signed-off-by: Benjamin Young <youngcdev@gmail.com>
---
 drivers/staging/netlogic/xlr_net.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/netlogic/xlr_net.c b/drivers/staging/netlogic/xlr_net.c
index 8ae0175..ac93e63 100644
--- a/drivers/staging/netlogic/xlr_net.c
+++ b/drivers/staging/netlogic/xlr_net.c
@@ -147,7 +147,7 @@ static void xlr_net_fmn_handler(int bkt, int src_stnid, int size,
 		addr = addr - MAC_SKB_BACK_PTR_SIZE;
 		skb = (struct sk_buff *) *(unsigned long *)addr;
 		skb->dev = adapter->netdev[port];
-		if (skb->dev == NULL)
+		if (!skb->dev)
 			return;
 		ndev = skb->dev;
 		priv = netdev_priv(ndev);
@@ -878,7 +878,7 @@ static int xlr_setup_mdio(struct xlr_net_priv *priv,
 	priv->mii_bus->write = xlr_mii_write;
 	priv->mii_bus->parent = &pdev->dev;
 	priv->mii_bus->irq = kmalloc(sizeof(int)*PHY_MAX_ADDR, GFP_KERNEL);
-	if (priv->mii_bus->irq == NULL) {
+	if (!priv->mii_bus->irq) {
 		pr_err("irq alloc failed\n");
 		mdiobus_free(priv->mii_bus);
 		return -ENOMEM;
@@ -1037,7 +1037,7 @@ static int xlr_net_probe(struct platform_device *pdev)
 		priv->nd = (struct xlr_net_data *)pdev->dev.platform_data;
 		res = platform_get_resource(pdev, IORESOURCE_MEM, port);
 
-		if (res == NULL) {
+		if (!res) {
 			pr_err("No memory resource for MAC %d\n",
 					priv->port_id);
 			err = -ENODEV;
@@ -1052,7 +1052,7 @@ static int xlr_net_probe(struct platform_device *pdev)
 		adapter->netdev[port] = ndev;
 
 		res = platform_get_resource(pdev, IORESOURCE_IRQ, port);
-		if (res == NULL) {
+		if (!res) {
 			pr_err("No irq resource for MAC %d\n", priv->port_id);
 			err = -ENODEV;
 			goto err_gmac;
-- 
2.5.0


             reply	other threads:[~2015-12-12 14:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-12 14:45 Benjamin Young [this message]
2015-12-12 15:00 ` [PATCH] staging: netlogic: Coding Style Fix Comparison to NULL could be written with ! Benjamin Young
2016-02-08  4:09 ` Greg Kroah-Hartman
2016-02-26  8:21   ` Benjamin Young

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=1449931562-23133-1-git-send-email-youngcdev@gmail.com \
    --to=youngcdev@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mravindr@visteon.com \
    --cc=tolga.ceylan@gmail.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;
as well as URLs for NNTP newsgroup(s).