From: Guenter Roeck <linux@roeck-us.net>
To: Aleksandr Mezin <mezin.alexander@gmail.com>
Cc: linux-hwmon@vger.kernel.org, Jean Delvare <jdelvare@suse.com>
Subject: Re: [PATCH v2] hwmon: (nzxt-smart2) Fix "unused function" warning
Date: Mon, 27 Dec 2021 18:22:21 -0800 [thread overview]
Message-ID: <20211228022221.GA737761@roeck-us.net> (raw)
In-Reply-To: <20211228014813.832491-1-mezin.alexander@gmail.com>
On Tue, Dec 28, 2021 at 07:48:13AM +0600, Aleksandr Mezin wrote:
> Fix warning when building with CONFIG_PM=n (and CONFIG_WERROR=y):
>
> drivers/hwmon/nzxt-smart2.c:707:12: error: ‘nzxt_smart2_hid_reset_resume’
> defined but not used [-Werror=unused-function]
> 707 | static int nzxt_smart2_hid_reset_resume(struct hid_device *hdev)
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Signed-off-by: Aleksandr Mezin <mezin.alexander@gmail.com>
Applied.
Thanks,
Guenter
> ---
> v2: __maybe_unused instead of #ifdef
>
> drivers/hwmon/nzxt-smart2.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hwmon/nzxt-smart2.c b/drivers/hwmon/nzxt-smart2.c
> index 534d39b8908e..6e67da766969 100644
> --- a/drivers/hwmon/nzxt-smart2.c
> +++ b/drivers/hwmon/nzxt-smart2.c
> @@ -704,7 +704,7 @@ static int nzxt_smart2_hid_raw_event(struct hid_device *hdev,
> return 0;
> }
>
> -static int nzxt_smart2_hid_reset_resume(struct hid_device *hdev)
> +static int __maybe_unused nzxt_smart2_hid_reset_resume(struct hid_device *hdev)
> {
> struct drvdata *drvdata = hid_get_drvdata(hdev);
>
prev parent reply other threads:[~2021-12-28 2:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-28 1:48 [PATCH v2] hwmon: (nzxt-smart2) Fix "unused function" warning Aleksandr Mezin
2021-12-28 2:22 ` Guenter Roeck [this message]
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=20211228022221.GA737761@roeck-us.net \
--to=linux@roeck-us.net \
--cc=jdelvare@suse.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=mezin.alexander@gmail.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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox