From: Rikard Falkeborn <rikard.falkeborn@gmail.com>
To: "David S . Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Rikard Falkeborn <rikard.falkeborn@gmail.com>,
Sergei Shtylyov <sergei.shtylyov@gmail.com>,
linux-renesas-soc@vger.kernel.org
Subject: [PATCH net-next 3/6] net: renesas: sh_eth: constify bb_ops
Date: Thu, 27 Aug 2020 00:56:05 +0200 [thread overview]
Message-ID: <20200826225608.90299-4-rikard.falkeborn@gmail.com> (raw)
In-Reply-To: <20200826225608.90299-1-rikard.falkeborn@gmail.com>
The only usage of bb_ops is to assign its address to the ops field in
the mdiobb_ctrl struct, which is a const pointer. Make it const to allow
the compiler to put it in read-only memory.
Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
---
drivers/net/ethernet/renesas/sh_eth.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
index f45331ed90b0..586642c33d2b 100644
--- a/drivers/net/ethernet/renesas/sh_eth.c
+++ b/drivers/net/ethernet/renesas/sh_eth.c
@@ -1202,7 +1202,7 @@ static void sh_mdc_ctrl(struct mdiobb_ctrl *ctrl, int bit)
}
/* mdio bus control struct */
-static struct mdiobb_ops bb_ops = {
+static const struct mdiobb_ops bb_ops = {
.owner = THIS_MODULE,
.set_mdc = sh_mdc_ctrl,
.set_mdio_dir = sh_mmd_ctrl,
--
2.28.0
next prev parent reply other threads:[~2020-08-26 22:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-26 22:56 [PATCH net-next 0/6] drivers/net: constify static ops-variables Rikard Falkeborn
2020-08-26 22:56 ` [PATCH net-next 1/6] net: ethernet: qualcomm: constify qca_serdev_ops Rikard Falkeborn
2020-08-26 22:56 ` [PATCH net-next 2/6] net: ethernet: ravb: constify bb_ops Rikard Falkeborn
2020-08-26 22:56 ` Rikard Falkeborn [this message]
2020-08-26 22:56 ` [PATCH net-next 4/6] net: phy: at803x: constify static regulator_ops Rikard Falkeborn
2020-08-26 22:56 ` [PATCH net-next 5/6] net: phy: mscc: macsec: constify vsc8584_macsec_ops Rikard Falkeborn
2020-08-26 22:56 ` [PATCH net-next 6/6] net: ath11k: constify ath11k_thermal_ops Rikard Falkeborn
2020-08-26 23:21 ` [PATCH net-next 0/6] drivers/net: constify static ops-variables David Miller
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=20200826225608.90299-4-rikard.falkeborn@gmail.com \
--to=rikard.falkeborn@gmail.com \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sergei.shtylyov@gmail.com \
/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
all inboxes | Powered by JetHome®