From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757010AbcHWGl4 (ORCPT ); Tue, 23 Aug 2016 02:41:56 -0400 Received: from mail.kapsi.fi ([217.30.184.167]:33018 "EHLO mail.kapsi.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756666AbcHWGly (ORCPT ); Tue, 23 Aug 2016 02:41:54 -0400 Date: Tue, 23 Aug 2016 09:41:52 +0300 From: Mikko Rapeli To: Stephen Hemminger Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH v05 21/72] include/uapi/linux/if_pppox.h: include linux/if.h Message-ID: <20160823064152.GJ5399@lakka.kapsi.fi> References: <1471890809-4383-1-git-send-email-mikko.rapeli@iki.fi> <1471890809-4383-22-git-send-email-mikko.rapeli@iki.fi> <20160822123745.7921a88d@xeon-e3> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20160822123745.7921a88d@xeon-e3> X-SA-Exim-Connect-IP: 2001:1bc8:1004::1 X-SA-Exim-Mail-From: mikko.rapeli@iki.fi X-SA-Exim-Scanned: No (on mail.kapsi.fi); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 22, 2016 at 12:37:45PM -0700, Stephen Hemminger wrote: > On Mon, 22 Aug 2016 20:32:38 +0200 > Mikko Rapeli wrote: > > > Fixes userspace compilation error: > > > > error: ‘IFNAMSIZ’ undeclared here (not in a function) > > > > Signed-off-by: Mikko Rapeli > > --- > > include/uapi/linux/if_pppox.h | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/include/uapi/linux/if_pppox.h b/include/uapi/linux/if_pppox.h > > index e128769..473c3c4 100644 > > --- a/include/uapi/linux/if_pppox.h > > +++ b/include/uapi/linux/if_pppox.h > > @@ -21,6 +21,7 @@ > > #include > > > > #include > > +#include > > #include > > #include > > > > I went back to the first patch in LKML for this series. > It seems your goal is that every include file should be standalone, > i.e it must include every definition it uses. > > I disagree with this premise. It just makes things harder to maintain with > no real gain for any existing program. What is the motivation for all this > useless churn? Is there some silly style rule that should be fixed instead? With over 700 uapi headers exported to userspace by Linux kernel, how do I find out the 'correct' order of including them if they can not be included alone? Any hints on automating that? My first trial was to include all of the uapi headers as a single bunch to abi checker tool which calls gcc on them, but the compilation result was so bad and hopeless that I decided to try feeding each header file one by one to the compiler and here I am over two years later still fixing these issues. I came up with the rule because to me it makes sense. Several kernel devs agree with this approach and have accepted patches. If your kernel subsystem uapi headers have a single entry point header file, then all of the others can just depend on that and be done with it. For example most (if not all) drm driver specific headers include . -Mikko