* [PATCH] vlynq: remove duplicated #include
@ 2009-07-07 21:36 Florian Fainelli
2009-07-07 23:54 ` Hannes Eder
0 siblings, 1 reply; 5+ messages in thread
From: Florian Fainelli @ 2009-07-07 21:36 UTC (permalink / raw)
To: kernel-janitors; +Cc: linux-kernel, Andrew Morton
Remove duplicated #include('s) in drivers/vlynq/vlynq.c
Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
diff --git a/drivers/vlynq/vlynq.c b/drivers/vlynq/vlynq.c
index f05d2a3..ba3d71f 100644
--- a/drivers/vlynq/vlynq.c
+++ b/drivers/vlynq/vlynq.c
@@ -28,7 +28,6 @@
#include <linux/errno.h>
#include <linux/platform_device.h>
#include <linux/interrupt.h>
-#include <linux/device.h>
#include <linux/delay.h>
#include <linux/io.h>
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] vlynq: remove duplicated #include 2009-07-07 21:36 [PATCH] vlynq: remove duplicated #include Florian Fainelli @ 2009-07-07 23:54 ` Hannes Eder 2009-07-08 6:40 ` Florian Fainelli 0 siblings, 1 reply; 5+ messages in thread From: Hannes Eder @ 2009-07-07 23:54 UTC (permalink / raw) To: Florian Fainelli; +Cc: kernel-janitors, linux-kernel, Andrew Morton On Tue, Jul 7, 2009 at 23:36, Florian Fainelli<florian@openwrt.org> wrote: > Remove duplicated #include('s) in drivers/vlynq/vlynq.c The following little script catches more of these issues, though it might be a bit fragile: #!/bin/bash find . -name "*.c" | \ while read file; do dblinc=$(grep "^#include <" $file | sort | uniq -c | grep -v "^ 1 ") [ "$dblinc" != "" ] && echo $file: $dblinc done when ran from the linux-2.6 src tree, the output is something like (lines starting with '#' are my annotations): ./mm/slab.c: 3 #include <linux/kmalloc_sizes.h> # this is a false positive ./mm/slqb.c: 2 #include <linux/seq_file.h> # I did not look a this one ./mm/shmem.c: 2 #include <linux/vfs.h> # this is a hit # the rest (about 50 hits) skipped Do you want to investigate this issues? Cheers, Hannes ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] vlynq: remove duplicated #include 2009-07-07 23:54 ` Hannes Eder @ 2009-07-08 6:40 ` Florian Fainelli 2009-07-08 11:50 ` Robert P. J. Day 0 siblings, 1 reply; 5+ messages in thread From: Florian Fainelli @ 2009-07-08 6:40 UTC (permalink / raw) To: Hannes Eder; +Cc: kernel-janitors, linux-kernel, Andrew Morton, Huang Weiyi Hi Hannes, Le Wednesday 08 July 2009 01:54:14 Hannes Eder, vous avez écrit : > On Tue, Jul 7, 2009 at 23:36, Florian Fainelli<florian@openwrt.org> wrote: > > Remove duplicated #include('s) in drivers/vlynq/vlynq.c > > The following little script catches more of these issues, though it > might be a bit fragile: > > #!/bin/bash > find . -name "*.c" | \ > while read file; do > dblinc=$(grep "^#include <" $file | sort | uniq -c | grep -v "^ 1 > ") [ "$dblinc" != "" ] && echo $file: $dblinc > done > > when ran from the linux-2.6 src tree, the output is something like > (lines starting with '#' are my annotations): > > ./mm/slab.c: 3 #include <linux/kmalloc_sizes.h> > # this is a false positive > ./mm/slqb.c: 2 #include <linux/seq_file.h> > # I did not look a this one > ./mm/shmem.c: 2 #include <linux/vfs.h> > # this is a hit > # the rest (about 50 hits) skipped > > Do you want to investigate this issues? I will not, at least not now, but Huang (CC'd) might be interested. -- Best regards, Florian Fainelli Email : florian@openwrt.org http://openwrt.org ------------------------------- ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] vlynq: remove duplicated #include 2009-07-08 6:40 ` Florian Fainelli @ 2009-07-08 11:50 ` Robert P. J. Day 2009-07-08 12:28 ` Hannes Eder 0 siblings, 1 reply; 5+ messages in thread From: Robert P. J. Day @ 2009-07-08 11:50 UTC (permalink / raw) To: Florian Fainelli Cc: Hannes Eder, kernel-janitors, linux-kernel, Andrew Morton, Huang Weiyi [-- Attachment #1: Type: TEXT/PLAIN, Size: 1756 bytes --] On Wed, 8 Jul 2009, Florian Fainelli wrote: > Hi Hannes, > > Le Wednesday 08 July 2009 01:54:14 Hannes Eder, vous avez écrit : > > On Tue, Jul 7, 2009 at 23:36, Florian Fainelli<florian@openwrt.org> wrote: > > > Remove duplicated #include('s) in drivers/vlynq/vlynq.c > > > > The following little script catches more of these issues, though it > > might be a bit fragile: > > > > #!/bin/bash > > find . -name "*.c" | \ > > while read file; do > > dblinc=$(grep "^#include <" $file | sort | uniq -c | grep -v "^ 1 > > ") [ "$dblinc" != "" ] && echo $file: $dblinc > > done > > > > when ran from the linux-2.6 src tree, the output is something like > > (lines starting with '#' are my annotations): > > > > ./mm/slab.c: 3 #include <linux/kmalloc_sizes.h> > > # this is a false positive > > ./mm/slqb.c: 2 #include <linux/seq_file.h> > > # I did not look a this one > > ./mm/shmem.c: 2 #include <linux/vfs.h> > > # this is a hit > > # the rest (about 50 hits) skipped > > > > Do you want to investigate this issues? > > I will not, at least not now, but Huang (CC'd) might be interested. isn't "make includecheck" supposed to identify duplicated includes? why aren't you using that? rday -- ======================================================================== Robert P. J. Day Waterloo, Ontario, CANADA Linux Consulting, Training and Annoying Kernel Pedantry. Web page: http://crashcourse.ca Linked In: http://www.linkedin.com/in/rpjday Twitter: http://twitter.com/rpjday ======================================================================== ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] vlynq: remove duplicated #include 2009-07-08 11:50 ` Robert P. J. Day @ 2009-07-08 12:28 ` Hannes Eder 0 siblings, 0 replies; 5+ messages in thread From: Hannes Eder @ 2009-07-08 12:28 UTC (permalink / raw) To: Robert P. J. Day Cc: Florian Fainelli, kernel-janitors, linux-kernel, Andrew Morton, Huang Weiyi On Wed, Jul 8, 2009 at 13:50, Robert P. J. Day<rpjday@crashcourse.ca> wrote: > On Wed, 8 Jul 2009, Florian Fainelli wrote: > >> Hi Hannes, >> >> Le Wednesday 08 July 2009 01:54:14 Hannes Eder, vous avez écrit : >> > On Tue, Jul 7, 2009 at 23:36, Florian Fainelli<florian@openwrt.org> wrote: >> > > Remove duplicated #include('s) in drivers/vlynq/vlynq.c >> > >> > The following little script catches more of these issues, though it >> > might be a bit fragile: >> > >> > #!/bin/bash >> > find . -name "*.c" | \ >> > while read file; do >> > dblinc=$(grep "^#include <" $file | sort | uniq -c | grep -v "^ 1 >> > ") [ "$dblinc" != "" ] && echo $file: $dblinc >> > done >> > >> > when ran from the linux-2.6 src tree, the output is something like >> > (lines starting with '#' are my annotations): >> > >> > ./mm/slab.c: 3 #include <linux/kmalloc_sizes.h> >> > # this is a false positive >> > ./mm/slqb.c: 2 #include <linux/seq_file.h> >> > # I did not look a this one >> > ./mm/shmem.c: 2 #include <linux/vfs.h> >> > # this is a hit >> > # the rest (about 50 hits) skipped >> > >> > Do you want to investigate this issues? >> >> I will not, at least not now, but Huang (CC'd) might be interested. > > isn't "make includecheck" supposed to identify duplicated includes? > why aren't you using that? Hey man, do not stop me from invent the wheel again, and again, and again, ... ;). You are right "make includecheck" does the trick check for duplicated includes, in it does so in a much nicer way. Thanks, -Hannes ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-07-08 12:28 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-07-07 21:36 [PATCH] vlynq: remove duplicated #include Florian Fainelli 2009-07-07 23:54 ` Hannes Eder 2009-07-08 6:40 ` Florian Fainelli 2009-07-08 11:50 ` Robert P. J. Day 2009-07-08 12:28 ` Hannes Eder
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox