Re: [PATCH] thermal: netlink: Fix compilation error when CONFIG_NET=n
From: Randy Dunlap
Date: Tue Jul 07 2020 - 11:47:30 EST
On 7/7/20 2:01 AM, Daniel Lezcano wrote:
> When the network is not configured, the netlink are disabled on all
> the system. The thermal framework assumed the netlink are always
> opt-in.
>
> Fix this by adding a Kconfig option for the netlink notification,
> defaulting to yes and depending on CONFIG_NET.
>
> As the change implies multiple stubs and in order to not pollute the
> internal thermal header, the thermal_nelink.h has been added and
> included in the thermal_core.h, so this one regain some kind of
> clarity.
>
> Reported-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@xxxxxxxxxx>
> ---
> drivers/thermal/Kconfig | 10 ++++
> drivers/thermal/Makefile | 5 +-
> drivers/thermal/thermal_core.h | 20 +------
> drivers/thermal/thermal_netlink.h | 98 +++++++++++++++++++++++++++++++
> 4 files changed, 114 insertions(+), 19 deletions(-)
> create mode 100644 drivers/thermal/thermal_netlink.h
>
Hm, now I get this:
../drivers/thermal/thermal_helpers.c: In function âthermal_cdev_set_cur_stateâ:
../drivers/thermal/thermal_helpers.c:182:2: error: implicit declaration of function âthermal_notify_cdev_updateâ; did you mean âthermal_notify_cdev_deleteâ? [-Werror=implicit-function-declaration]
thermal_notify_cdev_update(cdev->id, target);
or should that call be to thermal_notify_cdev_state_update()?
--
~Randy