thermal: netlink: Fix parameter type of thermal_genl_cpu_capability_event() stub
PATCH 1/1 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.
--- drivers/thermal/thermal_netlink.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/thermal/thermal_netlink.h +1 -1
@@ -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
Signature · 1 line
2.35.1
Quoted 15 lines · Nathan Chancellor
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 fromdrivers/thermal/thermal_core.h:15:
drivers/thermal/thermal_netlink.h:113:71: warning: declaration of 'structcpu_capability' will not be visible outside of this function [-Wvisibility]
static inline intthermal_genl_cpu_capability_event(int count, struct cpu_capability *caps)
^
1 warning generated.
Quoted 6 lines
'struct
cpu_capability' is not forward declared anywhere in the header.
As it turns out, this should really be 'structthermal_genl_cpu_caps',
which silences the warning and makes the parameter types of the stub match the full function.
Thanks for sending the patch. I was about to send this change. Since this patch target only linux-next, don't we need prefix:
"[PATCH -next]" instead of "[PATCH]"?
Quoted 5 lines
Fixes e4b1eb24ce5a ("thermal: netlink: Add a new event to notify CPUcapabilities change")
Reported-by Stephen Rothwell <[email protected]>Signed-off-by Nathan Chancellor <[email protected]>
Quoted 23 lines
---
drivers/thermal/thermal_netlink.h | 2 +-1 file changed, 1 insertion(+), 1 deletion(-)drivers/thermal/thermal_netlink.h +0
-0@@ -110,7 +110,7 @@ static inline int thermal_genl_sampling_temp(int id, int temp) return 0; }
-static inline intthermal_genl_cpu_capability_event(int count, struct cpu_capability *caps)
+static inline intthermal_genl_cpu_capability_event(int count, struct thermal_genl_cpu_caps *caps)
{
return 0;
}base-commit:
08615cb8c0e1deeca5489d672213fb205fa53c3b
Quoted 22 lines · srinivas pandruvada
Quoted 15 lines · Nathan Chancellor
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 fromdrivers/thermal/thermal_core.h:15:
drivers/thermal/thermal_netlink.h:113:71: warning: declaration of 'structcpu_capability' will not be visible outside of this function [-Wvisibility]
static inline intthermal_genl_cpu_capability_event(int count, struct cpu_capability *caps)
^
1 warning generated.Quoted 6 lines
'struct
cpu_capability' is not forward declared anywhere in the header.
As it turns out, this should really be 'structthermal_genl_cpu_caps',
which silences the warning and makes the parameter types of the stub match the full function.
Quoted 3 lines
Thanks for sending the patch. I was about to send this change. Since this patch target only linux-next, don't we need prefix:
"[PATCH -next]" instead of "[PATCH]"?
I could probably get better about adding "-next" to the subject prefix to make it easier for maintainers but I do include the commit that the patch was based on at the bottom of the patch to accomplish the same thing.
Thank you for the review!
Cheers,
Nathan
Quoted 31 lines
Quoted 5 lines
Fixes e4b1eb24ce5a ("thermal: netlink: Add a new event to notify CPUcapabilities change")
Reported-by Stephen Rothwell <[email protected]>Signed-off-by Nathan Chancellor <[email protected]>Reviewed-by Srinivas Pandruvada <[email protected]>Quoted 23 lines
---
drivers/thermal/thermal_netlink.h | 2 +-1 file changed, 1 insertion(+), 1 deletion(-)drivers/thermal/thermal_netlink.h +0
-0@@ -110,7 +110,7 @@ static inline int thermal_genl_sampling_temp(int id, int temp) return 0; }
-static inline intthermal_genl_cpu_capability_event(int count, struct cpu_capability *caps)
+static inline intthermal_genl_cpu_capability_event(int count, struct thermal_genl_cpu_caps *caps)
{
return 0;
}base-commit:
08615cb8c0e1deeca5489d672213fb205fa53c3b
Rafael J. Wysocki
maintainerQuoted 28 lines · Nathan Chancellor
Quoted 22 lines · srinivas pandruvada
Quoted 13 lines · Nathan Chancellor
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 fromdrivers/thermal/thermal_core.h:15:
drivers/thermal/thermal_netlink.h:113:71: warning: declaration of
'structcpu_capability' will not be visible outside of this function [-Wvisibility]
static inline int thermal_genl_cpu_capability_event(int count,
structcpu_capability*caps)^Quoted 8 lines
1 warning generated.
'struct
cpu_capability' is not forward declared anywhere in the header.
As it turns out, this should really be 'structthermal_genl_cpu_caps',
which silences the warning and makes the parameter types of the stub match the full function.Quoted 3 lines
Thanks for sending the patch. I was about to send this change. Since this patch target only linux-next, don't we need prefix:
"[PATCH -next]" instead of "[PATCH]"?
Quoted 6 lines
I could probably get better about adding "-next" to the subject prefix to make it easier for maintainers but I do include the commit that the patch was based on at the bottom of the patch to accomplish the same thing.
Thank you for the review!
Patch applied, thanks!