linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stratos Karafotis <stratosk@semaphore.gr>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Dirk Brandewie <dirk.j.brandewie@intel.com>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 5/7] cpufreq: intel_pstate: Remove redundant includes
Date: Tue, 10 Jun 2014 17:45:26 +0300	[thread overview]
Message-ID: <53971A06.20906@semaphore.gr> (raw)
In-Reply-To: <CAKohpokJfS=wFFFuqc26tnojTViuejVQMXGn18DAqrN+j0Zihw@mail.gmail.com>

On 10/06/2014 08:29 πμ, Viresh Kumar wrote:
> On 10 June 2014 02:30, Stratos Karafotis <stratosk@semaphore.gr> wrote:
>> Also put them in alphabetical order.
>>
>> Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
>> ---
>>  drivers/cpufreq/intel_pstate.c | 17 ++---------------
>>  1 file changed, 2 insertions(+), 15 deletions(-)
>>
>> diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
>> index 26a0262..d4f0518 100644
>> --- a/drivers/cpufreq/intel_pstate.c
>> +++ b/drivers/cpufreq/intel_pstate.c
>> @@ -10,26 +10,13 @@
>>   * of the License.
>>   */
>>
>> -#include <linux/kernel.h>
>> -#include <linux/kernel_stat.h>
>> -#include <linux/module.h>
>> -#include <linux/ktime.h>
>> -#include <linux/hrtimer.h>
>> -#include <linux/tick.h>
>> -#include <linux/slab.h>
>> -#include <linux/sched.h>
>> -#include <linux/list.h>
>> +#include <linux/acpi.h>
>>  #include <linux/cpu.h>
>>  #include <linux/cpufreq.h>
>> -#include <linux/sysfs.h>
>> -#include <linux/types.h>
>> -#include <linux/fs.h>
>>  #include <linux/debugfs.h>
>> -#include <linux/acpi.h>
>> +#include <linux/module.h>
>>  #include <trace/events/power.h>
>>
>> -#include <asm/div64.h>
>> -#include <asm/msr.h>
>>  #include <asm/cpu_device_id.h>
> 
> As a rule, header files for all the symbols directly used by a file must
> be included directly by the file and must not depend on indirect inclusions.
> 
> So even if it compiles, its the wrong thing to do. Though you can obviously
> remove the headers which aren't used.
> 

I didn't know this. I will drop this patch. I'm sorry for the noise.

Thanks for your comments!
Stratos


      reply	other threads:[~2014-06-10 14:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-09 21:00 [PATCH 5/7] cpufreq: intel_pstate: Remove redundant includes Stratos Karafotis
2014-06-10  5:29 ` Viresh Kumar
2014-06-10 14:45   ` Stratos Karafotis [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53971A06.20906@semaphore.gr \
    --to=stratosk@semaphore.gr \
    --cc=dirk.j.brandewie@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=viresh.kumar@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).