[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200826225608.90299-3-rikard.falkeborn@gmail.com>
Date: Thu, 27 Aug 2020 00:56:04 +0200
From: Rikard Falkeborn <rikard.falkeborn@...il.com>
To: "David S . Miller" <davem@...emloft.net>
Cc: Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org,
Rikard Falkeborn <rikard.falkeborn@...il.com>,
Sergei Shtylyov <sergei.shtylyov@...il.com>,
linux-renesas-soc@...r.kernel.org
Subject: [PATCH net-next 2/6] net: ethernet: ravb: constify bb_ops
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@...il.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
Powered by blists - more mailing lists