lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 10 Jun 2014 17:45:26 +0300
From:	Stratos Karafotis <stratosk@...aphore.gr>
To:	Viresh Kumar <viresh.kumar@...aro.org>
CC:	"Rafael J. Wysocki" <rjw@...ysocki.net>,
	Dirk Brandewie <dirk.j.brandewie@...el.com>,
	"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 5/7] cpufreq: intel_pstate: Remove redundant includes

On 10/06/2014 08:29 πμ, Viresh Kumar wrote:
> On 10 June 2014 02:30, Stratos Karafotis <stratosk@...aphore.gr> wrote:
>> Also put them in alphabetical order.
>>
>> Signed-off-by: Stratos Karafotis <stratosk@...aphore.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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ