Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp258282rdh; Thu, 23 Nov 2023 03:18:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IFoDWEeJbS44XLW3KVRpHMm//eAp3+kyBwPszVaMXiI1KYc6Iy8xWhxrpirtJLFtvpy5i0b X-Received: by 2002:a17:902:db02:b0:1cf:5938:f06 with SMTP id m2-20020a170902db0200b001cf59380f06mr3186262plx.25.1700738330747; Thu, 23 Nov 2023 03:18:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700738330; cv=none; d=google.com; s=arc-20160816; b=zOBRts4xbOheCkCZwwEfmVNyNFgNS1JQBn96ciPKuoNs7VlbOiexcpXc9TDcQznyw4 TcxVJ/UslQmbRexRtDYDaX6MPMYbJSHO1KqYY5dEIOjdfz9r2GCuUbcszTr4yaUMv27K 15CPU5yk+jn6YJDzhBOYSSHV3T2Tgwf+kaMwRtBcXDWMkRp5Kwhae2Ph54Bsrbu5UVht ViSNCbhdsBMPc3L8GALFenune/2GIGYqW/W0+OiGkZLkkyWF/pMlnGsfGYuFVxKqYhWU M3URL1oF+BO2EfxCrn1MAc1ztFyOutvl+EB5qSRBIyE3GvVf0jdu2yUo6od1bDI7pXVj dWpQ== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=dy6sMIF+e14TSuLPaIy6NXNJU3qTh6QIXsv2pQ/o7yo=; fh=KJc7GLo+eGu7JerAqNLDPNtxIqRyVD8pJ23GCgU4X/c=; b=rM/bfAn/FPWBEXKOpbvidEQPZe+/pZbFKQXB9ybaCCwDLyc3KYQp0kmhZt15Ui7DlV XXIDGmrL5+V/XyEniXQScOWm0W+kPTCcWkaLMO79A0QjVMKDoCs1wcXcNHAX/pvKichC hqy1zxlM48zHzyoYhTfY4MyRVcGz9nnfeM6uYNa0Wazh9oh/bNXRdyornMNyIevGMoee C4s7ZoJAoL19tV2BO+KuosiB1iUTaty4u5O/thmQVHrJ8C06+/rsMXX5QA9h0GgrUMtp aILDEWonSGbGOU/8N4+/G8j733+WiZ/H1WvlHa4I9dcGbiFtpKVSFtIX4yD7tDNHADkW 8G+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UjSMQj7n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id u13-20020a17090341cd00b001cf6a75337dsi968510ple.378.2023.11.23.03.18.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 03:18:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UjSMQj7n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id CACBE82915A2; Thu, 23 Nov 2023 03:18:30 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344999AbjKWLST (ORCPT + 99 others); Thu, 23 Nov 2023 06:18:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344939AbjKWLSR (ORCPT ); Thu, 23 Nov 2023 06:18:17 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 575381AE for ; Thu, 23 Nov 2023 03:18:24 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 01A37C433C7; Thu, 23 Nov 2023 11:18:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700738304; bh=+x/URQgVb4SiWXQmWUgGkAjGeRrBtfsrwcdrEF0IBtw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=UjSMQj7nZ67/7+0ThgmDgmc3tUqTfqdRB342jny9HKMGkPLRX4vUAP879qF2AF8EN P8oc7u+xBMczUlMmm0Udx6R6SkOISrJIyd/3RByDdvuIslzDn4xQ32ydSPtpRb33YI H9KwBuRHABJm1rOGUiD3UhdUaB3Q1wyEqMb4225yoTUa3hnycji7X0Fh0WnF6RpJ2J rBrEjZ5kE4cebOntOaSXOV4hjt+mcy3054yFaLk1qBDlC8OPJCjP2/DXObkQIxChRZ ITYn+wgllCDtIWvE/Rn46DoTYOPmNaIsD9iJVJBRrxA1hLVwXnfENOi18ImS87mSFV YEMFV9wIZbN1Q== Date: Thu, 23 Nov 2023 11:18:20 +0000 From: Lee Jones To: Andy Shevchenko Cc: Jarkko Nikula , Chen Ni , linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 2/2] mfd: intel-lpss: Amend IRQ check Message-ID: <20231123111820.GC1243364@google.com> References: <20231106184052.1166579-1-andriy.shevchenko@linux.intel.com> <20231106184052.1166579-3-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20231106184052.1166579-3-andriy.shevchenko@linux.intel.com> X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 23 Nov 2023 03:18:31 -0800 (PST) On Mon, 06 Nov 2023, Andy Shevchenko wrote: > From: Chen Ni > > platform_get_irq() returns a negative error code to indicating an > error. All the same does pci_alloc_irq_vectors() and pci_irq_vector(). > So in intel_lpss_probe() the erroneous IRQ should be better returned > as is. > > The pci_alloc_irq_vectors() call and platform_get_irq() guarantee > that IRQ won't be 0, hence drop that check. > > Signed-off-by: Chen Ni > [andy: updated commit message] I reworded it further. > Signed-off-by: Andy Shevchenko > --- > drivers/mfd/intel-lpss.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/mfd/intel-lpss.c b/drivers/mfd/intel-lpss.c > index 9591b354072a..4c9d0222751a 100644 > --- a/drivers/mfd/intel-lpss.c > +++ b/drivers/mfd/intel-lpss.c > @@ -378,9 +378,12 @@ int intel_lpss_probe(struct device *dev, > struct intel_lpss *lpss; > int ret; > > - if (!info || !info->mem || info->irq <= 0) > + if (!info || !info->mem) > return -EINVAL; > > + if (info->irq < 0) > + return info->irq; > + > lpss = devm_kzalloc(dev, sizeof(*lpss), GFP_KERNEL); > if (!lpss) > return -ENOMEM; > -- > 2.40.0.1.gaa8946217a0b > -- Lee Jones [李琼斯]