From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754657AbdEXTlU (ORCPT ); Wed, 24 May 2017 15:41:20 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:49574 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754422AbdEXTlO (ORCPT ); Wed, 24 May 2017 15:41:14 -0400 Date: Wed, 24 May 2017 15:41:11 -0400 (EDT) Message-Id: <20170524.154111.404338711401048909.davem@davemloft.net> To: stefan.wahren@i2se.com Cc: robh+dt@kernel.org, mark.rutland@arm.com, gregkh@linuxfoundation.org, jslaby@suse.com, LinoSanfilippo@gmx.de, kubakici@wp.pl, devicetree@vger.kernel.org, netdev@vger.kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v6 net-next 01/17] net: qualcomm: remove unnecessary includes From: David Miller In-Reply-To: <1495545173-22150-2-git-send-email-stefan.wahren@i2se.com> References: <1495545173-22150-1-git-send-email-stefan.wahren@i2se.com> <1495545173-22150-2-git-send-email-stefan.wahren@i2se.com> X-Mailer: Mew version 6.7 on Emacs 25.2 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Wed, 24 May 2017 11:59:39 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Stefan Wahren 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 > --- > 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 > -#include > -#include > #include > -#include > > #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.