From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Dvorkin Dmitry <dvorkin@tibbo.com>,
Wells Lu <wellslutw@gmail.com>,
Linus Walleij <linus.walleij@linaro.org>,
Arnd Bergmann <arnd@arndb.de>,
William Dean <williamsukatube@gmail.com>,
linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pinctrl: sp7021: fix unused function warning
Date: Wed, 4 Jan 2023 13:10:55 +0200 [thread overview]
Message-ID: <Y7Vev23G+E2+bgjp@smile.fi.intel.com> (raw)
In-Reply-To: <20221215163822.542622-1-arnd@kernel.org>
On Thu, Dec 15, 2022 at 05:38:10PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> sppctl_gpio_inv_get is only used from the debugfs code inside
> of an #ifdef, so we get a warning without that:
>
> drivers/pinctrl/sunplus/sppctl.c:393:12: error: 'sppctl_gpio_inv_get' defined but not used [-Werror=unused-function]
> 393 | static int sppctl_gpio_inv_get(struct gpio_chip *chip, unsigned int offset)
> | ^~~~~~~~~~~~~~~~~~~
>
> Replace the #ifdef with an IS_ENABLED() check that avoids the warning.
I;m wondering why we can't use PTR_IF() here and in similar cases...
--
With Best Regards,
Andy Shevchenko
WARNING: multiple messages have this Message-ID (diff)
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Dvorkin Dmitry <dvorkin@tibbo.com>,
Wells Lu <wellslutw@gmail.com>,
Linus Walleij <linus.walleij@linaro.org>,
Arnd Bergmann <arnd@arndb.de>,
William Dean <williamsukatube@gmail.com>,
linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pinctrl: sp7021: fix unused function warning
Date: Wed, 4 Jan 2023 13:10:55 +0200 [thread overview]
Message-ID: <Y7Vev23G+E2+bgjp@smile.fi.intel.com> (raw)
In-Reply-To: <20221215163822.542622-1-arnd@kernel.org>
On Thu, Dec 15, 2022 at 05:38:10PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> sppctl_gpio_inv_get is only used from the debugfs code inside
> of an #ifdef, so we get a warning without that:
>
> drivers/pinctrl/sunplus/sppctl.c:393:12: error: 'sppctl_gpio_inv_get' defined but not used [-Werror=unused-function]
> 393 | static int sppctl_gpio_inv_get(struct gpio_chip *chip, unsigned int offset)
> | ^~~~~~~~~~~~~~~~~~~
>
> Replace the #ifdef with an IS_ENABLED() check that avoids the warning.
I;m wondering why we can't use PTR_IF() here and in similar cases...
--
With Best Regards,
Andy Shevchenko
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-01-04 11:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-15 16:38 [PATCH] pinctrl: sp7021: fix unused function warning Arnd Bergmann
2022-12-15 16:38 ` Arnd Bergmann
2022-12-29 1:09 ` Linus Walleij
2022-12-29 1:09 ` Linus Walleij
2023-01-04 11:10 ` Andy Shevchenko [this message]
2023-01-04 11:10 ` Andy Shevchenko
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=Y7Vev23G+E2+bgjp@smile.fi.intel.com \
--to=andriy.shevchenko@intel.com \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=dvorkin@tibbo.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=wellslutw@gmail.com \
--cc=williamsukatube@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 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.