projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9969163
)
net: dsa: ar9331: constify struct regmap_bus
author
Javier Carrasco
<javier.carrasco.cruz@gmail.com>
Wed, 3 Jul 2024 21:46:36 +0000
(23:46 +0200)
committer
Jakub Kicinski
<kuba@kernel.org>
Sat, 6 Jul 2024 00:02:20 +0000
(17:02 -0700)
`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>
Link:
https://patch.msgid.link/20240703-net-const-regmap-v1-4-ff4aeceda02c@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/qca/ar9331.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/net/dsa/qca/ar9331.c
b/drivers/net/dsa/qca/ar9331.c
index 968cb81088bfdcf445bf5aabd1ec1a95c9b6cc0d..e9f2c67bc15f5dae364ca071619add734004c085 100644
(file)
--- 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,