Re: [PATCH v3 27/27] devres: kill devm_ioremap_nocache
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: Re: [PATCH v3 27/27] devres: kill devm_ioremap_nocache
- From: Yisheng Xie <xieyisheng1@xxxxxxxxxx>
- Date: Mon, 25 Dec 2017 09:43:40 +0800
- Cc: <linux-kernel@xxxxxxxxxxxxxxx>, <linux-mips@xxxxxxxxxxxxxx>, <ulf.hansson@xxxxxxxxxx>, <jakub.kicinski@xxxxxxxxxxxxx>, <airlied@xxxxxxxx>, <linux-wireless@xxxxxxxxxxxxxxx>, <linus.walleij@xxxxxxxxxx>, <alsa-devel@xxxxxxxxxxxxxxxx>, <dri-devel@xxxxxxxxxxxxxxxxxxxxx>, <platform-driver-x86@xxxxxxxxxxxxxxx>, <linux-ide@xxxxxxxxxxxxxxx>, <linux-mtd@xxxxxxxxxxxxxxxxxxx>, <daniel.vetter@xxxxxxxxx>, <dan.j.williams@xxxxxxxxx>, <jason@xxxxxxxxxxxxxx>, <linux-rtc@xxxxxxxxxxxxxxx>, <boris.brezillon@xxxxxxxxxxxxxxxxxx>, <mchehab@xxxxxxxxxx>, <dmaengine@xxxxxxxxxxxxxxx>, <vinod.koul@xxxxxxxxx>, <richard@xxxxxx>, <marek.vasut@xxxxxxxxx>, <industrypack-devel@xxxxxxxxxxxxxxxxxxxxx>, <linux-pci@xxxxxxxxxxxxxxx>, <dvhart@xxxxxxxxxxxxx>, <linux@xxxxxxxxxxxx>, <linux-media@xxxxxxxxxxxxxxx>, <seanpaul@xxxxxxxxxxxx>, <devel@xxxxxxxxxxxxxxxxxxxx>, <linux-watchdog@xxxxxxxxxxxxxxx>, <arnd@xxxxxxxx>, <b.zolnierkie@xxxxxxxxxxx>, <marc.zyngier@xxxxxxx>, <jslaby@xxxxxxxx>, <jani.nikula@xxxxxxxxxxxxxxx>, <linux-can@xxxxxxxxxxxxxxx>, <linux-gpio@xxxxxxxxxxxxxxx>, <broonie@xxxxxxxxxx>, <mkl@xxxxxxxxxxxxxx>, <linux-fbdev@xxxxxxxxxxxxxxx>, <nios2-dev@xxxxxxxxxxxxxxxxxxxxxx>, <bhelgaas@xxxxxxxxxx>, <tglx@xxxxxxxxxxxxx>, <andriy.shevchenko@xxxxxxxxxxxxxxx>, <kvalo@xxxxxxxxxxxxxx>, <a.zummo@xxxxxxxxxxxx>, <netdev@xxxxxxxxxxxxxxx>, <linux-mmc@xxxxxxxxxxxxxxx>, <lgirdwood@xxxxxxxxx>, <ralf@xxxxxxxxxxxxxx>, <linux-spi@xxxxxxxxxxxxxxx>, <ysxie@xxxxxxxxxxx>, <wg@xxxxxxxxxxxxxx>, <cyrille.pitchen@xxxxxxxxxx>, <tj@xxxxxxxxxx>, <alexandre.belloni@xxxxxxxxxxxxxxxxxx>, <davem@xxxxxxxxxxxxx>, <andy@xxxxxxxxxxxxx>
- In-reply-to: <20171223134532.GA10103@kroah.com>
- References: <1514026979-33838-1-git-send-email-xieyisheng1@huawei.com> <20171223134532.GA10103@kroah.com>
- User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0
On 2017/12/23 21:45, Greg KH wrote:
> On Sat, Dec 23, 2017 at 07:02:59PM +0800, Yisheng Xie wrote:
>> --- 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
>
> .
>
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Index of Archives]
[Linux Kernel]
[Linux ARM (vger)]
[Linux ARM MSM]
[Linux Omap]
[Linux Arm]
[Linux Tegra]
[Fedora ARM]
[Linux for Samsung SOC]
[eCos]
[Linux Fastboot]
[Gcc Help]
[Git]
[DCCP]
[IETF Announce]
[Security]
[Linux MIPS]
[Yosemite Campsites]
|