[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220207163829.1025904-1-nathan@kernel.org>
Date: Mon, 7 Feb 2022 09:38:29 -0700
From: Nathan Chancellor <nathan@...nel.org>
To: "Rafael J. Wysocki" <rafael@...nel.org>,
Daniel Lezcano <daniel.lezcano@...aro.org>
Cc: Amit Kucheria <amitk@...nel.org>, Zhang Rui <rui.zhang@...el.com>,
Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
Nathan Chancellor <nathan@...nel.org>,
Stephen Rothwell <sfr@...b.auug.org.au>
Subject: [PATCH] thermal: netlink: Fix parameter type of thermal_genl_cpu_capability_event() stub
When building with CONFIG_THERMAL_NETLINK=n, there is a spew of warnings
along the lines of:
In file included from drivers/thermal/thermal_core.c:27:
In file included from drivers/thermal/thermal_core.h:15:
drivers/thermal/thermal_netlink.h:113:71: warning: declaration of 'struct cpu_capability' will not be visible outside of this function [-Wvisibility]
static inline int thermal_genl_cpu_capability_event(int count, struct cpu_capability *caps)
^
1 warning generated.
'struct cpu_capability' is not forward declared anywhere in the header.
As it turns out, this should really be 'struct thermal_genl_cpu_caps',
which silences the warning and makes the parameter types of the stub
match the full function.
Fixes: e4b1eb24ce5a ("thermal: netlink: Add a new event to notify CPU capabilities change")
Reported-by: Stephen Rothwell <sfr@...b.auug.org.au>
Signed-off-by: Nathan Chancellor <nathan@...nel.org>
---
drivers/thermal/thermal_netlink.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/thermal/thermal_netlink.h b/drivers/thermal/thermal_netlink.h
index 04d1adbbc012..1052f523188d 100644
--- a/drivers/thermal/thermal_netlink.h
+++ b/drivers/thermal/thermal_netlink.h
@@ -110,7 +110,7 @@ static inline int thermal_genl_sampling_temp(int id, int temp)
return 0;
}
-static inline int thermal_genl_cpu_capability_event(int count, struct cpu_capability *caps)
+static inline int thermal_genl_cpu_capability_event(int count, struct thermal_genl_cpu_caps *caps)
{
return 0;
}
base-commit: 08615cb8c0e1deeca5489d672213fb205fa53c3b
--
2.35.1
Powered by blists - more mailing lists