Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp43115pxf; Tue, 9 Mar 2021 23:14:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJx3xnGLE3aPQZkl32aOxOlONNSwxdZG/neiyQd8s9sHevBK1cnlCJLcAY/WR/l08LkiecJk X-Received: by 2002:a17:907:33c6:: with SMTP id zk6mr2084770ejb.228.1615360474223; Tue, 09 Mar 2021 23:14:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615360474; cv=none; d=google.com; s=arc-20160816; b=hvDwY4m6psbew0PU3PiaYnYwPrZ1hBWwJp36IMq38f++GLthWOOOalWDaD5wtAZxlw M3EgmXJOn/04ic8S9P9gP1WL/8RTVE/K0wJpS1QU+xQu9UVbdX74tysfZCt6/kQVa/zh ex0Tww6GO91sryQcP/4/BIw7Thjpxbx0H9rrpoh7w1WW8XKlAkJVDCzMdSt0GIikbjia 3PcV6R4xV1WuPqDu6tGSiaZnqUnktZuowX65gY2brmAyJjWhho9aqZFmNhbz23H4cWMC Hum4jQ0iUj5A7gWgBqHFPviEOYMayljD6qHyBJG5pqA8odXeEz5CWcBYxPTcpL9Uy1OY c6dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=VAa/e4opc8NMPb3WvNavd7YC8mZVhosNnqaxXhxP7Yk=; b=0qyoDP3+iGDyXlNTpo8KIJlur1NJtaOQGhyToBp6MYD6lo1rWIYWRZRMMKQfOE3lOc yhdOLvweR65QmbRv0FVILehrJIY9x3y40Br93Q7iPcquvsS2WRrxn5X8K2IaN0iukL5l n0sKq5eCrU4Du0nfwQiX7dO37sHysHlDKoUCKirh3ipNvofy+4GPttrvp+bKlh3NjxE2 3RiHlZ8cpSigeLiJSnL6rSHJz7jpSntuhKXqAkRL1yxCjxj1q/uvxrLja0ORV6f4uGf7 2WRb1oofprqPkNcOGq93T4oDCkwfMJbYPmP5toZ352mg29eB5heH/TCr0wTX/XzFnvJ/ Qkjw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p10si3218421ejg.131.2021.03.09.23.14.11; Tue, 09 Mar 2021 23:14:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230269AbhCJHLI (ORCPT + 99 others); Wed, 10 Mar 2021 02:11:08 -0500 Received: from out30-133.freemail.mail.aliyun.com ([115.124.30.133]:58712 "EHLO out30-133.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230303AbhCJHKp (ORCPT ); Wed, 10 Mar 2021 02:10:45 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R221e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=alimailimapcm10staff010182156082;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0URFMPDg_1615360239; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0URFMPDg_1615360239) by smtp.aliyun-inc.com(127.0.0.1); Wed, 10 Mar 2021 15:10:43 +0800 From: Jiapeng Chong To: chris@zankel.net Cc: jcmvbkbc@gmail.com, linux-xtensa@linux-xtensa.org, linux-kernel@vger.kernel.org, Jiapeng Chong Subject: [PATCH] xtensa: fix warning comparing pointer to 0 Date: Wed, 10 Mar 2021 15:10:38 +0800 Message-Id: <1615360238-22508-1-git-send-email-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the following coccicheck warning: ./arch/xtensa/kernel/pci.c:79:17-18: WARNING comparing pointer to 0. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- arch/xtensa/kernel/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/xtensa/kernel/pci.c b/arch/xtensa/kernel/pci.c index 3f32e27..62c900e 100644 --- a/arch/xtensa/kernel/pci.c +++ b/arch/xtensa/kernel/pci.c @@ -76,7 +76,7 @@ int pci_iobar_pfn(struct pci_dev *pdev, int bar, struct vm_area_struct *vma) struct pci_controller *pci_ctrl = (struct pci_controller*) pdev->sysdata; resource_size_t ioaddr = pci_resource_start(pdev, bar); - if (pci_ctrl == 0) + if (!pci_ctrl) return -EINVAL; /* should never happen */ /* Convert to an offset within this PCI controller */ -- 1.8.3.1