Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp258271rdh; Thu, 23 Nov 2023 03:18:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IFagHL4c1yE7kbVPovNSimlerxEwH/T/hDfM9qZSBT0aMEtntdjnOLbK6DnjvnPG4+Ku8M8 X-Received: by 2002:a17:902:728c:b0:1ce:5b21:5c2e with SMTP id d12-20020a170902728c00b001ce5b215c2emr4411271pll.17.1700738328841; Thu, 23 Nov 2023 03:18:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700738328; cv=none; d=google.com; s=arc-20160816; b=V4sfF7NG7+t9llTHfKk3SdqO8BzY+eq4o4bzCP+hRLm7k4T7p42g1QcBv1vfPC8C4m v4tOKcdxVW+S/VRYEow9ApDnMoTuEar/UJR/CB6DaFxA3bMr4DFMGZLMnyRSHCkqX7QT hdvTawFKK39jnEInlOZZovxLMxp8VZJjv77P2rCUx1WEgBoDPXk0ND2MDlUFRGECscUX CpRQve1d8sFg4aUCUz/rEEAebjYX4KFTkRePtTk6VcXMd7+Bm0nuTNg9F9/Z6Nqe4ykY jHYaA3lJaw72JSoLm3NXfRqop7OHa+oeREp1//lpUrU+SnOISPL/LS+ptbeg4G4M/gHM kFmg== 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=r+xwJR7N7jU5dwAfy4zs3ey7mreleQPTZJVUCuzF2RY=; fh=KJc7GLo+eGu7JerAqNLDPNtxIqRyVD8pJ23GCgU4X/c=; b=A+4ZEunaBbfPOVYlseIIZqzqilIgHx5E4dHGANgSMvhzck8ErPDlHOqUkBJpEBfX0X JlMvwROCH6sUG4W8LY0FUjZ3Z/zVAw8Em7PHzPELxjcNm0SzMH8R/ufikRaXq8SV4iRi xEFw9krzV63h/+LhDrRoAjdpPNxfouOQ858hdHri4a4rQlRm6V9f7o2hmSyokX4S2hid Sl9NEfLUKoMaYGcTWvnrPuEkNXg7hHL1rJ3V6Acd4GfMwqklsT+kRVjgQgAZ7OManfJm mta5mvFbA6NLM2BhJdrhMVf/1TvfB2nJ3WVL/oV7zIahU+RV0P1R+WC+qizUqEHPUuOb a1KQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="gXEVV/29"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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. [23.128.96.37]) by mx.google.com with ESMTPS id z3-20020a170902ccc300b001cc2523cf08si954934ple.428.2023.11.23.03.18.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 03:18:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="gXEVV/29"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 CD6AA8030B67; Thu, 23 Nov 2023 03:18:03 -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 S1344996AbjKWLRu (ORCPT + 99 others); Thu, 23 Nov 2023 06:17:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344939AbjKWLRs (ORCPT ); Thu, 23 Nov 2023 06:17:48 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B7861B2 for ; Thu, 23 Nov 2023 03:17:55 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 115C1C433C7; Thu, 23 Nov 2023 11:17:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700738275; bh=hdAwY6pJUbNmsGng/6X59o3TnqEMtaCUWwJVzwuRFAw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gXEVV/29h0yxgU8l4GqCzQD4uVEesWb8rWIjccTKfaaaVMTIeXqAbC8aTYrKgegmd U2AKWY4wpwM93aI+dKVOVG9Hzfk6OeealrymJLOdGRMyTudTGtF26UcwFytbLLdvXx cGfWE1TeSkvTq5EpT95/tOr1I5Ocz5RQpmG1OqcddAFnwJIbcB8ps2gCWDcZsE7G4J 4+a0ccFnyavo+nKN6zWxdeojBsiOItL0R9ER4jS4t/tPJtgr9+LkHoUygB08LDc5Zs 4Qxrk1zWGpENX0SMcJLhA06J5ezKsnx+pG3p6ljqP7pBX0rYIxsBHoJffHJCR76ajg ZrogX4UcHiw7Q== Date: Thu, 23 Nov 2023 11:17:51 +0000 From: Lee Jones To: Andy Shevchenko Cc: Jarkko Nikula , Chen Ni , linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 1/2] mfd: intel-lpss: Use PCI APIs instead of derefereincing Message-ID: <20231123111751.GB1243364@google.com> References: <20231106184052.1166579-1-andriy.shevchenko@linux.intel.com> <20231106184052.1166579-2-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-2-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:03 -0800 (PST) On Mon, 06 Nov 2023, Andy Shevchenko wrote: > We have a few PCI APIs that may be used instead of direct dereferencibg, > Using them will also provide better error codes. > > Signed-off-by: Andy Shevchenko > --- > drivers/mfd/intel-lpss-pci.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) Please use spell-check on your commit messages. Let's not get complacent. > diff --git a/drivers/mfd/intel-lpss-pci.c b/drivers/mfd/intel-lpss-pci.c > index ae5759200622..cf56cd3a40ee 100644 > --- a/drivers/mfd/intel-lpss-pci.c > +++ b/drivers/mfd/intel-lpss-pci.c > @@ -37,13 +37,17 @@ static int intel_lpss_pci_probe(struct pci_dev *pdev, > if (ret) > return ret; > > + ret = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_LEGACY); > + if (ret) > + return ret; > + > info = devm_kmemdup(&pdev->dev, (void *)id->driver_data, sizeof(*info), > GFP_KERNEL); > if (!info) > return -ENOMEM; > > - info->mem = &pdev->resource[0]; > - info->irq = pdev->irq; > + info->mem = pci_resource_n(pdev, 0); > + info->irq = pci_irq_vector(pdev, 0); > > if (pci_match_id(ignore_resource_conflicts_ids, pdev)) > info->ignore_resource_conflicts = true; > -- > 2.40.0.1.gaa8946217a0b > -- Lee Jones [李琼斯]