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.

Merge branch 'net-constify-struct-regmap_bus-regmap_config'

Javier Carrasco says:

====================
net: constify struct regmap_bus/regmap_config

This series adds the const modifier to the remaining regmap_bus and
regmap_config structs within the net subsystem that are effectively
used as const (i.e., only read after their declaration), but kept as
writtable data.
====================

Link: https://patch.msgid.link/20240703-net-const-regmap-v1-0-ff4aeceda02c@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+7 -7
+1 -1
drivers/net/dsa/qca/ar9331.c
··· 1021 1021 .cache_type = REGCACHE_MAPLE, 1022 1022 }; 1023 1023 1024 - static struct regmap_bus ar9331_sw_bus = { 1024 + static const struct regmap_bus ar9331_sw_bus = { 1025 1025 .reg_format_endian_default = REGMAP_ENDIAN_NATIVE, 1026 1026 .val_format_endian_default = REGMAP_ENDIAN_NATIVE, 1027 1027 .read = ar9331_mdio_read,
+1 -1
drivers/net/dsa/qca/qca8k-8xxx.c
··· 565 565 return qca8k_regmap_update_bits_mii(priv, reg, mask, write_val); 566 566 } 567 567 568 - static struct regmap_config qca8k_regmap_config = { 568 + static const struct regmap_config qca8k_regmap_config = { 569 569 .reg_bits = 16, 570 570 .val_bits = 32, 571 571 .reg_stride = 4,
+3 -3
drivers/net/ethernet/microchip/encx24j600-regmap.c
··· 474 474 .unlock = regmap_unlock_mutex, 475 475 }; 476 476 477 - static struct regmap_bus regmap_encx24j600 = { 477 + static const struct regmap_bus regmap_encx24j600 = { 478 478 .write = regmap_encx24j600_write, 479 479 .read = regmap_encx24j600_read, 480 480 .reg_update_bits = regmap_encx24j600_reg_update_bits, 481 481 }; 482 482 483 - static struct regmap_config phycfg = { 483 + static const struct regmap_config phycfg = { 484 484 .name = "phy", 485 485 .reg_bits = 8, 486 486 .val_bits = 16, ··· 492 492 .volatile_reg = encx24j600_phymap_volatile, 493 493 }; 494 494 495 - static struct regmap_bus phymap_encx24j600 = { 495 + static const struct regmap_bus phymap_encx24j600 = { 496 496 .reg_write = regmap_encx24j600_phy_reg_write, 497 497 .reg_read = regmap_encx24j600_phy_reg_read, 498 498 };
+2 -2
drivers/net/ethernet/ti/icssg/icss_iep.c
··· 95 95 * @flags: Flags to represent IEP properties 96 96 */ 97 97 struct icss_iep_plat_data { 98 - struct regmap_config *config; 98 + const struct regmap_config *config; 99 99 u32 reg_offs[ICSS_IEP_MAX_REGS]; 100 100 u32 flags; 101 101 }; ··· 952 952 return 0; 953 953 } 954 954 955 - static struct regmap_config am654_icss_iep_regmap_config = { 955 + static const struct regmap_config am654_icss_iep_regmap_config = { 956 956 .name = "icss iep", 957 957 .reg_stride = 1, 958 958 .reg_write = icss_iep_regmap_write,