Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

phy: cadence-torrent: Constify a u32[]

'cdns_torrent_refclk_driver_mux_table' is not modified in this driver.
And it is only used as a "const u32 *".

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

On a x86_64, with allmodconfig:
Before:
======
text data bss dec hex filename
93578 4798 16 98392 18058 drivers/phy/cadence/phy-cadence-torrent.o

After:
=====
text data bss dec hex filename
93606 4790 16 98412 1806c drivers/phy/cadence/phy-cadence-torrent.o

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/34e23ceb6b7b7eb730ee8deee21d231b504dc65f.1720718240.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Christophe JAILLET and committed by
Vinod Koul
ceb6e043 86946f25

+1 -1
+1 -1
drivers/phy/cadence/phy-cadence-torrent.c
··· 285 285 CDNS_TORRENT_RECEIVED_REFCLK 286 286 }; 287 287 288 - static u32 cdns_torrent_refclk_driver_mux_table[] = { 1, 0 }; 288 + static const u32 cdns_torrent_refclk_driver_mux_table[] = { 1, 0 }; 289 289 290 290 enum cdns_torrent_phy_type { 291 291 TYPE_NONE,