* [PATCH][12/37] Clean up duplicate includes in drivers/net/
@ 2007-07-21 15:02 Jesper Juhl
2007-07-21 16:40 ` Chris Snook
2007-07-23 13:22 ` John W. Linville
0 siblings, 2 replies; 6+ messages in thread
From: Jesper Juhl @ 2007-07-21 15:02 UTC (permalink / raw)
To: Linux Kernel Mailing List
Cc: info, Patrick McHardy, Judy Fischbach, Luke Yang, bonding-devel,
Bryan Wu, kong.lai, Jay Vosburgh, James Morris, linuxppc-embedded,
Alexey Kuznetsov, Alex V Lasso, Ulrich Kunitz, Chad Tindel,
Amit S Kale, Jay Cliburn, Samuel Ortiz, Brian Pugh, Daniel Drake,
Chris Snook, alexandre.bounine, Pantelis Antoniou, netdev,
Jesper Juhl, linux-wireless, Ralf Baechle, Vitaly Bordug,
Lukasz Stelmach, Ron Mercer, atl1-devel, Andrew Morton,
David S. Miller, James P Ketrenos
Hi,
This patch cleans up duplicate includes in
drivers/net/
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
---
diff --git a/drivers/net/atl1/atl1_main.c b/drivers/net/atl1/atl1_main.c
index fd1e156..4a18b88 100644
--- a/drivers/net/atl1/atl1_main.c
+++ b/drivers/net/atl1/atl1_main.c
@@ -75,7 +75,6 @@
#include <linux/compiler.h>
#include <linux/delay.h>
#include <linux/mii.h>
-#include <linux/interrupt.h>
#include <net/checksum.h>
#include <asm/atomic.h>
diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c
index 9a08d65..01281ee 100644
--- a/drivers/net/bfin_mac.c
+++ b/drivers/net/bfin_mac.c
@@ -47,15 +47,10 @@
#include <linux/spinlock.h>
#include <linux/ethtool.h>
#include <linux/mii.h>
-
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
-
#include <linux/platform_device.h>
-#include <linux/netdevice.h>
-#include <linux/etherdevice.h>
-#include <linux/skbuff.h>
#include <asm/dma.h>
#include <linux/dma-mapping.h>
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
index 60cccf2..9afd172 100644
--- a/drivers/net/bonding/bond_sysfs.c
+++ b/drivers/net/bonding/bond_sysfs.c
@@ -31,7 +31,6 @@
#include <linux/inetdevice.h>
#include <linux/in.h>
#include <linux/sysfs.h>
-#include <linux/string.h>
#include <linux/ctype.h>
#include <linux/inet.h>
#include <linux/rtnetlink.h>
diff --git a/drivers/net/fs_enet/fs_enet-main.c b/drivers/net/fs_enet/fs_enet-main.c
index a4a2a0e..27de3d8 100644
--- a/drivers/net/fs_enet/fs_enet-main.c
+++ b/drivers/net/fs_enet/fs_enet-main.c
@@ -39,8 +39,6 @@
#include <linux/vmalloc.h>
#include <asm/pgtable.h>
-
-#include <asm/pgtable.h>
#include <asm/irq.h>
#include <asm/uaccess.h>
diff --git a/drivers/net/gianfar.h b/drivers/net/gianfar.h
index d8e779c..43c8668 100644
--- a/drivers/net/gianfar.h
+++ b/drivers/net/gianfar.h
@@ -45,7 +45,6 @@
#include <linux/crc32.h>
#include <linux/workqueue.h>
#include <linux/ethtool.h>
-#include <linux/netdevice.h>
#include <linux/fsl_devices.h>
#include "gianfar_mii.h"
diff --git a/drivers/net/gianfar_ethtool.c b/drivers/net/gianfar_ethtool.c
index 7b411c1..2470903 100644
--- a/drivers/net/gianfar_ethtool.c
+++ b/drivers/net/gianfar_ethtool.c
@@ -34,7 +34,6 @@
#include <linux/module.h>
#include <linux/crc32.h>
#include <asm/types.h>
-#include <asm/uaccess.h>
#include <linux/ethtool.h>
#include <linux/mii.h>
#include <linux/phy.h>
diff --git a/drivers/net/irda/kingsun-sir.c b/drivers/net/irda/kingsun-sir.c
index bdd5c97..4c0d379 100644
--- a/drivers/net/irda/kingsun-sir.c
+++ b/drivers/net/irda/kingsun-sir.c
@@ -66,7 +66,6 @@
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/slab.h>
-#include <linux/module.h>
#include <linux/kref.h>
#include <linux/usb.h>
#include <linux/device.h>
diff --git a/drivers/net/irda/mcs7780.c b/drivers/net/irda/mcs7780.c
index 0de8672..bfc5752 100644
--- a/drivers/net/irda/mcs7780.c
+++ b/drivers/net/irda/mcs7780.c
@@ -50,7 +50,6 @@
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/slab.h>
-#include <linux/module.h>
#include <linux/kref.h>
#include <linux/usb.h>
#include <linux/device.h>
diff --git a/drivers/net/mipsnet.c b/drivers/net/mipsnet.c
index 9853c74..c0f5ad3 100644
--- a/drivers/net/mipsnet.c
+++ b/drivers/net/mipsnet.c
@@ -11,7 +11,6 @@
#include <linux/module.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
-#include <linux/netdevice.h>
#include <linux/platform_device.h>
#include <asm/io.h>
#include <asm/mips-boards/simint.h>
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c
index b703ccf..6ba8e07 100644
--- a/drivers/net/netxen/netxen_nic_main.c
+++ b/drivers/net/netxen/netxen_nic_main.c
@@ -39,7 +39,6 @@
#include "netxen_nic_phan_reg.h"
#include <linux/dma-mapping.h>
-#include <linux/vmalloc.h>
#include <net/ip.h>
MODULE_DESCRIPTION("NetXen Multi port (1/10) Gigabit Network Driver");
diff --git a/drivers/net/qla3xxx.c b/drivers/net/qla3xxx.c
index 8be8be4..c2fc2f7 100755
--- a/drivers/net/qla3xxx.c
+++ b/drivers/net/qla3xxx.c
@@ -31,7 +31,6 @@
#include <linux/skbuff.h>
#include <linux/rtnetlink.h>
#include <linux/if_vlan.h>
-#include <linux/init.h>
#include <linux/delay.h>
#include <linux/mm.h>
diff --git a/drivers/net/tsi108_eth.c b/drivers/net/tsi108_eth.c
index 1aabc91..a059f3d 100644
--- a/drivers/net/tsi108_eth.c
+++ b/drivers/net/tsi108_eth.c
@@ -47,7 +47,6 @@
#include <linux/rtnetlink.h>
#include <linux/timer.h>
#include <linux/platform_device.h>
-#include <linux/etherdevice.h>
#include <asm/system.h>
#include <asm/io.h>
diff --git a/drivers/net/wireless/ipw2200.h b/drivers/net/wireless/ipw2200.h
index 626a240..9c973b9 100644
--- a/drivers/net/wireless/ipw2200.h
+++ b/drivers/net/wireless/ipw2200.h
@@ -45,7 +45,6 @@
#include <linux/firmware.h>
#include <linux/wireless.h>
-#include <linux/dma-mapping.h>
#include <linux/jiffies.h>
#include <asm/io.h>
diff --git a/drivers/net/wireless/zd1211rw/zd_def.h b/drivers/net/wireless/zd1211rw/zd_def.h
index deb99d1..505b4d7 100644
--- a/drivers/net/wireless/zd1211rw/zd_def.h
+++ b/drivers/net/wireless/zd1211rw/zd_def.h
@@ -21,7 +21,6 @@
#include <linux/kernel.h>
#include <linux/stringify.h>
#include <linux/device.h>
-#include <linux/kernel.h>
typedef u16 __nocast zd_addr_t;
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH][12/37] Clean up duplicate includes in drivers/net/
2007-07-21 15:02 [PATCH][12/37] Clean up duplicate includes in drivers/net/ Jesper Juhl
@ 2007-07-21 16:40 ` Chris Snook
2007-07-21 16:46 ` Al Viro
2007-07-21 16:48 ` Jesper Juhl
2007-07-23 13:22 ` John W. Linville
1 sibling, 2 replies; 6+ messages in thread
From: Chris Snook @ 2007-07-21 16:40 UTC (permalink / raw)
To: Jesper Juhl, viro
Cc: info, Patrick McHardy, Judy Fischbach, Luke Yang, bonding-devel,
Bryan Wu, kong.lai, Jay Vosburgh, James Morris, linuxppc-embedded,
Alexey Kuznetsov, Alex V Lasso, Ulrich Kunitz, Chad Tindel,
Amit S Kale, Jay Cliburn, Samuel Ortiz, Brian Pugh, Daniel Drake,
alexandre.bounine, Pantelis Antoniou, netdev, linux-wireless,
Linux Kernel Mailing List, Ralf Baechle, Vitaly Bordug,
Lukasz Stelmach, Ron Mercer, atl1-devel, Andrew Morton,
David S. Miller, James P Ketrenos
Jesper Juhl wrote:
> Hi,
>
> This patch cleans up duplicate includes in
> drivers/net/
>
>
> Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
> ---
>
> diff --git a/drivers/net/atl1/atl1_main.c b/drivers/net/atl1/atl1_main.c
> index fd1e156..4a18b88 100644
> --- a/drivers/net/atl1/atl1_main.c
> +++ b/drivers/net/atl1/atl1_main.c
> @@ -75,7 +75,6 @@
> #include <linux/compiler.h>
> #include <linux/delay.h>
> #include <linux/mii.h>
> -#include <linux/interrupt.h>
> #include <net/checksum.h>
>
> #include <asm/atomic.h>
Define "duplicate". I ask because this patch just got posted a few days ago:
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
drivers/net/atl1/atl1_main.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/net/atl1/atl1_main.c b/drivers/net/atl1/atl1_main.c
index 4a18b88..fd1e156 100644
--- a/drivers/net/atl1/atl1_main.c
+++ b/drivers/net/atl1/atl1_main.c
@@ -75,6 +75,7 @@
#include <linux/compiler.h>
#include <linux/delay.h>
#include <linux/mii.h>
+#include <linux/interrupt.h>
#include <net/checksum.h>
#include <asm/atomic.h>
I've always been under the impression that one should include all the files
whose contents you use directly, because other includes that happen to include
them might no longer need to in the future and cease including them. You can
fight it out with Al if you feel like it. I'm keeping the rest of the CC list
because the other maintainers might have similar feelings about the
appropriateness of these includes in their drivers.
-- Chris
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH][12/37] Clean up duplicate includes in drivers/net/
2007-07-21 16:40 ` Chris Snook
@ 2007-07-21 16:46 ` Al Viro
2007-07-21 16:48 ` Jesper Juhl
1 sibling, 0 replies; 6+ messages in thread
From: Al Viro @ 2007-07-21 16:46 UTC (permalink / raw)
To: Chris Snook
Cc: info, Patrick McHardy, Judy Fischbach, Luke Yang, bonding-devel,
Bryan Wu, kong.lai, Jay Vosburgh, James Morris, linuxppc-embedded,
Alexey Kuznetsov, Alex V Lasso, Ulrich Kunitz, Chad Tindel,
Amit S Kale, Jay Cliburn, Samuel Ortiz, Brian Pugh, Daniel Drake,
alexandre.bounine, Pantelis Antoniou, netdev, Jesper Juhl,
linux-wireless, Linux Kernel Mailing List, Ralf Baechle,
Vitaly Bordug, Lukasz Stelmach, Ron Mercer, atl1-devel,
Andrew Morton, David S. Miller, James P Ketrenos
On Sat, Jul 21, 2007 at 12:40:28PM -0400, Chris Snook wrote:
> Define "duplicate". I ask because this patch just got posted a few days
> ago:
... and it had been wrong - it's really a duplicate (check several lines
above). My apologies.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH][12/37] Clean up duplicate includes in drivers/net/
2007-07-21 16:40 ` Chris Snook
2007-07-21 16:46 ` Al Viro
@ 2007-07-21 16:48 ` Jesper Juhl
2007-07-21 16:50 ` Chris Snook
1 sibling, 1 reply; 6+ messages in thread
From: Jesper Juhl @ 2007-07-21 16:48 UTC (permalink / raw)
To: Chris Snook
Cc: info, Luke Yang, Judy Fischbach, Patrick McHardy, bonding-devel,
Bryan Wu, kong.lai, Jay Vosburgh, James Morris, linuxppc-embedded,
Alexey Kuznetsov, Alex V Lasso, Ulrich Kunitz, Chad Tindel,
Amit S Kale, Jay Cliburn, Samuel Ortiz, Daniel Drake, Brian Pugh,
viro, alexandre.bounine, Pantelis Antoniou, netdev,
linux-wireless, Linux Kernel Mailing List, Ralf Baechle,
Vitaly Bordug, Lukasz Stelmach, Ron Mercer, atl1-devel,
Andrew Morton, David S. Miller, James P Ketrenos
On 21/07/07, Chris Snook <csnook@redhat.com> wrote:
> Jesper Juhl wrote:
> > Hi,
> >
> > This patch cleans up duplicate includes in
> > drivers/net/
> >
> >
> > Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
> > ---
> >
> > diff --git a/drivers/net/atl1/atl1_main.c b/drivers/net/atl1/atl1_main.c
> > index fd1e156..4a18b88 100644
> > --- a/drivers/net/atl1/atl1_main.c
> > +++ b/drivers/net/atl1/atl1_main.c
> > @@ -75,7 +75,6 @@
> > #include <linux/compiler.h>
> > #include <linux/delay.h>
> > #include <linux/mii.h>
> > -#include <linux/interrupt.h>
> > #include <net/checksum.h>
> >
> > #include <asm/atomic.h>
>
> Define "duplicate". I ask because this patch just got posted a few days ago:
>
duplicate == present more than once in the same source file.
Did you try looking at the includes in the source file the patch modifies?
> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
> ---
> drivers/net/atl1/atl1_main.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/atl1/atl1_main.c b/drivers/net/atl1/atl1_main.c
> index 4a18b88..fd1e156 100644
> --- a/drivers/net/atl1/atl1_main.c
> +++ b/drivers/net/atl1/atl1_main.c
> @@ -75,6 +75,7 @@
> #include <linux/compiler.h>
> #include <linux/delay.h>
> #include <linux/mii.h>
> +#include <linux/interrupt.h>
> #include <net/checksum.h>
>
> #include <asm/atomic.h>
>
> I've always been under the impression that one should include all the files
> whose contents you use directly, because other includes that happen to include
> them might no longer need to in the future and cease including them.
I agree completely. But that's completely beside the point here.
Before Al's patch, drivers/net/atl1/atl1_main.c already contained
"#include <linux/interrupt.h>".
> You can
> fight it out with Al if you feel like it. I'm keeping the rest of the CC list
> because the other maintainers might have similar feelings about the
> appropriateness of these includes in their drivers.
>
Take a look at the file. These are the includes at the top of
drivers/net/atl1/atl1_main.c :
...
#include <linux/types.h>
#include <linux/netdevice.h>
#include <linux/pci.h>
#include <linux/spinlock.h>
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/skbuff.h>
#include <linux/etherdevice.h>
#include <linux/if_vlan.h>
#include <linux/irqreturn.h>
#include <linux/workqueue.h>
#include <linux/timer.h>
#include <linux/jiffies.h>
#include <linux/hardirq.h>
#include <linux/interrupt.h> <--- Here we have linux/interrupt.h
#include <linux/irqflags.h>
#include <linux/dma-mapping.h>
#include <linux/net.h>
#include <linux/pm.h>
#include <linux/in.h>
#include <linux/ip.h>
#include <linux/tcp.h>
#include <linux/compiler.h>
#include <linux/delay.h>
#include <linux/mii.h>
#include <linux/interrupt.h> <--- And here we include it again.
#include <net/checksum.h>
#include <asm/atomic.h>
#include <asm/byteorder.h>
#include "atl1.h"
...
Now please tell me why it makes sense to include the same header twice
and why my patch that removes the duplicate does not make sense.
--
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH][12/37] Clean up duplicate includes in drivers/net/
2007-07-21 16:48 ` Jesper Juhl
@ 2007-07-21 16:50 ` Chris Snook
0 siblings, 0 replies; 6+ messages in thread
From: Chris Snook @ 2007-07-21 16:50 UTC (permalink / raw)
To: Jesper Juhl
Cc: info, Luke Yang, Judy Fischbach, Patrick McHardy, bonding-devel,
Bryan Wu, kong.lai, Jay Vosburgh, James Morris, linuxppc-embedded,
Alexey Kuznetsov, Alex V Lasso, Ulrich Kunitz, Chad Tindel,
Amit S Kale, Jay Cliburn, Samuel Ortiz, Daniel Drake, Brian Pugh,
viro, alexandre.bounine, Pantelis Antoniou, netdev,
linux-wireless, Linux Kernel Mailing List, Ralf Baechle,
Vitaly Bordug, Lukasz Stelmach, Ron Mercer, atl1-devel,
Andrew Morton, David S. Miller, James P Ketrenos
Jesper Juhl wrote:
> On 21/07/07, Chris Snook <csnook@redhat.com> wrote:
>> Jesper Juhl wrote:
>> > Hi,
>> >
>> > This patch cleans up duplicate includes in
>> > drivers/net/
>> >
>> >
>> > Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
>> > ---
>> >
>> > diff --git a/drivers/net/atl1/atl1_main.c
>> b/drivers/net/atl1/atl1_main.c
>> > index fd1e156..4a18b88 100644
>> > --- a/drivers/net/atl1/atl1_main.c
>> > +++ b/drivers/net/atl1/atl1_main.c
>> > @@ -75,7 +75,6 @@
>> > #include <linux/compiler.h>
>> > #include <linux/delay.h>
>> > #include <linux/mii.h>
>> > -#include <linux/interrupt.h>
>> > #include <net/checksum.h>
>> >
>> > #include <asm/atomic.h>
>>
>> Define "duplicate". I ask because this patch just got posted a few
>> days ago:
>>
>
> duplicate == present more than once in the same source file.
> Did you try looking at the includes in the source file the patch modifies?
Nope! Mea Culpa.
-- Chris
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH][12/37] Clean up duplicate includes in drivers/net/
2007-07-21 15:02 [PATCH][12/37] Clean up duplicate includes in drivers/net/ Jesper Juhl
2007-07-21 16:40 ` Chris Snook
@ 2007-07-23 13:22 ` John W. Linville
1 sibling, 0 replies; 6+ messages in thread
From: John W. Linville @ 2007-07-23 13:22 UTC (permalink / raw)
To: Jesper Juhl
Cc: info, Luke Yang, Judy Fischbach, Patrick McHardy, bonding-devel,
Bryan Wu, kong.lai, Jay Vosburgh, James Morris, linuxppc-embedded,
Daniel Drake, Alex V Lasso, Ulrich Kunitz, Chad Tindel,
Amit S Kale, Jay Cliburn, Samuel Ortiz, Brian Pugh,
Alexey Kuznetsov, Chris Snook, alexandre.bounine,
Pantelis Antoniou, netdev, linux-wireless,
Linux Kernel Mailing List, Ralf Baechle, Vitaly Bordug,
Lukasz Stelmach, Ron Mercer, atl1-devel, Andrew Morton,
David S. Miller, James P Ketrenos
On Sat, Jul 21, 2007 at 05:02:45PM +0200, Jesper Juhl wrote:
> Hi,
>
> This patch cleans up duplicate includes in
> drivers/net/
>
>
> Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
> diff --git a/drivers/net/wireless/ipw2200.h b/drivers/net/wireless/ipw2200.h
> index 626a240..9c973b9 100644
> --- a/drivers/net/wireless/ipw2200.h
> +++ b/drivers/net/wireless/ipw2200.h
> @@ -45,7 +45,6 @@
>
> #include <linux/firmware.h>
> #include <linux/wireless.h>
> -#include <linux/dma-mapping.h>
> #include <linux/jiffies.h>
> #include <asm/io.h>
>
> diff --git a/drivers/net/wireless/zd1211rw/zd_def.h b/drivers/net/wireless/zd1211rw/zd_def.h
> index deb99d1..505b4d7 100644
> --- a/drivers/net/wireless/zd1211rw/zd_def.h
> +++ b/drivers/net/wireless/zd1211rw/zd_def.h
> @@ -21,7 +21,6 @@
> #include <linux/kernel.h>
> #include <linux/stringify.h>
> #include <linux/device.h>
> -#include <linux/kernel.h>
>
> typedef u16 __nocast zd_addr_t;
ACK
--
John W. Linville
linville@tuxdriver.com
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-07-23 14:05 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-21 15:02 [PATCH][12/37] Clean up duplicate includes in drivers/net/ Jesper Juhl
2007-07-21 16:40 ` Chris Snook
2007-07-21 16:46 ` Al Viro
2007-07-21 16:48 ` Jesper Juhl
2007-07-21 16:50 ` Chris Snook
2007-07-23 13:22 ` John W. Linville
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).