From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751824AbdLYBoK (ORCPT ); Sun, 24 Dec 2017 20:44:10 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:2726 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751112AbdLYBoG (ORCPT ); Sun, 24 Dec 2017 20:44:06 -0500 Subject: Re: [PATCH v3 27/27] devres: kill devm_ioremap_nocache To: Greg KH References: <1514026979-33838-1-git-send-email-xieyisheng1@huawei.com> <20171223134532.GA10103@kroah.com> CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , From: Yisheng Xie Message-ID: <4d0991ec-9cd4-0c33-5560-ae9c2c762765@huawei.com> Date: Mon, 25 Dec 2017 09:43:40 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: <20171223134532.GA10103@kroah.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.29.40] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > > . >