Re: [PATCH 3/3] dynamic_debug: remove unneeded includes

From: Jim Cromie
Date: Sat May 05 2012 - 01:53:29 EST


Hi Stephen,

On Fri, May 4, 2012 at 10:36 PM, Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> wrote:
> Hi Jim,
>
> On Thu,  3 May 2012 11:57:39 -0600 Jim Cromie <jim.cromie@xxxxxxxxx> wrote:
>>
>> These arent currently needed, so drop them.  Some will probably get
>> re-added when static-branches are added, but include loops prevent
>> that at present.
>
> How sure are you that these are not needed?  Has this been done by
> inspection, or by compile testing?  How widely have you compile tested?
>

compiled on Core, and boot tested on i586
also recently compiled on x86_64

IIRC (its been a while) I just commented them all out,
and uncommented the ones needed to compile ok.

That doesnt mean theyre not being included indirectly,
so youre right to be paranoid.

> I took a brief look ...
>
>>
>> Signed-off-by: Jim Cromie <jim.cromie@xxxxxxxxx>
>> ---
>>  lib/dynamic_debug.c |   10 ----------
>>  1 files changed, 0 insertions(+), 10 deletions(-)
>>
>> diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
>> index 7ca29a0..fc5d270 100644
>> --- a/lib/dynamic_debug.c
>> +++ b/lib/dynamic_debug.c
>> @@ -14,24 +14,14 @@
>>
>>  #include <linux/kernel.h>
>>  #include <linux/module.h>
>> -#include <linux/moduleparam.h>
>
> There is a use of module_param() in this file ...
>
>> -#include <linux/kallsyms.h>
>> -#include <linux/types.h>
>>  #include <linux/mutex.h>
>> -#include <linux/proc_fs.h>
>>  #include <linux/seq_file.h>
>> -#include <linux/list.h>
>
> List_for_each_entry is used ...
>
>> -#include <linux/sysctl.h>
>>  #include <linux/ctype.h>
>> -#include <linux/string.h>
>
> strlen() is used ...
>
>> -#include <linux/uaccess.h>
>
> copy_from_user() is used ...


>
>>  #include <linux/dynamic_debug.h>
>>  #include <linux/debugfs.h>
>>  #include <linux/slab.h>
>> -#include <linux/jump_label.h>
>>  #include <linux/hardirq.h>
>>  #include <linux/sched.h>
>> -#include <linux/device.h>
>
> struct device is referenced ...
>
> I am a bit more paranoid about these things than most.

I guess I better make lib/dynamic_debug.i
inspect the file, and possibly revert parts of this patch.

> --
> Cheers,
> Stephen Rothwell                    sfr@xxxxxxxxxxxxxxxx
> http://www.canb.auug.org.au/~sfr/


thanks for taking that look.
Jim


BTW, how were you carrying that merge conflict resolution ?
git rerere ?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/