LinuxPPC-Dev Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] macintosh/via-pmu: Make some symbols static
@ 2021-04-07 12:58 Yu Kuai
  2021-04-19  3:59 ` Michael Ellerman
  0 siblings, 1 reply; 2+ messages in thread
From: Yu Kuai @ 2021-04-07 12:58 UTC (permalink / raw)
  To: benh; +Cc: yukuai3, linuxppc-dev, linux-kernel, zhangxiaoxu5, yi.zhang

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] macintosh/via-pmu: Make some symbols static
  2021-04-07 12:58 [PATCH] macintosh/via-pmu: Make some symbols static Yu Kuai
@ 2021-04-19  3:59 ` Michael Ellerman
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2021-04-19  3:59 UTC (permalink / raw)
  To: Yu Kuai, benh; +Cc: linuxppc-dev, zhangxiaoxu5, linux-kernel, yi.zhang

On Wed, 7 Apr 2021 20:58:03 +0800, Yu Kuai wrote:
> 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?
> 
> [...]

Applied to powerpc/next.

[1/1] macintosh/via-pmu: Make some symbols static
      https://git.kernel.org/powerpc/c/95d143923379ffb0e706b064305681d44c05ec4b

cheers

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-07 12:58 [PATCH] macintosh/via-pmu: Make some symbols static Yu Kuai
2021-04-19  3:59 ` Michael Ellerman

LinuxPPC-Dev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linuxppc-dev/0 linuxppc-dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linuxppc-dev linuxppc-dev/ https://lore.kernel.org/linuxppc-dev \
		linuxppc-dev@lists.ozlabs.org linuxppc-dev@ozlabs.org
	public-inbox-index linuxppc-dev

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.ozlabs.lists.linuxppc-dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git