From: Maximilian Luz <luzmaximilian@gmail.com>
To: Qiheng Lin <linqiheng@huawei.com>, Sebastian Reichel <sre@kernel.org>
Cc: linux-pm@vger.kernel.org, platform-driver-x86@vger.kernel.org,
kernel-janitors@vger.kernel.org, Hulk Robot <hulkci@huawei.com>
Subject: Re: [PATCH -next] power: supply: Make some symbols static
Date: Sat, 10 Apr 2021 12:41:10 +0200 [thread overview]
Message-ID: <3026d506-4755-4885-4d22-9f589a660221@gmail.com> (raw)
In-Reply-To: <20210410041246.12791-1-linqiheng@huawei.com>
On 4/10/21 6:12 AM, Qiheng Lin wrote:
> The sparse tool complains as follows:
>
> drivers/power/supply/surface_battery.c:700:1: warning:
> symbol 'dev_attr_alarm' was not declared. Should it be static?
> drivers/power/supply/surface_battery.c:805:1: warning:
> symbol 'surface_battery_pm_ops' was not declared. Should it be static?
>
> This symbol is not used outside of surface_battery.c, so this
> commit marks it static.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Qiheng Lin <linqiheng@huawei.com>
Acked-by: Maximilian Luz <luzmaximilian@gmail.com>
> ---
> drivers/power/supply/surface_battery.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/power/supply/surface_battery.c b/drivers/power/supply/surface_battery.c
> index 4116dd839ecd..7efa431a62b2 100644
> --- a/drivers/power/supply/surface_battery.c
> +++ b/drivers/power/supply/surface_battery.c
> @@ -697,7 +697,7 @@ static ssize_t alarm_store(struct device *dev, struct device_attribute *attr, co
> return count;
> }
>
> -DEVICE_ATTR_RW(alarm);
> +static DEVICE_ATTR_RW(alarm);
>
> static struct attribute *spwr_battery_attrs[] = {
> &dev_attr_alarm.attr,
> @@ -802,7 +802,7 @@ static int __maybe_unused surface_battery_resume(struct device *dev)
> {
> return spwr_battery_recheck_full(dev_get_drvdata(dev));
> }
> -SIMPLE_DEV_PM_OPS(surface_battery_pm_ops, NULL, surface_battery_resume);
> +static SIMPLE_DEV_PM_OPS(surface_battery_pm_ops, NULL, surface_battery_resume);
>
> static int surface_battery_probe(struct ssam_device *sdev)
> {
>
next prev parent reply other threads:[~2021-04-10 10:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-10 4:12 [PATCH -next] power: supply: Make some symbols static Qiheng Lin
2021-04-10 10:41 ` Maximilian Luz [this message]
2021-04-12 19:59 ` Sebastian Reichel
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=3026d506-4755-4885-4d22-9f589a660221@gmail.com \
--to=luzmaximilian@gmail.com \
--cc=hulkci@huawei.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linqiheng@huawei.com \
--cc=linux-pm@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=sre@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).