Thread (3 messages) 3 messages, 2 authors, 2017-12-25

Re: [PATCH v3 27/27] devres: kill devm_ioremap_nocache

From: Yisheng Xie <hidden>
Date: 2017-12-25 01:44:10
Also in: alsa-devel, dmaengine, dri-devel, linux-can, linux-fbdev, linux-gpio, linux-ide, linux-media, linux-mmc, linux-pci, linux-rtc, linux-spi, linux-watchdog, linux-wireless, lkml, netdev, platform-driver-x86


On 2017/12/23 21:45, Greg KH wrote:
On Sat, Dec 23, 2017 at 07:02:59PM +0800, Yisheng Xie wrote:
quoted
--- 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);
Wait, devm_ioremap() calls ioremap(), not ioremap_nocache(), are you
_SURE_ that these are all identical?  For all arches?  If so, then
ioremap_nocache() can also be removed, right?
Yeah, As Christophe pointed out, that 4 archs do not have the same function.
But I do not why they do not want do the same thing. Driver may no know about
this? right?
In my quick glance, I don't think you can do this series at all :(
Yes, maybe should take Christophe suggestion and use a bool or enum to distinguish them?

Thanks
Yisheng
greg k-h

.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help