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 2/6] net: ethernet: ravb: constify bb_ops
Date: Thu, 27 Aug 2020 00:56:04 +0200 [thread overview]
Message-ID: <20200826225608.90299-3-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/ravb_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
index df89d09b253e..f684296df871 100644
--- a/drivers/net/ethernet/renesas/ravb_main.c
+++ b/drivers/net/ethernet/renesas/ravb_main.c
@@ -162,7 +162,7 @@ static int ravb_get_mdio_data(struct mdiobb_ctrl *ctrl)
}
/* MDIO bus control struct */
-static struct mdiobb_ops bb_ops = {
+static const struct mdiobb_ops bb_ops = {
.owner = THIS_MODULE,
.set_mdc = ravb_set_mdc,
.set_mdio_dir = ravb_set_mdio_dir,
--
2.28.0
next prev parent reply other threads:[~2020-08-26 22:56 UTC|newest]
Thread overview: 11+ 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 ` 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 ` Rikard Falkeborn [this message]
2020-08-26 22:56 ` [PATCH net-next 3/6] net: renesas: sh_eth: constify bb_ops Rikard Falkeborn
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 22:56 ` Rikard Falkeborn
2020-08-26 23:21 ` [PATCH net-next 0/6] drivers/net: constify static ops-variables David Miller
2020-08-26 23:21 ` 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-3-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.