From patchwork Sat Jan 21 17:04:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lizhe X-Patchwork-Id: 46847 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp816629wrn; Sat, 21 Jan 2023 09:34:17 -0800 (PST) X-Google-Smtp-Source: AMrXdXsJNg7TGVGv4Qgcu5vMEvKx3//6NahQOz9AIs3PcQInJ+JCmB52YPqrDHu9G7QgyNgwXS7M X-Received: by 2002:a05:6a20:a005:b0:b5:c7ed:3de1 with SMTP id p5-20020a056a20a00500b000b5c7ed3de1mr22203009pzj.0.1674322456817; Sat, 21 Jan 2023 09:34:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674322456; cv=none; d=google.com; s=arc-20160816; b=SWmPqUJYW/EjniY+pOdxdk4mQ/RAQnLBD2sG7VKAsweMunT9Z6rnaTgcL8MagIUWxC w2lyOTriqSw+GczyRlmVwATcjxudiMbcPiSg6P4duOWaCnGjOKM/3JLz5cGC5ciVSDBW 2SV3ln2iWB0mnxmxf1Lq5oAVXqLA6DcUwb6NflhhFk0uHQ7PJ2mKcZlrs/wZcWtrFJE1 3FKfZ+krW43usAYjmh4q+tmYoh7XRyczbSqwmVl/Hs3MRz89kqoqCzLgpOTmMUhK2fQr Kc/EA0irhaBzjY5ynXhc/hWmjSWK7tDjNST0yl+kT94mgHwBnoZhpvjHb70u64+/b6Ah fxLg== 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 :dkim-signature; bh=JUlxToNzLBO0BKABG4CCXq4vQiINYrAipFSJIvdZQcM=; b=w7crLVajb22jm6QmKGXAPGaZCqDd7HIhF+/dljVJtAjLkEa4soev18BdYtF4bGooOp c5/JBOPNVJLWZsjTMYLL3OR/7NLkhFzm1hQpzO3yWtZnCq8VWzK7clHQLljZJqn76nqN X3QIimDX2a5VItZgBrZZHgVcPGo5FUE1QnrODyWm/Y/RuZpP6iaRwvzaOauSqeR93Ben gJGqrz7wopLPcM16kosOR3M9bca0qHlOV2P/BwXKkWiToaUnK0n1/TfOllLA7uB3PZdF EXkENX7n9kkzyMldmPtvypGUEAT0dgREWtucbcq52SFRmc28rNY90PYJdFoYETPU5+fj CbQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=kWm1lWo8; 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=163.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b9-20020a63d809000000b0047895cb23d2si46840048pgh.646.2023.01.21.09.34.04; Sat, 21 Jan 2023 09:34:16 -0800 (PST) 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=@163.com header.s=s110527 header.b=kWm1lWo8; 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=163.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230006AbjAURFq (ORCPT + 99 others); Sat, 21 Jan 2023 12:05:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229750AbjAURFn (ORCPT ); Sat, 21 Jan 2023 12:05:43 -0500 Received: from m12.mail.163.com (m12.mail.163.com [220.181.12.199]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 55D122ED65; Sat, 21 Jan 2023 09:05:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id; bh=JUlxToNzLBO0BKABG4 CCXq4vQiINYrAipFSJIvdZQcM=; b=kWm1lWo8N8f9gVUi88v0p+PHYQlj5vu4IA qJDDrKagGhjqXqqgH/FMN46WcckBstMUdXvqj+8AA1+4PRLGehIkcOHwkp7PkHQu Pfu9clrz/fGeS0SKdETbn/1niy621zjVnr63zrmExT63z0/VOUIgINdJzyNtPzIE mG4aYGFEg= Received: from localhost.localdomain (unknown [114.105.143.48]) by zwqz-smtp-mta-g4-2 (Coremail) with SMTP id _____wBH_WAWG8xjy+a7BA--.27008S4; Sun, 22 Jan 2023 01:04:42 +0800 (CST) From: Lizhe To: bhelgaas@google.com, tglx@linutronix.de, darwi@linutronix.de, jgg@ziepe.ca, maz@kernel.org Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Lizhe Subject: [PATCH v1] drivers/msi.c : use devm_ioremap replace ioremap Date: Sat, 21 Jan 2023 09:04:20 -0800 Message-Id: <20230121170420.8681-1-sensor1010@163.com> X-Mailer: git-send-email 2.17.1 X-CM-TRANSID: _____wBH_WAWG8xjy+a7BA--.27008S4 X-Coremail-Antispam: 1Uf129KBjvdXoWrKFW3ZFW5Aw47Kr18uw4Uurg_yoWxuFc_ur WkZw4fArWqyry8Ca4FyrWfZry29a4kuFWkuF10qasIkw1S9wnxGFyDur1ktayDuwn7Gay5 J39Fgr1UuF48AjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7sRZBMK3UUUUU== X-Originating-IP: [114.105.143.48] X-CM-SenderInfo: 5vhq20jurqiii6rwjhhfrp/xtbBlw-9q2I0X6gNTgAAss X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755654344346982555?= X-GMAIL-MSGID: =?utf-8?q?1755654344346982555?= use devm_ioremap replace ioremap Signed-off-by: Lizhe --- drivers/pci/msi/msi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/msi/msi.c b/drivers/pci/msi/msi.c index 1f716624ca56..184eca85b88b 100644 --- a/drivers/pci/msi/msi.c +++ b/drivers/pci/msi/msi.c @@ -566,7 +566,7 @@ static void __iomem *msix_map_region(struct pci_dev *dev, table_offset &= PCI_MSIX_TABLE_OFFSET; phys_addr = pci_resource_start(dev, bir) + table_offset; - return ioremap(phys_addr, nr_entries * PCI_MSIX_ENTRY_SIZE); + return devm_ioremap(&dev->dev, phys_addr, nr_entries * PCI_MSIX_ENTRY_SIZE); } /**