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
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
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
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
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_
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
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
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
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
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
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
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
/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
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
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
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
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
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
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
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
20 matches
Mail list logo