Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1279843

Re: [PATCH] staging: ste_rmi4: avoid unused function warnings

From Linus Walleij <linus.walleij@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH] staging: ste_rmi4: avoid unused function warnings
Date 2015-11-30 14:00 +0100
Message-ID <qAwdI-3Lg-7@gated-at.bofh.it> (permalink)
References <qx1SP-4ve-33@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Nov 20, 2015 at 10:59 PM, Arnd Bergmann <arnd@arndb.de> wrote:

> The rmi4 touchscreen driver encloses the power-management
> functions in #ifdef CONFIG_PM, but the smtcfb_pci_suspend/resume
> functions are only really used when CONFIG_PM_SLEEP is also
> set, as a frequent gcc warning shows:
>
> ste_rmi4/synaptics_i2c_rmi4.c:1050:12: warning: 'synaptics_rmi4_suspend' defined but not used
> ste_rmi4/synaptics_i2c_rmi4.c:1084:12: warning: 'synaptics_rmi4_resume' defined but not used
>
> This changes the driver to remove the #ifdef and instead mark
> the functions as __maybe_unused, which is a nicer anyway, as it
> provides build testing for all the code in all configurations
> and is harder to get wrong.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[PATCH] staging: ste_rmi4: avoid unused function warnings Arnd Bergmann <arnd@arndb.de> - 2015-11-20 23:00 +0100
  Re: [PATCH] staging: ste_rmi4: avoid unused function warnings Linus Walleij <linus.walleij@linaro.org> - 2015-11-30 14:00 +0100

csiph-web