Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1340641 > unrolled thread
| Started by | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| First post | 2016-02-23 15:00 +0100 |
| Last post | 2016-02-23 17:10 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 1/3] ARM: omap2: mark unused functions as __maybe_unused Arnd Bergmann <arnd@arndb.de> - 2016-02-23 15:00 +0100
Re: [PATCH 1/3] ARM: omap2: mark unused functions as __maybe_unused Tony Lindgren <tony@atomide.com> - 2016-02-23 17:10 +0100
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2016-02-23 15:00 +0100 |
| Subject | [PATCH 1/3] ARM: omap2: mark unused functions as __maybe_unused |
| Message-ID | <r5lFo-6dV-33@gated-at.bofh.it> |
The omap_generic_init() and omap_hwmod_init_postsetup() functions are
used in the initialization for all OMAP2+ SoC types, but in the
extreme case that those are all disabled, we get a warning about
unused code:
arch/arm/mach-omap2/io.c:412:123: error: 'omap_hwmod_init_postsetup' defined but not used [-Werror=unused-function]
arch/arm/mach-omap2/board-generic.c:30:123: error: 'omap_generic_init' defined but not used [-Werror=unused-function]
This annotates both as __maybe_unused to shut up that warning.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
arch/arm/mach-omap2/board-generic.c | 2 +-
arch/arm/mach-omap2/io.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index bab814d2f37d..d75ec64ae0b5 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -28,7 +28,7 @@ static const struct of_device_id omap_dt_match_table[] __initconst = {
{ }
};
-static void __init omap_generic_init(void)
+static void __init __maybe_unused omap_generic_init(void)
{
omapdss_early_init_of();
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 3c87e40650cf..f192fc7fd4f7 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -409,7 +409,7 @@ static int _set_hwmod_postsetup_state(struct omap_hwmod *oh, void *data)
return omap_hwmod_set_postsetup_state(oh, *(u8 *)data);
}
-static void __init omap_hwmod_init_postsetup(void)
+static void __init __maybe_unused omap_hwmod_init_postsetup(void)
{
u8 postsetup_state;
--
2.7.0
[toc] | [next] | [standalone]
| From | Tony Lindgren <tony@atomide.com> |
|---|---|
| Date | 2016-02-23 17:10 +0100 |
| Message-ID | <r5nHb-7N8-13@gated-at.bofh.it> |
| In reply to | #1340641 |
* Arnd Bergmann <arnd@arndb.de> [160223 05:58]: > The omap_generic_init() and omap_hwmod_init_postsetup() functions are > used in the initialization for all OMAP2+ SoC types, but in the > extreme case that those are all disabled, we get a warning about > unused code: > > arch/arm/mach-omap2/io.c:412:123: error: 'omap_hwmod_init_postsetup' defined but not used [-Werror=unused-function] > arch/arm/mach-omap2/board-generic.c:30:123: error: 'omap_generic_init' defined but not used [-Werror=unused-function] > > This annotates both as __maybe_unused to shut up that warning. Looks OK to me: Acked-by: Tony Lindgren <tony@atomide.com>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web