From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Gortmaker Subject: Re: [PATCH] drivers/cpufreq: delete non-required instances of include Date: Thu, 9 Jan 2014 10:26:20 -0500 Message-ID: <52CEBF9C.10604@windriver.com> References: <1389280207-11846-1-git-send-email-paul.gortmaker@windriver.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-pm-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii" To: Viresh Kumar Cc: Kevin Hilman , "Rafael J. Wysocki" , "cpufreq@vger.kernel.org" , Linux PM list On 14-01-09 10:17 AM, Viresh Kumar wrote: > On Thu, Jan 9, 2014 at 8:40 PM, Paul Gortmaker > wrote: >> None of these files are actually using any __init type directives >> and hence don't need to include . Most are just a >> left over from __devinit and __cpuinit removal, or simply due to >> code getting copied from one driver to the next. > > Are you sure? Its not only about devinit or cpuinit but module_init() > and others as well. And they are pretty much used by most of them. Yes I am sure. I start with this: ------------- #!/bin/bash if [ "$1" = "" ]; then echo must supply path name exit 1 fi for i in `git grep -l linux/init.h $1` ; do grep -q '__ref\|__init\|__cpuinit\|__meminit\|__MEMINIT\|__CPUINIT\|__INIT\|__REF\|__HEAD' $i if [ $? != 0 ] ; then echo $i sed -i '/linux\/init.h/d' $i fi done -------------- which as you can see whitelists any real users, and then I follow up with build testing to double check. I will note that in this particular case, I couldn't find an ARM defconfig that actually enabled any CONFIG_ARM_S3C24xx options though. Paul.