From: Javier Carrasco <javier.carrasco.cruz@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>,
Florian Fainelli <f.fainelli@gmail.com>,
Vladimir Oltean <olteanv@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>,
MD Danish Anwar <danishanwar@ti.com>,
Roger Quadros <rogerq@kernel.org>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Javier Carrasco <javier.carrasco.cruz@gmail.com>
Subject: [PATCH 2/4] net: ti: icss-iep: constify struct regmap_config
Date: Wed, 03 Jul 2024 23:46:34 +0200 [thread overview]
Message-ID: <20240703-net-const-regmap-v1-2-ff4aeceda02c@gmail.com> (raw)
In-Reply-To: <20240703-net-const-regmap-v1-0-ff4aeceda02c@gmail.com>
`am654_icss_iep_regmap_config` is only assigned to a pointer that passes
the data as read-only.
Add the const modifier to the struct and pointer to move the data to a
read-only section.
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
---
drivers/net/ethernet/ti/icssg/icss_iep.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/ti/icssg/icss_iep.c b/drivers/net/ethernet/ti/icssg/icss_iep.c
index 003668dee738..75c294ce6fb6 100644
--- a/drivers/net/ethernet/ti/icssg/icss_iep.c
+++ b/drivers/net/ethernet/ti/icssg/icss_iep.c
@@ -95,7 +95,7 @@ enum {
* @flags: Flags to represent IEP properties
*/
struct icss_iep_plat_data {
- struct regmap_config *config;
+ const struct regmap_config *config;
u32 reg_offs[ICSS_IEP_MAX_REGS];
u32 flags;
};
@@ -952,7 +952,7 @@ static int icss_iep_regmap_read(void *context, unsigned int reg,
return 0;
}
-static struct regmap_config am654_icss_iep_regmap_config = {
+static const struct regmap_config am654_icss_iep_regmap_config = {
.name = "icss iep",
.reg_stride = 1,
.reg_write = icss_iep_regmap_write,
--
2.40.1
next prev parent reply other threads:[~2024-07-03 21:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-03 21:46 [PATCH 0/4] net: constify struct regmap_bus/regmap_config Javier Carrasco
2024-07-03 21:46 ` [PATCH 1/4] net: dsa: qca8k: constify struct regmap_config Javier Carrasco
2024-07-04 17:33 ` Vladimir Oltean
2024-07-03 21:46 ` Javier Carrasco [this message]
2024-07-04 14:42 ` [PATCH 2/4] net: ti: icss-iep: " Roger Quadros
2024-07-05 4:41 ` MD Danish Anwar
2024-07-03 21:46 ` [PATCH 3/4] net: encx24j600: constify struct regmap_bus/regmap_config Javier Carrasco
2024-07-03 21:46 ` [PATCH 4/4] net: dsa: ar9331: constify struct regmap_bus Javier Carrasco
2024-07-04 17:30 ` Vladimir Oltean
2024-07-06 0:10 ` [PATCH 0/4] net: constify struct regmap_bus/regmap_config patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240703-net-const-regmap-v1-2-ff4aeceda02c@gmail.com \
--to=javier.carrasco.cruz@gmail.com \
--cc=andrew@lunn.ch \
--cc=danishanwar@ti.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=rogerq@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).