On Sun, Jun 23, 2024 at 8:45 AM Christophe JAILLET <christophe.jaillet@xxxxxxxxxx> wrote: > 'struct power_supply_vbat_ri_table' are not modified in this driver. > > Constifying these structures moves some data to a read-only section, so > increase overall security. > > In order to do it, some code also needs to be adjusted to this new const > qualifier. > > On a x86_64, with allmodconfig: > Before: > ====== > $ size drivers/power/supply/samsung-sdi-battery.o > text data bss dec hex filename > 955 7664 0 8619 21ab drivers/power/supply/samsung-sdi-battery.o > > After: > ===== > $ size drivers/power/supply/samsung-sdi-battery.o > text data bss dec hex filename > 4055 4584 0 8639 21bf drivers/power/supply/samsung-sdi-battery.o > > Signed-off-by: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx> Really neat! Reviewed-by: Linus Walleij <linus.walleij@xxxxxxxxxx> Yours, Linus Walleij