[PATCH net-next 0/2] net: Constify static qmi structs

2020-11-22 Thread Rikard Falkeborn
Constify a couple of static qmi_ops and qmi_msg_handler structs that are never modified. Rikard Falkeborn (2): soc: qcom: ipa: Constify static qmi structs ath10k: Constify static qmi structs drivers/net/ipa/ipa_qmi.c | 8 drivers/net/wireless/ath/ath10k/qmi.c | 4

[PATCH net-next 2/2] ath10k: Constify static qmi structs

2020-11-22 Thread Rikard Falkeborn
qmi_msg_handler[] and ath10k_qmi_ops are only used as input arguments to qmi_handle_init() which accepts const pointers to both qmi_ops and qmi_msg_handler. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn --- drivers/net/wireless/ath/ath10k

[PATCH net-next 1/2] soc: qcom: ipa: Constify static qmi structs

2020-11-22 Thread Rikard Falkeborn
These are only used as input arguments to qmi_handle_init() which accepts const pointers to both qmi_ops and qmi_msg_handler. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn --- drivers/net/ipa/ipa_qmi.c | 8 1 file changed, 4

[PATCH net-next v2 2/2] net: openvswitch: Constify static struct genl_small_ops

2020-10-04 Thread Rikard Falkeborn
The only usage of these is to assign their address to the small_ops field in the genl_family struct, which is a const pointer, and applying ARRAY_SIZE() on them. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn --- net/openvswitch

[PATCH net-next v2 0/2] net: Constify struct genl_small_ops

2020-10-04 Thread Rikard Falkeborn
Make a couple of static struct genl_small_ops const to allow the compiler to put them in read-only memory. Patches are independent. v2: Rebase on net-next, genl_ops -> genl_small_ops Rikard Falkeborn (2): mptcp: Constify mptcp_pm_ops net: openvswitch: Constify static struct genl_small_

[PATCH net-next v2 1/2] mptcp: Constify mptcp_pm_ops

2020-10-04 Thread Rikard Falkeborn
The only usages of mptcp_pm_ops is to assign its address to the small_ops field of the genl_family struct, which is a const pointer, and applying ARRAY_SIZE() on it. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn --- net/mptcp/pm_netlink.c | 2

[PATCH net-next 2/2] net: openvswitch: Constify static struct genl_ops

2020-10-04 Thread Rikard Falkeborn
The only usage of these is to assign their address to the ops field in the genl_family struct, which is a const pointer, and applying ARRAY_SIZE() on them. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn --- net/openvswitch/conntrack.c | 2

[PATCH net-next 1/2] mptcp: Constify mptcp_pm_ops

2020-10-04 Thread Rikard Falkeborn
The only usages of mptcp_pm_ops is to assign its address to the ops field of the genl_family struct, which is a const pointer, and applying ARRAY_SIZE() on it. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn --- net/mptcp/pm_netlink.c | 2 +- 1

[PATCH net-next 0/2] net: Constify struct genl_ops

2020-10-04 Thread Rikard Falkeborn
Make a couple of static struct genl_ops const to allow the compiler to put them in read-only memory. Patches are independent. Rikard Falkeborn (2): mptcp: Constify mptcp_pm_ops net: openvswitch: Constify static struct genl_ops net/mptcp/pm_netlink.c | 2 +- net/openvswitch/conntrack.c

[PATCH] atm: atmtcp: Constify atmtcp_v_dev_ops

2020-09-27 Thread Rikard Falkeborn
The only usage of atmtcp_v_dev_ops is to pass its address to atm_dev_register() which takes a pointer to const, and comparing its address to another address, which does not modify it. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn --- drivers

[PATCH net-next] net: hns3: Constify static structs

2020-09-21 Thread Rikard Falkeborn
Signed-off-by: Rikard Falkeborn --- .../hisilicon/hns3/hns3pf/hclge_debugfs.c | 10 +++ .../hisilicon/hns3/hns3pf/hclge_debugfs.h | 26 +-- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c b/drivers

Re: [PATCH net-next] octeontx2-af: Constify npc_kpu_profile_{action,cam}

2020-09-14 Thread Rikard Falkeborn
On Sun, Sep 13, 2020 at 10:27:01PM -0700, Joe Perches wrote: > On Sat, 2020-09-12 at 00:00 +0200, Rikard Falkeborn wrote: > > These are never modified, so constify them to allow the compiler to > > place them in read-only memory. This moves about 25kB to read-only > > memory

[PATCH net-next] octeontx2-af: Constify npc_kpu_profile_{action,cam}

2020-09-11 Thread Rikard Falkeborn
/ethernet/marvell/octeontx2/af/octeontx2_af.ko After: textdata bss dec hex filename 321003 406641248 362915 589a3 drivers/net/ethernet/marvell/octeontx2/af/octeontx2_af.ko Signed-off-by: Rikard Falkeborn --- .../net/ethernet/marvell/octeontx2/af/npc.h | 4

[PATCH net-next 1/6] net: ethernet: qualcomm: constify qca_serdev_ops

2020-08-26 Thread Rikard Falkeborn
The only usage of qca_serdev_ops is to pass its address to serdev_device_set_client_ops() which takes a const pointer. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn --- drivers/net/ethernet/qualcomm/qca_uart.c | 2 +- 1 file changed, 1

[PATCH net-next 0/6] drivers/net: constify static ops-variables

2020-08-26 Thread Rikard Falkeborn
This series constifies a number of static ops variables, to allow the compiler to put them in read-only memory. Compile-tested only. Rikard Falkeborn (6): net: ethernet: qualcomm: constify qca_serdev_ops net: ethernet: ravb: constify bb_ops net: renesas: sh_eth: constify bb_ops net: phy

[PATCH net-next 3/6] net: renesas: sh_eth: constify bb_ops

2020-08-26 Thread Rikard Falkeborn
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 --- drivers/net/ethernet/renesas/sh_eth.c | 2 +- 1 file changed, 1

[PATCH net-next 4/6] net: phy: at803x: constify static regulator_ops

2020-08-26 Thread Rikard Falkeborn
The only usage of vddio_regulator_ops and vddh_regulator_ops is to assign their address to the ops field in the regulator_desc struct, which is a const pointer. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn --- drivers/net/phy/at803x.c

[PATCH net-next 5/6] net: phy: mscc: macsec: constify vsc8584_macsec_ops

2020-08-26 Thread Rikard Falkeborn
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 --- drivers/net/phy/mscc/mscc_macsec.c | 2 +- 1 file changed

[PATCH net-next 6/6] net: ath11k: constify ath11k_thermal_ops

2020-08-26 Thread Rikard Falkeborn
The only usage of ath11k_thermal_ops is to pass its address to thermal_cooling_device_register() which takes a const pointer. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn --- drivers/net/wireless/ath/ath11k/thermal.c | 2 +- 1 file changed

[PATCH net-next 2/6] net: ethernet: ravb: constify bb_ops

2020-08-26 Thread Rikard Falkeborn
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 --- drivers/net/ethernet/renesas/ravb_main.c | 2 +- 1 file changed, 1