Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1649896
| From | David Miller <davem@davemloft.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v6 net-next 01/17] net: qualcomm: remove unnecessary includes |
| Date | 2017-05-24 21:50 +0200 |
| Message-ID | <tKKsa-6vf-9@gated-at.bofh.it> (permalink) |
| References | <tKhTb-3GR-3@gated-at.bofh.it> <tKhTd-3GR-55@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Stefan Wahren <stefan.wahren@i2se.com> Date: Tue, 23 May 2017 15:12:37 +0200 > Most of the includes in qca_7k.c are unnecessary so we better remove them. > > Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> > --- > drivers/net/ethernet/qualcomm/qca_7k.c | 4 ---- > 1 file changed, 4 deletions(-) > > diff --git a/drivers/net/ethernet/qualcomm/qca_7k.c b/drivers/net/ethernet/qualcomm/qca_7k.c > index f0066fb..557d53c 100644 > --- a/drivers/net/ethernet/qualcomm/qca_7k.c > +++ b/drivers/net/ethernet/qualcomm/qca_7k.c > @@ -23,11 +23,7 @@ > * kernel-based SPI device. > */ > > -#include <linux/init.h> > -#include <linux/module.h> > -#include <linux/moduleparam.h> > #include <linux/spi/spi.h> > -#include <linux/version.h> > > #include "qca_7k.h" > > -- > 2.1.4 > Changes like this drive me crazy. The only reason you can remove those headers is because you are obtaining things indirectly via qca_7k.h And if that is indeed the case, you are also getting qca_spi.h which in turn includes linux/spi/spi.h So you could have removed that as well. But seriously, it is so much harder to understand a driver and what interfaces it needs via header files when you hide _all_ of it behind these local private header files which just include _everything_ and then _every_ foo.c file in your driver gets _all_ of those kernel headers whether they need it or not. So if just one foo.c file needs 20 extra kernel headers than the rest of the files in the driver, every foo.c file eats that cost of including them. I really don't like when drivers move in this direction for that reason. And at best, as described at the beginning of my response, this change is incomplete.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v6 net-next 00/17] net: qualcomm: add QCA7000 UART driver Stefan Wahren <stefan.wahren@i2se.com> - 2017-05-23 15:20 +0200
[PATCH v6 net-next 07/17] net: qca_spi: remove QCASPI_MTU Stefan Wahren <stefan.wahren@i2se.com> - 2017-05-23 15:20 +0200
[PATCH v6 net-next 09/17] net: qca_spi: Clarify MODULE_DESCRIPTION Stefan Wahren <stefan.wahren@i2se.com> - 2017-05-23 15:20 +0200
[PATCH v6 net-next 03/17] net: qca_7k: Use BIT macro Stefan Wahren <stefan.wahren@i2se.com> - 2017-05-23 15:20 +0200
[PATCH v6 net-next 14/17] dt-bindings: qca7000: rename binding Stefan Wahren <stefan.wahren@i2se.com> - 2017-05-23 15:20 +0200
[PATCH v6 net-next 10/17] net: qualcomm: rename qca_framing.c to qca_7k_common.c Stefan Wahren <stefan.wahren@i2se.com> - 2017-05-23 15:20 +0200
[PATCH v6 net-next 04/17] net: qca_spi: Use SET_NETDEV_DEV() Stefan Wahren <stefan.wahren@i2se.com> - 2017-05-23 15:20 +0200
[PATCH v6 net-next 12/17] net: qualcomm: make qca_7k_common a separate kernel module Stefan Wahren <stefan.wahren@i2se.com> - 2017-05-23 15:20 +0200
[PATCH v6 net-next 06/17] net: qualcomm: Improve readability of length defines Stefan Wahren <stefan.wahren@i2se.com> - 2017-05-23 15:20 +0200
[PATCH v6 net-next 05/17] net: qualcomm: use net_device_ops instead of direct call Stefan Wahren <stefan.wahren@i2se.com> - 2017-05-23 15:20 +0200
[PATCH v6 net-next 15/17] dt-bindings: slave-device: add current-speed property Stefan Wahren <stefan.wahren@i2se.com> - 2017-05-23 15:20 +0200
[PATCH v6 net-next 02/17] net: qca_framing: use u16 for frame offset Stefan Wahren <stefan.wahren@i2se.com> - 2017-05-23 15:20 +0200
[PATCH v6 net-next 01/17] net: qualcomm: remove unnecessary includes Stefan Wahren <stefan.wahren@i2se.com> - 2017-05-23 15:20 +0200
Re: [PATCH v6 net-next 01/17] net: qualcomm: remove unnecessary includes David Miller <davem@davemloft.net> - 2017-05-24 21:50 +0200
Re: [PATCH v6 net-next 01/17] net: qualcomm: remove unnecessary includes Stefan Wahren <stefan.wahren@i2se.com> - 2017-05-24 22:10 +0200
Re: [PATCH v6 net-next 01/17] net: qualcomm: remove unnecessary includes David Miller <davem@davemloft.net> - 2017-05-24 22:50 +0200
csiph-web