Message ID | 20240703-net-const-regmap-v1-4-ff4aeceda02c@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | net: constify struct regmap_bus/regmap_config | expand |
On Wed, Jul 03, 2024 at 11:46:36PM +0200, Javier Carrasco wrote: > `ar9331_sw_bus` is not modified and can be declared as const to > move its data to a read-only section. > > Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> > --- Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
diff --git a/drivers/net/dsa/qca/ar9331.c b/drivers/net/dsa/qca/ar9331.c index 968cb81088bf..e9f2c67bc15f 100644 --- a/drivers/net/dsa/qca/ar9331.c +++ b/drivers/net/dsa/qca/ar9331.c @@ -1021,7 +1021,7 @@ static const struct regmap_config ar9331_mdio_regmap_config = { .cache_type = REGCACHE_MAPLE, }; -static struct regmap_bus ar9331_sw_bus = { +static const struct regmap_bus ar9331_sw_bus = { .reg_format_endian_default = REGMAP_ENDIAN_NATIVE, .val_format_endian_default = REGMAP_ENDIAN_NATIVE, .read = ar9331_mdio_read,
`ar9331_sw_bus` is not modified and can be declared as const to move its data to a read-only section. Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> --- drivers/net/dsa/qca/ar9331.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)