From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D8178C433F4 for ; Tue, 18 Sep 2018 14:18:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9432B214FE for ; Tue, 18 Sep 2018 14:18:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9432B214FE Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729773AbeIRTvd (ORCPT ); Tue, 18 Sep 2018 15:51:33 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:45668 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728065AbeIRTvd (ORCPT ); Tue, 18 Sep 2018 15:51:33 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0A85C1596; Tue, 18 Sep 2018 07:18:45 -0700 (PDT) Received: from e107981-ln.cambridge.arm.com (e107981-ln.emea.arm.com [10.4.13.117]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5FF783F5BD; Tue, 18 Sep 2018 07:18:43 -0700 (PDT) Date: Tue, 18 Sep 2018 15:18:38 +0100 From: Lorenzo Pieralisi To: kbuild test robot , thierry.reding@gmail.com Cc: Shawn Lin , kbuild-all@01.org, linux-kernel@vger.kernel.org, Bjorn Helgaas , Jonathan Hunter , linux-tegra@vger.kernel.org, linux-pci@vger.kernel.org Subject: Re: [PATCH] PCI: fix ptr_ret.cocci warnings Message-ID: <20180918141838.GA32243@e107981-ln.cambridge.arm.com> References: <201807120738.oIXXb65q%fengguang.wu@intel.com> <20180711233041.GA39597@lkp-sbx04> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180711233041.GA39597@lkp-sbx04> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 12, 2018 at 07:30:41AM +0800, kbuild test robot wrote: > From: kbuild test robot > > drivers/pci/controller/pci-tegra.c:1132:1-3: WARNING: PTR_ERR_OR_ZERO can be used > > > Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR > > Generated by: scripts/coccinelle/api/ptr_ret.cocci > > Fixes: 6e0832fa432e ("PCI: Collect all native drivers under drivers/pci/controller/") > CC: Shawn Lin > Signed-off-by: kbuild test robot > --- > > pci-tegra.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) Thierry, are you OK with this change ? I will remove the Fixes: tag since this does not fix anything AFAICS. Lorenzo > --- a/drivers/pci/controller/pci-tegra.c > +++ b/drivers/pci/controller/pci-tegra.c > @@ -1129,10 +1129,7 @@ static int tegra_pcie_resets_get(struct > return PTR_ERR(pcie->afi_rst); > > pcie->pcie_xrst = devm_reset_control_get_exclusive(dev, "pcie_x"); > - if (IS_ERR(pcie->pcie_xrst)) > - return PTR_ERR(pcie->pcie_xrst); > - > - return 0; > + return PTR_ERR_OR_ZERO(pcie->pcie_xrst); > } > > static int tegra_pcie_phys_get_legacy(struct tegra_pcie *pcie)