linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
Cc: devel@driverdev.osuosl.org, ulf.hansson@linaro.org,
	baolin.wang@linaro.org, gregkh@linuxfoundation.org,
	linus.walleij@linaro.org, linux-mmc@vger.kernel.org,
	adrian.hunter@intel.com,
	Quentin Schulz <quentin.schulz@free-electrons.com>,
	linux-kernel@vger.kernel.org, hdegoede@redhat.com, wens@csie.org,
	kbuild-all@01.org, maxime.ripard@free-electrons.com,
	shawn.lin@rock-chips.com, icenowy@aosc.xyz
Subject: [PATCH] staging: net: wireless: fix badzero.cocci warnings
Date: Sun, 23 Jul 2017 16:25:28 +0800	[thread overview]
Message-ID: <20170723082528.GA43707@lkp-nex06.lkp.intel.com> (raw)
In-Reply-To: <20170721143502.1991-2-quentin.schulz@free-electrons.com>

drivers/staging/esp8089/esp_mac80211.c:596:33-34: WARNING comparing pointer to 0

 Compare pointer-typed values to NULL rather than 0

Semantic patch information:
 This makes an effort to choose between !x and x == NULL.  !x is used
 if it has previously been used with the function used to initialize x.
 This relies on type information.  More type information can be obtained
 using the option -all_includes and the option -I to specify an
 include path.

Generated by: scripts/coccinelle/null/badzero.cocci

Fixes: 5ebdb57b0b15 ("staging: net: wireless: add ESP8089 WiFi driver")
CC: Quentin Schulz <quentin.schulz@free-electrons.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 esp_mac80211.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/staging/esp8089/esp_mac80211.c
+++ b/drivers/staging/esp8089/esp_mac80211.c
@@ -593,7 +593,7 @@ static void hw_scan_timeout_report(struc
 	if (test_and_clear_bit(ESP_WL_FLAG_STOP_TXQ, &epub->wl.flags))
 		sip_trigger_txq_process(epub->sip);
 	/*check if normally complete or aborted like timeout/hw error */
-	aborted = (epub->wl.scan_req != 0);
+	aborted = (epub->wl.scan_req != NULL);
 
 	if (aborted)
 		epub->wl.scan_req = NULL;

  parent reply	other threads:[~2017-07-23  8:25 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-21 14:35 [PATCH 0/2] add ESP8089 WiFi chip driver Quentin Schulz
2017-07-21 14:35 ` [PATCH 1/2] staging: net: wireless: add ESP8089 WiFi driver Quentin Schulz
2017-07-21 15:01   ` Greg KH
2017-07-21 16:47     ` Quentin Schulz
2017-07-21 16:52       ` Marcel Holtmann
2017-07-21 17:05         ` Quentin Schulz
2017-07-25  8:31           ` Kalle Valo
2017-07-21 15:01   ` Marcel Holtmann
2017-07-23  7:06   ` kbuild test robot
2017-07-23  8:25   ` kbuild test robot
2017-07-23  8:25   ` kbuild test robot [this message]
2017-07-25 10:31   ` Dan Carpenter
2017-07-21 14:35 ` [PATCH 2/2] mmc: Add mmc_force_detect_change_begin / _end functions Quentin Schulz
2017-07-22 14:07   ` Shawn Lin
2017-08-30 12:44   ` Hans de Goede
2017-08-30 13:43     ` Ulf Hansson
2018-02-08 14:59       ` Quentin Schulz
2018-02-08 21:31         ` Ulf Hansson
2018-02-09  8:05           ` Quentin Schulz
2018-02-09 14:01             ` Ulf Hansson
2018-03-23  7:25               ` Quentin Schulz
2018-09-26 14:44               ` Frieder Schrempf
2018-09-26 20:19                 ` Hans de Goede
2018-09-27  8:14                   ` Maxime Ripard
2018-10-08  9:53                     ` Frieder Schrempf
2018-10-09  7:52                       ` Quentin Schulz
2018-10-09 14:03                         ` Frieder Schrempf

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=20170723082528.GA43707@lkp-nex06.lkp.intel.com \
    --to=lkp@intel.com \
    --cc=adrian.hunter@intel.com \
    --cc=baolin.wang@linaro.org \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hdegoede@redhat.com \
    --cc=icenowy@aosc.xyz \
    --cc=kbuild-all@01.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=maxime.ripard@free-electrons.com \
    --cc=quentin.schulz@free-electrons.com \
    --cc=shawn.lin@rock-chips.com \
    --cc=ulf.hansson@linaro.org \
    --cc=wens@csie.org \
    /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).