From: Paul Gortmaker <paul.gortmaker@windriver.com> To: linux-kernel@vger.kernel.org Cc: Paul Gortmaker <paul.gortmaker@windriver.com>, Ajay Thomas <ajay.thomas.david.rajamanickam@intel.com>, Alexandre Courbot <gnurou@gmail.com>, Andy Shevchenko <andy.shevchenko@gmail.com>, Bin Gao <bin.gao@intel.com>, Keguang Zhang <keguang.zhang@gmail.com>, Linus Walleij <linus.walleij@linaro.org>, linux-gpio@vger.kernel.org, linux-mips@linux-mips.org, Mika Westerberg <mika.westerberg@linux.intel.com> Subject: [PATCH 0/8] gpio: wean gpio/driver.h off of module.h Date: Mon, 12 Sep 2016 18:16:23 -0400 [thread overview] Message-ID: <20160912221631.15812-1-paul.gortmaker@windriver.com> (raw) Most shared headers in include/linux don't need to know what the internals of a struct module are; all they care about is that it is a struct and hence they may require a pointer to one. The advantage in this is that module.h is including a lot of stuff itself, and an otherwise empty C file that just contains module.h will result in ~750kB from CPP (compared to say 12kB from init.h) So we have approximately 50 instances of "struct module;" in the various include/linux headers already that help us keep module.h out of other headers; here we do the same for gpio. But before we do, we fix up seven instances of code that were implicitly relying on this module.h so that we don't introduce build failures into the git history. Some are tristate, so we just explicitly add module.h to them. The others are non-modular, so we just prune them off of the module based macros, so that module.h is no longer required to compile. This series built on top of linux-next for arm, arm64, i386, x86_64 without any issues (allmodconfig). --- Cc: Ajay Thomas <ajay.thomas.david.rajamanickam@intel.com> Cc: Alexandre Courbot <gnurou@gmail.com> Cc: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Bin Gao <bin.gao@intel.com> Cc: Keguang Zhang <keguang.zhang@gmail.com> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: linux-gpio@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: Mika Westerberg <mika.westerberg@linux.intel.com> Paul Gortmaker (8): gpio: palmas: fix implicit assumption module.h is present gpio: sx150x: fix implicit assumption module.h is present gpio: ts4800: fix implicit assumption module.h is present gpio: altera: fix implicit assumption module.h is present gpio: ath79: fix implicit assumption module.h is present gpio: loongson1: fix implicit assumption module.h is present gpio: wcove: fix implicit assumption module.h is present gpio: don't include module.h in shared driver header drivers/gpio/gpio-altera.c | 1 + drivers/gpio/gpio-ath79.c | 1 + drivers/gpio/gpio-loongson1.c | 1 + drivers/gpio/gpio-palmas.c | 1 - drivers/gpio/gpio-sx150x.c | 2 -- drivers/gpio/gpio-ts4800.c | 1 + drivers/gpio/gpio-wcove.c | 1 + include/linux/gpio/driver.h | 2 +- 8 files changed, 6 insertions(+), 4 deletions(-) -- 2.8.4
WARNING: multiple messages have this Message-ID (diff)
From: Paul Gortmaker <paul.gortmaker@windriver.com> To: <linux-kernel@vger.kernel.org> Cc: Paul Gortmaker <paul.gortmaker@windriver.com>, Ajay Thomas <ajay.thomas.david.rajamanickam@intel.com>, Alexandre Courbot <gnurou@gmail.com>, Andy Shevchenko <andy.shevchenko@gmail.com>, Bin Gao <bin.gao@intel.com>, Keguang Zhang <keguang.zhang@gmail.com>, Linus Walleij <linus.walleij@linaro.org>, <linux-gpio@vger.kernel.org>, <linux-mips@linux-mips.org>, Mika Westerberg <mika.westerberg@linux.intel.com> Subject: [PATCH 0/8] gpio: wean gpio/driver.h off of module.h Date: Mon, 12 Sep 2016 18:16:23 -0400 [thread overview] Message-ID: <20160912221631.15812-1-paul.gortmaker@windriver.com> (raw) Most shared headers in include/linux don't need to know what the internals of a struct module are; all they care about is that it is a struct and hence they may require a pointer to one. The advantage in this is that module.h is including a lot of stuff itself, and an otherwise empty C file that just contains module.h will result in ~750kB from CPP (compared to say 12kB from init.h) So we have approximately 50 instances of "struct module;" in the various include/linux headers already that help us keep module.h out of other headers; here we do the same for gpio. But before we do, we fix up seven instances of code that were implicitly relying on this module.h so that we don't introduce build failures into the git history. Some are tristate, so we just explicitly add module.h to them. The others are non-modular, so we just prune them off of the module based macros, so that module.h is no longer required to compile. This series built on top of linux-next for arm, arm64, i386, x86_64 without any issues (allmodconfig). --- Cc: Ajay Thomas <ajay.thomas.david.rajamanickam@intel.com> Cc: Alexandre Courbot <gnurou@gmail.com> Cc: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Bin Gao <bin.gao@intel.com> Cc: Keguang Zhang <keguang.zhang@gmail.com> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: linux-gpio@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: Mika Westerberg <mika.westerberg@linux.intel.com> Paul Gortmaker (8): gpio: palmas: fix implicit assumption module.h is present gpio: sx150x: fix implicit assumption module.h is present gpio: ts4800: fix implicit assumption module.h is present gpio: altera: fix implicit assumption module.h is present gpio: ath79: fix implicit assumption module.h is present gpio: loongson1: fix implicit assumption module.h is present gpio: wcove: fix implicit assumption module.h is present gpio: don't include module.h in shared driver header drivers/gpio/gpio-altera.c | 1 + drivers/gpio/gpio-ath79.c | 1 + drivers/gpio/gpio-loongson1.c | 1 + drivers/gpio/gpio-palmas.c | 1 - drivers/gpio/gpio-sx150x.c | 2 -- drivers/gpio/gpio-ts4800.c | 1 + drivers/gpio/gpio-wcove.c | 1 + include/linux/gpio/driver.h | 2 +- 8 files changed, 6 insertions(+), 4 deletions(-) -- 2.8.4
next reply other threads:[~2016-09-12 22:16 UTC|newest] Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-09-12 22:16 Paul Gortmaker [this message] 2016-09-12 22:16 ` [PATCH 0/8] gpio: wean gpio/driver.h off of module.h Paul Gortmaker 2016-09-12 22:16 ` [PATCH 1/8] gpio: palmas: fix implicit assumption module.h is present Paul Gortmaker 2016-09-12 22:16 ` Paul Gortmaker 2016-09-15 11:58 ` Linus Walleij 2016-09-12 22:16 ` [PATCH 2/8] gpio: sx150x: " Paul Gortmaker 2016-09-12 22:16 ` Paul Gortmaker 2016-09-15 11:59 ` Linus Walleij 2016-09-12 22:16 ` [PATCH 3/8] gpio: ts4800: " Paul Gortmaker 2016-09-12 22:16 ` Paul Gortmaker 2016-09-15 12:00 ` Linus Walleij 2016-09-12 22:16 ` [PATCH 4/8] gpio: altera: " Paul Gortmaker 2016-09-12 22:16 ` Paul Gortmaker 2016-09-15 12:01 ` Linus Walleij 2016-09-12 22:16 ` [PATCH 5/8] gpio: ath79: " Paul Gortmaker 2016-09-12 22:16 ` Paul Gortmaker 2016-09-15 12:02 ` Linus Walleij 2016-09-12 22:16 ` [PATCH 6/8] gpio: loongson1: " Paul Gortmaker 2016-09-12 22:16 ` Paul Gortmaker 2016-09-15 12:03 ` Linus Walleij 2016-09-12 22:16 ` [PATCH 7/8] gpio: wcove: " Paul Gortmaker 2016-09-12 22:16 ` Paul Gortmaker 2016-09-15 12:04 ` Linus Walleij 2016-09-12 22:16 ` [PATCH 8/8] gpio: don't include module.h in shared driver header Paul Gortmaker 2016-09-12 22:16 ` Paul Gortmaker 2016-09-15 12:05 ` Linus Walleij
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20160912221631.15812-1-paul.gortmaker@windriver.com \ --to=paul.gortmaker@windriver.com \ --cc=ajay.thomas.david.rajamanickam@intel.com \ --cc=andy.shevchenko@gmail.com \ --cc=bin.gao@intel.com \ --cc=gnurou@gmail.com \ --cc=keguang.zhang@gmail.com \ --cc=linus.walleij@linaro.org \ --cc=linux-gpio@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mips@linux-mips.org \ --cc=mika.westerberg@linux.intel.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.