[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aHZWdMSYDsjebRh-@mai.linaro.org>
Date: Tue, 15 Jul 2025 15:24:04 +0200
From: Daniel Lezcano <daniel.lezcano@...aro.org>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc: zhanghongchen <zhanghongchen@...ngson.cn>,
Yinbo Zhu <zhuyinbo@...ngson.cn>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Zhang Rui <rui.zhang@...el.com>, Lukasz Luba <lukasz.luba@....com>,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
linux-pm@...r.kernel.org
Subject: Re: [PATCH] thermal/drivers/loongson2: Constify struct
thermal_zone_device_ops
On Sun, May 25, 2025 at 02:32:30PM +0200, Christophe JAILLET wrote:
> 'struct thermal_zone_device_ops' could be left unmodified in this driver.
>
> Constifying this structure moves some data to a read-only section, so
> increases overall security, especially when the structure holds some
> function pointers.
>
> This partly reverts commit 734b5def91b5 ("thermal/drivers/loongson2: Add
> Loongson-2K2000 support") which removed the const qualifier. Instead,
> define two different structures.
>
> On a x86_64, with allmodconfig:
> Before:
> ======
> text data bss dec hex filename
> 5089 1160 0 6249 1869 drivers/thermal/loongson2_thermal.o
>
> After:
> =====
> text data bss dec hex filename
> 5464 1128 0 6592 19c0 drivers/thermal/loongson2_thermal.o
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
> ---
> Compile tested only
> ---
Applied, thanks
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
Powered by blists - more mailing lists