Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2221560rwb; Wed, 5 Oct 2022 10:45:51 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6zK1RQy3ErV5Bi6zsuOQs9Br/lWav69/X2ptc0HYLj8NCCzxRw2gj00NRjl9muJYw06i5j X-Received: by 2002:a65:6e0d:0:b0:42d:707c:94ee with SMTP id bd13-20020a656e0d000000b0042d707c94eemr809783pgb.260.1664991951509; Wed, 05 Oct 2022 10:45:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664991951; cv=none; d=google.com; s=arc-20160816; b=mVdoPVZ8jlSqA7HDs99nxQOx7latt0RHijhjXnUU8bK246riFGNup9UD2caWPdlQkE tJ3cfvp++HOTB2Nuz0QaO4e/OAM5PXoaXc6e7iS9UuiDnOfTmdbnqcJqoABKZOXvjlRB ywl/dFbIz26e5JcIV8aXzpL1KtY244BbL6DYCpu8JPjDXZTi1yGhNJH54T/fIVMzhJEx 4YHh5Spit4U0R/BU4mnkX5WD3ETqU+jKRbr05fmd8HZGa7C4U+C7L/BxqlukbNy5ys5U +K5opNpaim9HDCXnRTt0SjEBy/XkApgFO8ysCf1mKSA19oADjDXIV4qhfReFyEv2+qeq znCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=n4OgWBFBv43DsTtnsIoiacjuox4f4wDxTah9TfJqfnc=; b=qwFLyVnh5Gj7zQrCX7i+VErEI8MrsgaMBkTOu/ogdCsiPTzER8obiPbHaDRXSf5oci xnZ2zlsf8A/AFm6e+QHVOFCXDSmSq9UQKOwQRbr8A6yx9x2XWS6Ntyowh2daQ6pl1jgs 7krBXEd5EvfYYPIbs7wCl6eoiukxmc3OL1/CcGOiYduY3/HLEDrGe1Qd/6GpDOjtQOOR 3dbOdtC8MKsRRBBpVlDa1sn/p0JYqGzjLcl0DAqq65l4KmCm88vzsdYKpflQlYouSwEY GPs5bgRX/h4wgsjVjM4WIbAGc4tIuFaGosht/hfI7BBU5bk2cCcGiYqASRA3JaAMNSLN S0Zw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BT33SsLg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r68-20020a632b47000000b0044a0b2e174asi12606394pgr.83.2022.10.05.10.45.39; Wed, 05 Oct 2022 10:45:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BT33SsLg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230246AbiJERfg (ORCPT + 99 others); Wed, 5 Oct 2022 13:35:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230071AbiJERfe (ORCPT ); Wed, 5 Oct 2022 13:35:34 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A10C7434F; Wed, 5 Oct 2022 10:35:32 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B7A42616E8; Wed, 5 Oct 2022 17:35:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CFFBCC433C1; Wed, 5 Oct 2022 17:35:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664991331; bh=rJiZBFfu9nk89r7yZw0kyuFOVd/opop0/sSQNO56/74=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=BT33SsLgNpZr5TKr2FSrdN+HUsRN7EJS6k7zkZNpsang3ho333H/0U3UcgLxUyqxP X7wnNsTWqDXrN6eWmnGw5OCGtwiauljOqQ0Zyjrm6baeZ2YUKIeMg3NjUWPc415k7T xEjrXzNGO+xIRP7G6cbYbmVELHj3Zp7idFnIkXwyJLLJEGZYp0RjJh3FfPlRNhOrzb /3uUSEqJsMcTbXWhTrNK2Q9ZDsBSA0dBkXAS4nTbjDSxMoy15zqra54eKtJ7GJZ551 7JCKCF4DLmEbxgganUfniqUhYeGrpti4RXjhnunVrK4IyJZew7FymgmxykSV5OYSx5 HBhNgzVpTyenQ== Date: Wed, 5 Oct 2022 12:35:29 -0500 From: Bjorn Helgaas To: Manivannan Sadhasivam Cc: lpieralisi@kernel.org, kw@linux.com, bhelgaas@google.com, linux-pci@vger.kernel.org, robh@kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, kernel test robot Subject: Re: [PATCH] PCI: qcom-ep: Fix disabling global_irq in error path Message-ID: <20221005173529.GA2304247@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221005135852.22634-1-manivannan.sadhasivam@linaro.org> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 05, 2022 at 07:28:52PM +0530, Manivannan Sadhasivam wrote: > After commit 6a534df3da88 ("PCI: qcom-ep: Disable IRQs during driver > remove"), the global irq is stored in the "global_irq" member of pcie_ep > structure. This eliminates the need of local "irq" variable but that > commit didn't remove the "irq" variable usage completely and it is still > used for disable_irq() in error path which is wrong since the variable is > uninitialized. > > Fix this by removing the local "irq" variable and using > "pcie_ep->global_irq" for disable_irq() in error path. > > Reported-by: kernel test robot > Fixes: 6a534df3da88 ("PCI: qcom-ep: Disable IRQs during driver remove") > Signed-off-by: Manivannan Sadhasivam For today's "next" branch, I dropped 6a534df3da88 and the subsequent patches. Hopefully Lorenzo can squash this fix into 6a534df3da88. I could clone the branch and squash it myself, but that's pretty fiddly and I usually mess it up. > --- > drivers/pci/controller/dwc/pcie-qcom-ep.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/pci/controller/dwc/pcie-qcom-ep.c b/drivers/pci/controller/dwc/pcie-qcom-ep.c > index 16bb8f166c3b..00a0728d5ecd 100644 > --- a/drivers/pci/controller/dwc/pcie-qcom-ep.c > +++ b/drivers/pci/controller/dwc/pcie-qcom-ep.c > @@ -614,7 +614,7 @@ static irqreturn_t qcom_pcie_ep_perst_irq_thread(int irq, void *data) > static int qcom_pcie_ep_enable_irq_resources(struct platform_device *pdev, > struct qcom_pcie_ep *pcie_ep) > { > - int irq, ret; > + int ret; > > pcie_ep->global_irq = platform_get_irq_byname(pdev, "global"); > if (pcie_ep->global_irq < 0) > @@ -637,7 +637,7 @@ static int qcom_pcie_ep_enable_irq_resources(struct platform_device *pdev, > "perst_irq", pcie_ep); > if (ret) { > dev_err(&pdev->dev, "Failed to request PERST IRQ\n"); > - disable_irq(irq); > + disable_irq(pcie_ep->global_irq); > return ret; > } > > -- > 2.25.1 >