From: Yu Kuai <yukuai3@huawei.com> To: <benh@kernel.crashing.org> Cc: <linuxppc-dev@lists.ozlabs.org>, <linux-kernel@vger.kernel.org>, <yukuai3@huawei.com>, <yi.zhang@huawei.com>, <zhangxiaoxu5@huawei.com> Subject: [PATCH] macintosh/via-pmu: Make some symbols static Date: Wed, 7 Apr 2021 20:58:03 +0800 [thread overview] Message-ID: <20210407125803.4138837-1-yukuai3@huawei.com> (raw) The sparse tool complains as follows: drivers/macintosh/via-pmu.c:183:5: warning: symbol 'pmu_cur_battery' was not declared. Should it be static? drivers/macintosh/via-pmu.c:190:5: warning: symbol '__fake_sleep' was not declared. Should it be static? These symbols are not used outside of via-pmu.c, so this commit marks them static. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Yu Kuai <yukuai3@huawei.com> --- drivers/macintosh/via-pmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c index 73e6ae88fafd..478766434919 100644 --- a/drivers/macintosh/via-pmu.c +++ b/drivers/macintosh/via-pmu.c @@ -180,14 +180,14 @@ static struct proc_dir_entry *proc_pmu_options; static int option_server_mode; int pmu_battery_count; -int pmu_cur_battery; +static int pmu_cur_battery; unsigned int pmu_power_flags = PMU_PWR_AC_PRESENT; struct pmu_battery_info pmu_batteries[PMU_MAX_BATTERIES]; static int query_batt_timer = BATTERY_POLLING_COUNT; static struct adb_request batt_req; static struct proc_dir_entry *proc_pmu_batt[PMU_MAX_BATTERIES]; -int __fake_sleep; +static int __fake_sleep; int asleep; #ifdef CONFIG_ADB -- 2.25.4
WARNING: multiple messages have this Message-ID (diff)
From: Yu Kuai <yukuai3@huawei.com> To: <benh@kernel.crashing.org> Cc: yukuai3@huawei.com, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, zhangxiaoxu5@huawei.com, yi.zhang@huawei.com Subject: [PATCH] macintosh/via-pmu: Make some symbols static Date: Wed, 7 Apr 2021 20:58:03 +0800 [thread overview] Message-ID: <20210407125803.4138837-1-yukuai3@huawei.com> (raw) The sparse tool complains as follows: drivers/macintosh/via-pmu.c:183:5: warning: symbol 'pmu_cur_battery' was not declared. Should it be static? drivers/macintosh/via-pmu.c:190:5: warning: symbol '__fake_sleep' was not declared. Should it be static? These symbols are not used outside of via-pmu.c, so this commit marks them static. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Yu Kuai <yukuai3@huawei.com> --- drivers/macintosh/via-pmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c index 73e6ae88fafd..478766434919 100644 --- a/drivers/macintosh/via-pmu.c +++ b/drivers/macintosh/via-pmu.c @@ -180,14 +180,14 @@ static struct proc_dir_entry *proc_pmu_options; static int option_server_mode; int pmu_battery_count; -int pmu_cur_battery; +static int pmu_cur_battery; unsigned int pmu_power_flags = PMU_PWR_AC_PRESENT; struct pmu_battery_info pmu_batteries[PMU_MAX_BATTERIES]; static int query_batt_timer = BATTERY_POLLING_COUNT; static struct adb_request batt_req; static struct proc_dir_entry *proc_pmu_batt[PMU_MAX_BATTERIES]; -int __fake_sleep; +static int __fake_sleep; int asleep; #ifdef CONFIG_ADB -- 2.25.4
next reply other threads:[~2021-04-07 12:49 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-04-07 12:58 Yu Kuai [this message] 2021-04-07 12:58 ` [PATCH] macintosh/via-pmu: Make some symbols static Yu Kuai 2021-04-19 3:59 ` Michael Ellerman 2021-04-19 3:59 ` Michael Ellerman
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=20210407125803.4138837-1-yukuai3@huawei.com \ --to=yukuai3@huawei.com \ --cc=benh@kernel.crashing.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linuxppc-dev@lists.ozlabs.org \ --cc=yi.zhang@huawei.com \ --cc=zhangxiaoxu5@huawei.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: linkBe 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.