From patchwork Fri Aug 9 14:40:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 11086577 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2789614E5 for ; Fri, 9 Aug 2019 14:44:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1260E1FE8A for ; Fri, 9 Aug 2019 14:44:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 066291FF29; Fri, 9 Aug 2019 14:44:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from web01.groups.io (web01.groups.io [66.175.222.12]) (using TLSv1.2 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id AE1AD1FE8A for ; Fri, 9 Aug 2019 14:44:30 +0000 (UTC) X-Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by groups.io with SMTP; Fri, 09 Aug 2019 07:44:30 -0700 X-Received: by mail.kernel.org (Postfix) id D7161208C4; Fri, 9 Aug 2019 14:44:29 +0000 (UTC) X-Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 546BE20820 for ; Fri, 9 Aug 2019 14:44:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 546BE20820 X-Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.129]) with ESMTPA (Nemesis) id 1MeDYt-1iUKLc3gKV-00bKl6; Fri, 09 Aug 2019 16:44:12 +0200 From: Arnd Bergmann To: Linuxkernel+Patchwork-Soc via Email Integration Cc: Vladimir Zapolskiy , Sylvain Lemieux , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kbuild test robot , Arnd Bergmann , "David S. Miller" , netdev@vger.kernel.org Subject: [PATCH v2 08/13] net: lpc-enet: fix badzero.cocci warnings Date: Fri, 9 Aug 2019 16:40:34 +0200 Message-Id: <20190809144043.476786-9-arnd@arndb.de> In-Reply-To: <20190809144043.476786-1-arnd@arndb.de> References: <20190809144043.476786-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:ymJswPYKYUfJcYhkgzxASapbRky55SNMKmN45E1N1FA/lD9wVRt nEkanG7MtJ/Pqveg+h6/6LAG+DrFlq4SuhWOfaZiZETH7gs4em9A42H4Zt4uT3VfWrhsRIe CulwVh+XfSAkba94KTZX+nwNfSPRHjC2+ey++8db5AJWpxOhnI+dyS0vb26UIXRYODolgss ynV1gvQMpkNJsma+aWNww== X-UI-Out-Filterresults: notjunk:1;V03:K0:DJdco6j8rD4=:dQhHBR77IFlKfKZRM8eVPy V4nC2W/CrV/kLoRpyM40abNGXn7N9t/aH3K6fSYmFvDJr7DP0iiwcuYczFi4+CUVeoUIdbnMI arj1+4IXw5yJCeQTYabD611KpdLgrW7/n+Sc3ySzEvRoON9NljdOTWLx1riZgBH8a+wiRXA+L Eq7ZMP3kqlqu1mdz6XZUdwfunBrF7kR81tnf374XRy0wcH9UI9pI1LPhQu4CxyQlr85VMyZbg MhS/+C5PMG7Lyc9niJLsIzIHqazyAa9QgashCgryO59fbkX7/lpkbilsIGUSCuQ/IzaJcH6cV Q0dtBElm1MOZYc7+F4ZRBk/XAnZH40dzJpa3NYDI+N4O/wKzd1jnNyobsVqrxesXszSXszE9a CU6nIAwn9meG1N+GkMf+kB32G+m2gqCI7O0myYNCfDswYe0kxTEI6pCxJIZHoavUtj7pPfAt/ 3ZlaoDE6Od+cEXOij5a2FrcdIj94CHIauGWDuM/3zIsqw7SBVPobAgPkN7iGhLnSCQVB1GvMU 5wUJ8aM5BAQMSMG8/TVMdRjFtlbnsBbq1cVqM5oSyJVzfFfum40hbwvFTL4i2BqXgJBWgzk8E gAvKXfQuhMQL0z7O1bJJyFvZ1oZ8MoFzb8fhiwTteLjiO2a+OB0LVNxbmJTw++1xInAJgDDgO 0G/+Jii877WgDnTQ4DecrPqaIx+F4QDoF2YK8KG7GHUHKoeZqLRr5CHs2p7m1l9QYrih/gVOv BKbi3SN3knrMlI+s1+mASE3vWQVTBTatnNgMew== Precedence: Bulk List-Unsubscribe: Sender: patchwork-soc@linux.kernel.org List-Id: Mailing-List: list patchwork-soc@linux.kernel.org; contact patchwork-soc+owner@linux.kernel.org Delivered-To: mailing list patchwork-soc@linux.kernel.org Reply-To: patchwork-soc+owner@linux.kernel.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux.kernel.org; q=dns/txt; s=20140610; t=1565361870; bh=zCf3NKq/LxuQhKoy8wgf9uZfOM4bvKEl4hz5JYEYlt8=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=hud0ifXvN+RpIdERU4r/BRGxRSoLM6s6l6qLzUOPKyCrOWshVDSA9kpPaXuqF/b3/RY b6GB14ML6JbBc8uBdlRRKVMjOBrm5Z0IQ6kQr3/h/VxgQRR4NRMt7p+3urHSye2ApyG5w dbRhSTY1LJr3X10BCQ2yKcHxGvnP9YDq3zQ= X-Virus-Scanned: ClamAV using ClamSMTP From: kbuild test robot drivers/net/ethernet/nxp/lpc_eth.c:1316:31-32: 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: e42016eb3844 ("net: lpc-enet: allow compile testing") Signed-off-by: kbuild test robot Signed-off-by: Arnd Bergmann --- drivers/net/ethernet/nxp/lpc_eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/nxp/lpc_eth.c b/drivers/net/ethernet/nxp/lpc_eth.c index 0893b77c385d..797bdbbcef76 100644 --- a/drivers/net/ethernet/nxp/lpc_eth.c +++ b/drivers/net/ethernet/nxp/lpc_eth.c @@ -1312,7 +1312,7 @@ static int lpc_eth_drv_probe(struct platform_device *pdev) } } - if (pldat->dma_buff_base_v == 0) { + if (pldat->dma_buff_base_v == NULL) { ret = dma_coerce_mask_and_coherent(dev, DMA_BIT_MASK(32)); if (ret) goto err_out_free_irq;