lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 23 Dec 2017 19:02:59 +0800
From:   Yisheng Xie <xieyisheng1@...wei.com>
To:     <linux-kernel@...r.kernel.org>, <gregkh@...uxfoundation.org>
CC:     <ysxie@...mail.com>, <ulf.hansson@...aro.org>,
        <linux-mmc@...r.kernel.org>, <boris.brezillon@...e-electrons.com>,
        <richard@....at>, <marek.vasut@...il.com>,
        <cyrille.pitchen@...ev4u.fr>, <linux-mtd@...ts.infradead.org>,
        <alsa-devel@...a-project.org>, <wim@...ana.be>,
        <linux@...ck-us.net>, <linux-watchdog@...r.kernel.org>,
        <b.zolnierkie@...sung.com>, <linux-fbdev@...r.kernel.org>,
        <linus.walleij@...aro.org>, <linux-gpio@...r.kernel.org>,
        <ralf@...ux-mips.org>, <linux-mips@...ux-mips.org>,
        <lgirdwood@...il.com>, <broonie@...nel.org>, <tglx@...utronix.de>,
        <jason@...edaemon.net>, <marc.zyngier@....com>, <arnd@...db.de>,
        <andriy.shevchenko@...ux.intel.com>,
        <industrypack-devel@...ts.sourceforge.net>, <wg@...ndegger.com>,
        <mkl@...gutronix.de>, <linux-can@...r.kernel.org>,
        <mchehab@...nel.org>, <linux-media@...r.kernel.org>,
        <a.zummo@...ertech.it>, <alexandre.belloni@...e-electrons.com>,
        <linux-rtc@...r.kernel.org>, <daniel.vetter@...el.com>,
        <jani.nikula@...ux.intel.com>, <seanpaul@...omium.org>,
        <airlied@...ux.ie>, <dri-devel@...ts.freedesktop.org>,
        <kvalo@...eaurora.org>, <linux-wireless@...r.kernel.org>,
        <linux-spi@...r.kernel.org>, <tj@...nel.org>,
        <linux-ide@...r.kernel.org>, <bhelgaas@...gle.com>,
        <linux-pci@...r.kernel.org>, <devel@...verdev.osuosl.org>,
        <dvhart@...radead.org>, <andy@...radead.org>,
        <platform-driver-x86@...r.kernel.org>,
        <jakub.kicinski@...ronome.com>, <davem@...emloft.net>,
        <nios2-dev@...ts.rocketboards.org>, <netdev@...r.kernel.org>,
        <vinod.koul@...el.com>, <dan.j.williams@...el.com>,
        <dmaengine@...r.kernel.org>, <jslaby@...e.com>,
        Yisheng Xie <xieyisheng1@...wei.com>
Subject: [PATCH v3 27/27] devres: kill devm_ioremap_nocache

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 <gregkh@...uxfoundation.org>
Signed-off-by: Yisheng Xie <xieyisheng1@...wei.com>
---
 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(...)
 )
 
-- 
1.8.3.1

Powered by blists - more mailing lists