]> www.infradead.org Git - users/jedix/linux-maple.git/commit
media: tuners: Constify struct tunertype, tuner_range and tuner_params
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Tue, 27 Aug 2024 19:57:58 +0000 (21:57 +0200)
committerHans Verkuil <hverkuil@xs4all.nl>
Fri, 21 Feb 2025 09:33:15 +0000 (10:33 +0100)
commit70d4fd1200ca6cdd670c51ec3f1895b5a262261c
treec51ceb9c86c9045ac16f097fd21c1603bb82a17a
parentd22d91fb1d7f04130d6b5371315fdaeddd6a2fc6
media: tuners: Constify struct tunertype, tuner_range and tuner_params

'struct tunertype', 'struct tuner_range' and 'struct tuner_params' are not
modified in this driver.

Constifying these structures moves some data to a read-only section, so
increase overall security.

On a x86_64, with allmodconfig:
Before:
======
   2877    8554       0   11431    2ca7 drivers/media/tuners/tuner-types.o

After:
=====
   text    data     bss     dec     hex filename
  11421      48       0   11469    2ccd drivers/media/tuners/tuner-types.o

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
drivers/media/tuners/tuner-simple.c
drivers/media/tuners/tuner-types.c
include/media/tuner-types.h