Message ID | 20120104135813.06af6984@nehalam.linuxnetplumber.net |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
> All tables of function pointers should be const to make hacks > more difficult. Compile tested only. > > Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Thanks Stephen. Acked-by: Shreyas N Bhatewara <sbhatewara@vmware.com> -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Stephen Hemminger <shemminger@vyatta.com> Date: Wed, 4 Jan 2012 13:58:13 -0800 > All tables of function pointers should be const to make hacks > more difficult. Compile tested only. > > Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Applied. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
--- a/drivers/net/vmxnet3/vmxnet3_ethtool.c 2011-12-19 09:53:44.815309363 -0800 +++ b/drivers/net/vmxnet3/vmxnet3_ethtool.c 2012-01-04 13:15:22.773586753 -0800 @@ -608,7 +608,7 @@ vmxnet3_set_rss_indir(struct net_device } #endif -static struct ethtool_ops vmxnet3_ethtool_ops = { +static const struct ethtool_ops vmxnet3_ethtool_ops = { .get_settings = vmxnet3_get_settings, .get_drvinfo = vmxnet3_get_drvinfo, .get_regs_len = vmxnet3_get_regs_len,
All tables of function pointers should be const to make hacks more difficult. Compile tested only. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html