From patchwork Sat Dec 23 11:02:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xie Yisheng X-Patchwork-Id: 10131907 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 81AEB602DC for ; Sun, 24 Dec 2017 07:33:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 73FE828CCF for ; Sun, 24 Dec 2017 07:33:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6811228D40; Sun, 24 Dec 2017 07:33:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9400628CCF for ; Sun, 24 Dec 2017 07:33:11 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 68DDC266EC4; Sun, 24 Dec 2017 08:32:41 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id D6BA3266DF0; Sat, 23 Dec 2017 12:11:56 +0100 (CET) Received: from huawei.com (szxga05-in.huawei.com [45.249.212.191]) by alsa0.perex.cz (Postfix) with ESMTP id 97FB7266CD2 for ; Sat, 23 Dec 2017 12:11:52 +0100 (CET) Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 296E052AC3BF2; Sat, 23 Dec 2017 19:11:37 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.361.1; Sat, 23 Dec 2017 19:11:32 +0800 From: Yisheng Xie To: , Date: Sat, 23 Dec 2017 19:02:59 +0800 Message-ID: <1514026979-33838-1-git-send-email-xieyisheng1@huawei.com> X-Mailer: git-send-email 1.7.12.4 MIME-Version: 1.0 X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected X-Mailman-Approved-At: Sun, 24 Dec 2017 08:32:38 +0100 Cc: Yisheng Xie , linux-mips@linux-mips.org, ulf.hansson@linaro.org, jakub.kicinski@netronome.com, airlied@linux.ie, linux-wireless@vger.kernel.org, linus.walleij@linaro.org, alsa-devel@alsa-project.org, dri-devel@lists.freedesktop.org, platform-driver-x86@vger.kernel.org, linux-ide@vger.kernel.org, wim@iguana.be, linux-mtd@lists.infradead.org, daniel.vetter@intel.com, dan.j.williams@intel.com, jason@lakedaemon.net, linux-rtc@vger.kernel.org, boris.brezillon@free-electrons.com, mchehab@kernel.org, dmaengine@vger.kernel.org, vinod.koul@intel.com, richard@nod.at, marek.vasut@gmail.com, industrypack-devel@lists.sourceforge.net, linux-pci@vger.kernel.org, dvhart@infradead.org, linux@roeck-us.net, linux-media@vger.kernel.org, seanpaul@chromium.org, devel@driverdev.osuosl.org, linux-watchdog@vger.kernel.org, arnd@arndb.de, b.zolnierkie@samsung.com, marc.zyngier@arm.com, jslaby@suse.com, jani.nikula@linux.intel.com, linux-can@vger.kernel.org, linux-gpio@vger.kernel.org, broonie@kernel.org, mkl@pengutronix.de, linux-fbdev@vger.kernel.org, nios2-dev@lists.rocketboards.org, bhelgaas@google.com, tglx@linutronix.de, andriy.shevchenko@linux.intel.com, kvalo@codeaurora.org, a.zummo@towertech.it, netdev@vger.kernel.org, linux-mmc@vger.kernel.org, lgirdwood@gmail.com, ralf@linux-mips.org, linux-spi@vger.kernel.org, ysxie@foxmail.com, wg@grandegger.com, cyrille.pitchen@wedev4u.fr, tj@kernel.org, alexandre.belloni@free-electrons.com, davem@davemloft.net, andy@infradead.org Subject: [alsa-devel] [PATCH v3 27/27] devres: kill devm_ioremap_nocache X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Now, nobody use devm_ioremap_nocache anymore, can it can just be removed. After this patch the size of devres.o will be reduced from 20304 bytes to 18992 bytes. Suggested-by: Greg KH Signed-off-by: Yisheng Xie --- Documentation/driver-model/devres.txt | 1 - include/linux/io.h | 2 -- lib/devres.c | 29 ----------------------------- scripts/coccinelle/free/devm_free.cocci | 2 -- 4 files changed, 34 deletions(-) diff --git a/Documentation/driver-model/devres.txt b/Documentation/driver-model/devres.txt index c180045..c3fddb5 100644 --- a/Documentation/driver-model/devres.txt +++ b/Documentation/driver-model/devres.txt @@ -292,7 +292,6 @@ IOMAP devm_ioport_map() devm_ioport_unmap() devm_ioremap() - devm_ioremap_nocache() devm_ioremap_wc() devm_ioremap_resource() : checks resource, requests memory region, ioremaps devm_iounmap() diff --git a/include/linux/io.h b/include/linux/io.h index 32e30e8..a9c7270 100644 --- a/include/linux/io.h +++ b/include/linux/io.h @@ -75,8 +75,6 @@ static inline void devm_ioport_unmap(struct device *dev, void __iomem *addr) void __iomem *devm_ioremap(struct device *dev, resource_size_t offset, resource_size_t size); -void __iomem *devm_ioremap_nocache(struct device *dev, resource_size_t offset, - resource_size_t size); void __iomem *devm_ioremap_wc(struct device *dev, resource_size_t offset, resource_size_t size); void devm_iounmap(struct device *dev, void __iomem *addr); diff --git a/lib/devres.c b/lib/devres.c index 5f2aedd..f818fcf 100644 --- a/lib/devres.c +++ b/lib/devres.c @@ -44,35 +44,6 @@ void __iomem *devm_ioremap(struct device *dev, resource_size_t offset, EXPORT_SYMBOL(devm_ioremap); /** - * devm_ioremap_nocache - Managed ioremap_nocache() - * @dev: Generic device to remap IO address for - * @offset: Resource address to map - * @size: Size of map - * - * Managed ioremap_nocache(). Map is automatically unmapped on driver - * detach. - */ -void __iomem *devm_ioremap_nocache(struct device *dev, resource_size_t offset, - resource_size_t size) -{ - void __iomem **ptr, *addr; - - ptr = devres_alloc(devm_ioremap_release, sizeof(*ptr), GFP_KERNEL); - if (!ptr) - return NULL; - - addr = ioremap_nocache(offset, size); - if (addr) { - *ptr = addr; - devres_add(dev, ptr); - } else - devres_free(ptr); - - return addr; -} -EXPORT_SYMBOL(devm_ioremap_nocache); - -/** * devm_ioremap_wc - Managed ioremap_wc() * @dev: Generic device to remap IO address for * @offset: Resource address to map diff --git a/scripts/coccinelle/free/devm_free.cocci b/scripts/coccinelle/free/devm_free.cocci index c990d2c..36b8752 100644 --- a/scripts/coccinelle/free/devm_free.cocci +++ b/scripts/coccinelle/free/devm_free.cocci @@ -51,8 +51,6 @@ expression x; | x = devm_ioremap(...) | - x = devm_ioremap_nocache(...) -| x = devm_ioport_map(...) )