Skip to content

Commit

Permalink
net: phy: mscc: macsec: constify vsc8584_macsec_ops
Browse files Browse the repository at this point in the history
The only usage of vsc8584_macsec_ops is to assign its address to the
macsec_ops field in the phydev 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>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Rikard Falkeborn authored and David S. Miller committed Aug 26, 2020
1 parent 3faaf53 commit 73a9df4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/phy/mscc/mscc_macsec.c
Original file line number Diff line number Diff line change
Expand Up @@ -958,7 +958,7 @@ static int vsc8584_macsec_del_txsa(struct macsec_context *ctx)
return 0;
}

static struct macsec_ops vsc8584_macsec_ops = {
static const struct macsec_ops vsc8584_macsec_ops = {
.mdo_dev_open = vsc8584_macsec_dev_open,
.mdo_dev_stop = vsc8584_macsec_dev_stop,
.mdo_add_secy = vsc8584_macsec_add_secy,
Expand Down

0 comments on commit 73a9df4

Please sign in to comment.