Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux: Kernel

[PATCH 3/3] dynamic_debug: remove unneeded includes

 

 

Linux kernel RSS feed   Index | Next | Previous | View Threaded


jim.cromie at gmail

May 3, 2012, 10:57 AM

Post #1 of 4 (82 views)
Permalink
[PATCH 3/3] dynamic_debug: remove unneeded includes

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.

Signed-off-by: Jim Cromie <jim.cromie [at] gmail>
---
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>
-#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>
-#include <linux/sysctl.h>
#include <linux/ctype.h>
-#include <linux/string.h>
-#include <linux/uaccess.h>
#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>
#include <linux/netdevice.h>

extern struct _ddebug __start___verbose[];
--
1.7.8.1

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


sfr at canb

May 4, 2012, 9:36 PM

Post #2 of 4 (76 views)
Permalink
Re: [PATCH 3/3] dynamic_debug: remove unneeded includes [In reply to]

Hi Jim,

On Thu, 3 May 2012 11:57:39 -0600 Jim Cromie <jim.cromie [at] gmail> 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?

I took a brief look ...

>
> Signed-off-by: Jim Cromie <jim.cromie [at] gmail>
> ---
> 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.
--
Cheers,
Stephen Rothwell sfr [at] canb
http://www.canb.auug.org.au/~sfr/


jim.cromie at gmail

May 4, 2012, 10:52 PM

Post #3 of 4 (75 views)
Permalink
Re: [PATCH 3/3] dynamic_debug: remove unneeded includes [In reply to]

Hi Stephen,

On Fri, May 4, 2012 at 10:36 PM, Stephen Rothwell <sfr [at] canb> wrote:
> Hi Jim,
>
> On Thu,  3 May 2012 11:57:39 -0600 Jim Cromie <jim.cromie [at] gmail> 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 [at] gmail>
>> ---
>>  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 [at] canb
> 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 [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


sfr at canb

May 4, 2012, 11:08 PM

Post #4 of 4 (77 views)
Permalink
Re: [PATCH 3/3] dynamic_debug: remove unneeded includes [In reply to]

Hi Jim,

On Fri, 4 May 2012 23:52:24 -0600 Jim Cromie <jim.cromie [at] gmail> wrote:
>
> compiled on Core, and boot tested on i586
> also recently compiled on x86_64

Yeah, the problem being that we have 27 architectures. a large number of
platforms and en enormous number of CONFIG variables and all of these
things can affect whet gets implicitly included.

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

I am not sure that would help much (see above). Also note Rule 1 from
Documentation/SubmitChecklist :-)

> BTW, how were you carrying that merge conflict resolution ?
> git rerere ?

Yep.

--
Cheers,
Stephen Rothwell sfr [at] canb
http://www.canb.auug.org.au/~sfr/

Linux kernel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.