Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752157AbdGWIZk (ORCPT ); Sun, 23 Jul 2017 04:25:40 -0400 Received: from mga14.intel.com ([192.55.52.115]:24226 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750837AbdGWIZg (ORCPT ); Sun, 23 Jul 2017 04:25:36 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,400,1496127600"; d="scan'208";a="130718600" Date: Sun, 23 Jul 2017 16:25:28 +0800 From: kbuild test robot To: Quentin Schulz Cc: kbuild-all@01.org, ulf.hansson@linaro.org, gregkh@linuxfoundation.org, devel@driverdev.osuosl.org, hdegoede@redhat.com, baolin.wang@linaro.org, linus.walleij@linaro.org, linux-mmc@vger.kernel.org, adrian.hunter@intel.com, linux-kernel@vger.kernel.org, Quentin Schulz , wens@csie.org, icenowy@aosc.xyz, maxime.ripard@free-electrons.com, shawn.lin@rock-chips.com Subject: [PATCH] staging: net: wireless: fix badzero.cocci warnings Message-ID: <20170723082528.GA43707@lkp-nex06.lkp.intel.com> References: <201707231612.uqddXFWl%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170721143502.1991-2-quentin.schulz@free-electrons.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: fengguang.wu@intel.com X-SA-Exim-Scanned: No (on bee); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1217 Lines: 32 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 Signed-off-by: Fengguang Wu --- 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;