From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762151AbdLSKws (ORCPT ); Tue, 19 Dec 2017 05:52:48 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:2734 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1760672AbdLSKwp (ORCPT ); Tue, 19 Dec 2017 05:52:45 -0500 Subject: Re: [PATCH v2] devres: use MACRO instead of function for devm_ioremap To: Greg KH References: <1511601813-20533-1-git-send-email-xieyisheng1@huawei.com> <20171219084641.GA15010@kroah.com> CC: , , , , , From: Yisheng Xie Message-ID: <1e5a475c-47c4-a848-03ba-3af5d187ff76@huawei.com> Date: Tue, 19 Dec 2017 18:52:27 +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: <20171219084641.GA15010@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 Hi Greg, On 2017/12/19 16:46, Greg KH wrote: > On Sat, Nov 25, 2017 at 05:23:33PM +0800, Yisheng Xie wrote: >> Default ioremap is ioremap_nocache, so devm_ioremap has the same function >> with devm_ioremap_nocache, which may just be killed. However, there are >> many places which use devm_ioremap_nocache, while many use devm_ioremap. >> >> This patch is to use MACRO for devm_ioremap, which will reduce the size of >> devres.o from 206824 Bytes to 203768 Bytes. > > Ok, the idea is good, but why not just get rid of the callers of > devm_ioremap_nocache() instead and have them call devm_ioremap() if they > really are the same thing? No need to keep a macro around for the > duplicate thing, just delete the one and things are much better. Yeah, I thought someone may still want to use devm_ioremap_nocache(). I will take your suggestion in next version and kill devm_ioremap_nocache(). Thanks Yisheng Xie > > thanks, > > greg k-h > > . >