Re: [PATCH] linux/bits.h: Add compile time sanity check of GENMASK inputs

2019-08-05 Thread Rikard Falkeborn
On Sun, Aug 04, 2019 at 03:45:16PM +0900, Masahiro Yamada wrote: > On Sun, Aug 4, 2019 at 3:36 AM Rikard Falkeborn > wrote: > > > > On Sat, Aug 03, 2019 at 12:12:46PM +0900, Masahiro Yamada wrote: > > > On Sat, Aug 3, 2019 at 12:03 PM Masahiro Yamada > > > wro

Re: [PATCH] linux/bits.h: Add compile time sanity check of GENMASK inputs

2019-08-06 Thread Rikard Falkeborn
Hi Masahiro, On Wed, Aug 07, 2019 at 12:19:36AM +0900, Masahiro Yamada wrote: > Hi Rikard, > > > On Tue, Aug 6, 2019 at 4:55 AM Rikard Falkeborn > wrote: > > > > On Sun, Aug 04, 2019 at 03:45:16PM +0900, Masahiro Yamada wrote: > > > On Sun, Aug 4, 2019 at 3

Re: linux-next: build warning after merge of the akpm-current tree

2019-08-07 Thread Rikard Falkeborn
Hi Stephen, Andrew On Wed, Aug 07, 2019 at 06:00:41PM +1000, Stephen Rothwell wrote: > Hi all, > > After merging the akpm-current tree, today's linux-next build (x86_64 > allmodconfig) failed like this: > > In file included from include/linux/bits.h:22, > from arch/x86/include/a

Re: [PATCH v2 2/2] linux/bits.h: Add compile time sanity check of GENMASK inputs

2019-08-07 Thread Rikard Falkeborn
On Wed, Aug 07, 2019 at 09:52:33AM -0700, Guenter Roeck wrote: > On 8/7/19 7:55 AM, Masahiro Yamada wrote: > > On Wed, Aug 7, 2019 at 11:27 PM Guenter Roeck wrote: > > > > > > On Fri, Aug 02, 2019 at 01:03:58AM +0200, Rikard Falkeborn wrote: > > > > GENMASK

Re: [PATCH] linux/bits.h: Add compile time sanity check of GENMASK inputs

2019-08-07 Thread Rikard Falkeborn
On Tue, Aug 06, 2019 at 02:15:54PM -0700, Joe Perches wrote: > On Tue, 2019-08-06 at 21:27 +0200, Rikard Falkeborn wrote: > > On Wed, Aug 07, 2019 at 12:19:36AM +0900, Masahiro Yamada wrote: > > > How about this? > > > #define GENMASK_INPUT_CHECK(high, low) \ >

[PATCH 1/4] misc: rtsx_usb: Constify struct usb_device_id

2020-06-10 Thread Rikard Falkeborn
hex filename 216734000 128 2580164c9 drivers/misc/cardreader/rtsx_usb.o Signed-off-by: Rikard Falkeborn --- drivers/misc/cardreader/rtsx_usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/cardreader/rtsx_usb.c b/drivers/misc/cardreader

[PATCH 2/4] misc: genwqe: Constify struct pci_error_handlers

2020-06-10 Thread Rikard Falkeborn
filename 2027060082464 287427046 drivers/misc/genwqe/card_base.o Signed-off-by: Rikard Falkeborn --- drivers/misc/genwqe/card_base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/genwqe/card_base.c b/drivers/misc/genwqe/card_base.c index 1dc6c7c5cbce

[PATCH 4/4] mic: vop: Constify static structs

2020-06-10 Thread Rikard Falkeborn
hex filename 151133841 192 191464aca drivers/misc/mic/vop/vop_main.o Signed-off-by: Rikard Falkeborn --- drivers/misc/mic/vop/vop_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/misc/mic/vop/vop_main.c b/drivers/misc/mic/vop/vop_main.c

[PATCH 0/4] drivers/misc: Constify static structs

2020-06-10 Thread Rikard Falkeborn
Constify some static structs that are not modified to allow the compiler to put them in read-only memory. The patches are independent of each other. Rikard Falkeborn (4): misc: rtsx_usb: Constify struct usb_device_id misc: genwqe: Constify struct pci_error_handlers mei: hdcp: Constify

[PATCH 3/4] mei: hdcp: Constify struct mei_cl_device_id

2020-06-10 Thread Rikard Falkeborn
160045256 0 21260530c drivers/misc/mei/hdcp/mei_hdcp.o Signed-off-by: Rikard Falkeborn --- drivers/misc/mei/hdcp/mei_hdcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/mei/hdcp/mei_hdcp.c b/drivers/misc/mei/hdcp/mei_hdcp.c index 4c596c646ac0

[PATCH] phy: allwinner: phy-sun6i-mipi-dphy: Constify structs

2020-06-29 Thread Rikard Falkeborn
: textdata bss dec hex filename 48351496 64639518fb drivers/phy/allwinner/phy-sun6i-mipi-dphy.o Signed-off-by: Rikard Falkeborn --- drivers/phy/allwinner/phy-sun6i-mipi-dphy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/phy

[PATCH] regulator: qcom: labibb: Constify static structs

2020-09-30 Thread Rikard Falkeborn
only copied into the desc field in the labbibb_regulator_data struct. This struct is modified, but that's a copy of the static one. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn --- drivers/regulator/qcom-labibb-regulator.c | 8 --

[PATCH rdma-next 1/2] RDMA/core: Constify struct attribute_group

2020-09-30 Thread Rikard Falkeborn
: Rikard Falkeborn --- drivers/infiniband/core/sysfs.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/infiniband/core/sysfs.c b/drivers/infiniband/core/sysfs.c index c11e50510e49..453d1c451ed5 100644 --- a/drivers/infiniband/core/sysfs.c +++ b/drivers

[PATCH rdma-next 0/2] RDMA: Constify static struct attribute_group

2020-09-30 Thread Rikard Falkeborn
Constify a couple of static struct attribute_group that are never modified to allow the compiler to put them in read-only memory. Rikard Falkeborn (2): RDMA/core: Constify struct attribute_group RDMA/rtrs: Constify static struct attribute_group drivers/infiniband/core/sysfs.c

[PATCH rdma-next 2/2] RDMA/rtrs: Constify static struct attribute_group

2020-09-30 Thread Rikard Falkeborn
The only usage of these is to pass their address to sysfs_create_group() and sysfs_remove_group(), both which takes const pointers. Make the const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn --- drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c | 6

[PATCH] iio: accel: mma8452: Constify static struct attribute_group

2020-09-30 Thread Rikard Falkeborn
The only usage of mma8452_event_attribute_group is to assign its address to the event_attrs field in the iio_info struct, which is a const pointer. Make it const to allow the compiler to put it in read-only memory. This was the only non-const static struct in drivers/iio. Signed-off-by: Rikard

[PATCH 0/3] w1: Constify w1_family_ops

2020-10-04 Thread Rikard Falkeborn
. Build-tested on x86 allmodconfig. Rikard Falkeborn (3): w1: Constify struct w1_family_ops w1: Constify static w1_family_ops structs power: supply: Constify static w1_family_ops structs drivers/power/supply/bq27xxx_battery_hdq.c | 2 +- drivers/power/supply/ds2760_battery.c | 2 +- drivers

[PATCH 2/3] w1: Constify static w1_family_ops structs

2020-10-04 Thread Rikard Falkeborn
able optional_qualifier@ identifier r1.i; @@ static +const struct w1_family_ops i={}; // Signed-off-by: Rikard Falkeborn --- drivers/w1/slaves/w1_ds2405.c | 2 +- drivers/w1/slaves/w1_ds2406.c | 2 +- drivers/w1/slaves/w1_ds2408.c | 2 +- drivers/w1/slaves/w1_ds2413.c | 2 +- drivers/w1/slaves/w1_ds24

[PATCH 3/3] power: supply: Constify static w1_family_ops structs

2020-10-04 Thread Rikard Falkeborn
able optional_qualifier@ identifier r1.i; @@ static +const struct w1_family_ops i={}; // Signed-off-by: Rikard Falkeborn --- drivers/power/supply/bq27xxx_battery_hdq.c | 2 +- drivers/power/supply/ds2760_battery.c | 2 +- drivers/power/supply/max1721x_battery.c| 2 +- 3 files changed, 3 insert

[PATCH 1/3] w1: Constify struct w1_family_ops

2020-10-04 Thread Rikard Falkeborn
The fops field in the w1_family struct is never modified. Make it const to indicate that. Constifying the pointer makes it possible for drivers to declare static w1_family_ops structs const, which in turn will allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn

[PATCH] drm: bridge: dw-hdmi: Constify dw_hdmi_i2s_ops

2020-10-04 Thread Rikard Falkeborn
The only usage of dw_hdmi_i2s_ops is to assign its address to the ops field in the hdmi_codec_pdata 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/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c | 2

[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 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 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 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 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 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 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 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

[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 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 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 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 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] ARM: prima2: Constify static sirfsoc_rstc_ops

2020-09-29 Thread Rikard Falkeborn
The only usage of sirfsoc_rstc_ops is to assign its address to the ops field in the reset_controller_dev 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 --- arch/arm/mach-prima2/rstc.c | 2 +- 1 file changed, 1

[PATCH] pinctrl: nuvoton: npcm7xx: Constify static ops structs

2020-09-26 Thread Rikard Falkeborn
The only usage of these structs is to assign their address to various ops fields in the pinctrl_desc struct, which are const pointers. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn --- drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c | 6

[PATCH] phy: fsl-imx8mq-usb: Constify imx8mp_usb_phy_ops

2020-09-26 Thread Rikard Falkeborn
The only usage of imx8mp_usb_phy_ops is to assign its address to the data field in the of_device_id struct, which is a const void pointer. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn --- drivers/phy/freescale/phy-fsl-imx8mq-usb.c | 2 +- 1

[PATCH] block/rnbd: client: Constify rnbd_mq_ops

2020-09-27 Thread Rikard Falkeborn
The only usage of rnbd_mq_ops is to assign its address to the ops field in the blk_mq_tag_set 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/block/rnbd/rnbd-clt.c | 2 +- 1 file changed, 1

[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] nvme-tcp: constify static struct blk_mq_ops

2020-05-28 Thread Rikard Falkeborn
dec hex filename 534226565 576 60563ec93 drivers/nvme/host/tcp.o Signed-off-by: Rikard Falkeborn --- drivers/nvme/host/tcp.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c index c79e248b9f43

[PATCH 0/2] drivers/iommu: Constify structs

2020-05-25 Thread Rikard Falkeborn
Constify some structs with function pointers to allow the compiler to put them in read-only memory. There is not dependency between the patches. Rikard Falkeborn (2): iommu/hyper-v: Constify hyperv_ir_domain_ops iommu/sun50i: Constify sun50i_iommu_ops drivers/iommu/hyperv-iommu.c | 2

[PATCH 2/2] iommu/sun50i: Constify sun50i_iommu_ops

2020-05-25 Thread Rikard Falkeborn
filename 147262117 64 16907420b drivers/iommu/sun50i-iommu.o Signed-off-by: Rikard Falkeborn --- drivers/iommu/sun50i-iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/sun50i-iommu.c b/drivers/iommu/sun50i-iommu.c index 1fa09ddcebd4

[PATCH 1/2] iommu/hyper-v: Constify hyperv_ir_domain_ops

2020-05-25 Thread Rikard Falkeborn
filename 30441052112052161460 drivers/iommu/hyperv-iommu.o Signed-off-by: Rikard Falkeborn --- drivers/iommu/hyperv-iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/hyperv-iommu.c b/drivers/iommu/hyperv-iommu.c index a386b83e0e34

[PATCH 2/6] iio: dac: ad5380: Constify struct iio_chan_spec_ext_info

2020-05-26 Thread Rikard Falkeborn
3088 192 155323cac drivers/iio/dac/ad5380.o Signed-off-by: Rikard Falkeborn --- drivers/iio/dac/ad5380.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/dac/ad5380.c b/drivers/iio/dac/ad5380.c index b37e5675f716..04c74cc1a4ec 100644 --- a/drivers/iio/dac

[PATCH 0/6] drivers/iio: Constify structs

2020-05-26 Thread Rikard Falkeborn
Constify a number of static structs to allow the compiler to put them in read-only memory. The patches are independent. Rikard Falkeborn (6): iio: adc: max11100: Constify struct iio_chan_spec iio: dac: ad5380: Constify struct iio_chan_spec_ext_info iio: dac: ad5592r-base: Constify struct

[PATCH 3/6] iio: dac: ad5592r-base: Constify struct iio_chan_spec_ext_info

2020-05-26 Thread Rikard Falkeborn
134211960 256 156373d15 drivers/iio/dac/ad5592r-base.o Signed-off-by: Rikard Falkeborn --- drivers/iio/dac/ad5592r-base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/dac/ad5592r-base.c b/drivers/iio/dac/ad5592r-base.c index 410e90e5f75f

[PATCH 5/6] iio: light: stk3310: Constify regmap_config

2020-05-26 Thread Rikard Falkeborn
163475104 128 21579544b drivers/iio/light/stk3310.o Signed-off-by: Rikard Falkeborn --- drivers/iio/light/stk3310.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/light/stk3310.c b/drivers/iio/light/stk3310.c index 185c24a75ae6..9d1e503bc958 100644

[PATCH 4/6] iio: dac: ad5686: Constify static struct iio_chan_spec

2020-05-26 Thread Rikard Falkeborn
64 193144b72 drivers/iio/dac/ad5686.o Signed-off-by: Rikard Falkeborn --- drivers/iio/dac/ad5686.c | 8 drivers/iio/dac/ad5686.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/iio/dac/ad5686.c b/drivers/iio/dac/ad5686.c index 8dd67da0a7da

[PATCH 6/6] iio: magnetometer: mmc35240: Constify struct reg_default

2020-05-26 Thread Rikard Falkeborn
filename 98233224 128 131753377 drivers/iio/magnetometer/mmc35240.o Signed-off-by: Rikard Falkeborn --- drivers/iio/magnetometer/mmc35240.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/magnetometer/mmc35240.c b/drivers/iio/magnetometer/mmc35240.c

[PATCH 1/6] iio: adc: max11100: Constify struct iio_chan_spec

2020-05-26 Thread Rikard Falkeborn
filename 3968 976 049441350 drivers/iio/adc/max11100.o Signed-off-by: Rikard Falkeborn --- drivers/iio/adc/max11100.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/adc/max11100.c b/drivers/iio/adc/max11100.c index 3440539cfdba..b121ca78f851 100644

[PATCH] docs: debugfs: Update struct debugfs_reg32 definition

2020-05-08 Thread Rikard Falkeborn
Update the docs to match the implementation, both the definition of struct debugfs_regset32 and the definition of debugfs_print_regs32(). Signed-off-by: Rikard Falkeborn --- Documentation/filesystems/debugfs.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a

[PATCH] usb: mtu3: constify struct debugfs_reg32

2020-05-08 Thread Rikard Falkeborn
data bss dec hex filename 201426992 0 2713469fe drivers/usb/mtu3/mtu3_debugfs.o Signed-off-by: Rikard Falkeborn --- drivers/usb/mtu3/mtu3_debugfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/mtu3/mtu3_debugfs.c b/drivers/usb

[PATCH] clk: bcm2835: Constify struct debugfs_reg32

2020-05-08 Thread Rikard Falkeborn
: textdata bss dec hex filename 26662 16024 64 42750a6fe drivers/clk/bcm/clk-bcm2835.o Signed-off-by: Rikard Falkeborn --- drivers/clk/bcm/clk-bcm2835.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/clk/bcm/clk-bcm2835.c b

[PATCH 0/4] crypto: constify struct debugfs_reg32

2020-05-08 Thread Rikard Falkeborn
A small series constifying struct debugfs_reg32 where it can be made const. There's no dependency between the patches. Rikard Falkeborn (4): crypto: ccree - constify struct debugfs_reg32 crypto: hisilicon/hpre - constify struct debugfs_reg32 crypto: hisilicon/zip - constify s

[PATCH 1/4] crypto: ccree - constify struct debugfs_reg32

2020-05-08 Thread Rikard Falkeborn
After: textdata bss dec hex filename 32551936 6452551487 drivers/crypto/ccree/cc_debugfs.o Signed-off-by: Rikard Falkeborn --- drivers/crypto/ccree/cc_debugfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/ccree

[PATCH 2/4] crypto: hisilicon/hpre - constify struct debugfs_reg32

2020-05-08 Thread Rikard Falkeborn
/hisilicon/hpre/hpre_main.o After: textdata bss dec hex filename 168395904 480 232235ab7 drivers/crypto/hisilicon/hpre/hpre_main.o Signed-off-by: Rikard Falkeborn --- drivers/crypto/hisilicon/hpre/hpre_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[PATCH 3/4] crypto: hisilicon/zip - constify struct debugfs_reg32

2020-05-08 Thread Rikard Falkeborn
data bss dec hex filename 156205776 480 218765574 drivers/crypto/hisilicon/zip/zip_main.o Signed-off-by: Rikard Falkeborn --- drivers/crypto/hisilicon/zip/zip_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/hisilicon/zip

[PATCH 4/4] crypto: hisilicon/sec2 - constify sec_dfx_regs

2020-05-08 Thread Rikard Falkeborn
: textdata bss dec hex filename 183666928 480 2577464ae drivers/crypto/hisilicon/sec2/sec_main.o Signed-off-by: Rikard Falkeborn --- drivers/crypto/hisilicon/sec2/sec_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/hisilicon

[PATCH] Bluetooth: serdev: Constify serdev_device_ops

2020-05-09 Thread Rikard Falkeborn
bss dec hex filename 72562344 19297922640 drivers/bluetooth/hci_serdev.o Signed-off-by: Rikard Falkeborn --- drivers/bluetooth/hci_serdev.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/bluetooth/hci_serdev.c b/drivers/bluetooth

[PATCH] xen-platform: Constify dev_pm_ops

2020-05-09 Thread Rikard Falkeborn
2564381111d drivers/xen/platform-pci.o Signed-off-by: Rikard Falkeborn --- drivers/xen/platform-pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/xen/platform-pci.c b/drivers/xen/platform-pci.c index 59e85e408c23..dd911e1ff782 100644 --- a/drivers/xen

Re: [PATCH v7 1/4] bitops: Introduce the the for_each_set_clump macro

2020-06-02 Thread Rikard Falkeborn
On Mon, Jun 01, 2020 at 11:33:30AM +0300, Andy Shevchenko wrote: > On Mon, Jun 01, 2020 at 12:37:16AM +0200, Rikard Falkeborn wrote: > > + Emil who was working on a patch for this > > > > On Sun, May 31, 2020 at 02:00:45PM +0300, Andy Shevchenko wrote: > > > On Sun

Re: [PATCH v7 1/4] bitops: Introduce the the for_each_set_clump macro

2020-06-03 Thread Rikard Falkeborn
On Wed, Jun 03, 2020 at 11:49:37AM +0300, Andy Shevchenko wrote: > On Tue, Jun 2, 2020 at 10:01 PM Rikard Falkeborn > wrote: > > On Mon, Jun 01, 2020 at 11:33:30AM +0300, Andy Shevchenko wrote: > > > On Mon, Jun 01, 2020 at 12:37:16AM +0200, Rikard Falkeborn wrote: > >

[PATCH] linux/bits.h: fix unsigned less than zero warnings

2020-06-03 Thread Rikard Falkeborn
ASK' 49 | unsigned int lsbmask = GENMASK(msbpos - 1, 0); | ^~~ Fixes: 295bcca84916 ("linux/bits.h: add compile time sanity check of GENMASK inputs") Reported-by: kbuild test robot Reported-by: Emil Velikov Reported-by: Syed Nayyar Waris Signed-off-by: Rikard Falkeborn

Re: [PATCH] linux/bits.h: fix unsigned less than zero warnings

2020-06-04 Thread Rikard Falkeborn
On Thu, Jun 04, 2020 at 09:41:29AM +0300, Andy Shevchenko wrote: > On Thu, Jun 4, 2020 at 1:03 AM Rikard Falkeborn > wrote: > > > > When calling the GENMASK and GENMASK_ULL macros with zero lower bit and > > an unsigned unknown high bit, some gcc versions warn due to th

[PATCH 0/2] drivers/phy/ti: Constify structs

2020-05-24 Thread Rikard Falkeborn
Constify some static structs that are not modified in order to allow the compiler to put them in read-only memory. Rikard Falkeborn (2): phy: ti: am654-serdes: Constify regmap_config phy: ti: j721e-wiz: Constify structs drivers/phy/ti/phy-am654-serdes.c | 2 +- drivers/phy/ti/phy-j721e

[PATCH 1/2] phy: ti: am654-serdes: Constify regmap_config

2020-05-24 Thread Rikard Falkeborn
126483324 64 160363ea4 drivers/phy/ti/phy-am654-serdes.o Signed-off-by: Rikard Falkeborn --- drivers/phy/ti/phy-am654-serdes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/phy/ti/phy-am654-serdes.c b/drivers/phy/ti/phy-am654-serdes.c index

[PATCH 2/2] phy: ti: j721e-wiz: Constify structs

2020-05-24 Thread Rikard Falkeborn
bss dec hex filename 206496660 64 273736aed drivers/phy/ti/phy-j721e-wiz.o Signed-off-by: Rikard Falkeborn --- drivers/phy/ti/phy-j721e-wiz.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/phy/ti/phy-j721e-wiz.c b/drivers/phy/ti/phy

[PATCH v2 1/2] linux/bits.h: fix unsigned less than zero warnings

2020-06-07 Thread Rikard Falkeborn
nux/bits.h: add compile time sanity check of GENMASK inputs") Reported-by: kbuild test robot Reported-by: Emil Velikov Reported-by: Syed Nayyar Waris Signed-off-by: Rikard Falkeborn --- v1->v2 * Change to require both high and low bit to be constant expressions instead of introducing somewh

[PATCH v2 2/2] bits: Add tests of GENMASK

2020-06-07 Thread Rikard Falkeborn
Add tests of GENMASK and GENMASK_ULL. A few test cases that should fail compilation are provided under ifdef. Suggested-by: Andy Shevchenko Signed-off-by: Rikard Falkeborn --- v1-v2 * New patch. First time I wrote a KUnittest so may be room for improvements... lib/Kconfig.debug | 11

[PATCH] kunit: kunit_config: Fix parsing of CONFIG options with space

2020-06-07 Thread Rikard Falkeborn
pdating the regex to allow strings containing spaces. Fixes: 8b59cd81dc5e ("kbuild: ensure full rebuild when the compiler is updated") Signed-off-by: Rikard Falkeborn --- Maybe it would have been sufficient to just use CONFIG_PATTERN = r'^CONFIG_(\w+)=(.*)$' instead? tools

Re: [PATCH v2 2/2] bits: Add tests of GENMASK

2020-06-08 Thread Rikard Falkeborn
On Mon, Jun 08, 2020 at 09:33:05AM +0200, Geert Uytterhoeven wrote: > Hi Richard, > > Thanks for your patch! > > On Sun, Jun 7, 2020 at 10:35 PM Rikard Falkeborn > wrote: > > Add tests of GENMASK and GENMASK_ULL. > > > > A few test cases that should fail

Re: [PATCH v2 2/2] bits: Add tests of GENMASK

2020-06-08 Thread Rikard Falkeborn
On Mon, Jun 08, 2020 at 11:08:04AM +0300, Andy Shevchenko wrote: > On Sun, Jun 7, 2020 at 11:34 PM Rikard Falkeborn > wrote: > > > > Add tests of GENMASK and GENMASK_ULL. > > > > A few test cases that should fail compilation are provided under ifdef. > > &g

[PATCH v3 2/2] bits: Add tests of GENMASK

2020-06-08 Thread Rikard Falkeborn
Add tests of GENMASK and GENMASK_ULL. A few test cases that should fail compilation are provided under #ifdef TEST_GENMASK_FAILURES Suggested-by: Andy Shevchenko Signed-off-by: Rikard Falkeborn --- I did not move it to test_bitops.c, because I think it makes more sense that test_bitops.c tests

[PATCH v3 1/2] linux/bits.h: fix unsigned less than zero warnings

2020-06-08 Thread Rikard Falkeborn
nux/bits.h: add compile time sanity check of GENMASK inputs") Reported-by: kbuild test robot Reported-by: Emil Velikov Reported-by: Syed Nayyar Waris Reviewed-by: Andy Shevchenko Signed-off-by: Rikard Falkeborn --- v2-v3 Added Andys Reviewed-by. v1->v2 Change to require both high and low bit

[PATCH 5/8] phy: lantiq: vrx200-pcie: Constify ltq_vrx200_pcie_phy_ops

2020-08-23 Thread Rikard Falkeborn
The only usage is to pass its address to devm_phy_create() 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/phy/lantiq/phy-lantiq-vrx200-pcie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 7/8] phy: samsung-ufs: Constify samsung_ufs_phy_ops

2020-08-23 Thread Rikard Falkeborn
The only usage is to pass its address to devm_phy_create() 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/phy/samsung/phy-samsung-ufs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 1/8] phy: cadence: salvo: Constify cdns_salvo_phy_ops

2020-08-23 Thread Rikard Falkeborn
The only usage is to pass its address to devm_phy_create() 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/phy/cadence/phy-cadence-salvo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 6/8] phy: ralink-usb: Constify ralink_usb_phy_ops

2020-08-23 Thread Rikard Falkeborn
The only usage is to pass its address to devm_phy_create() 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/phy/ralink/phy-ralink-usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH 8/8] phy: qcom-ipq4019-usb: Constify static phy_ops structs

2020-08-23 Thread Rikard Falkeborn
Their only usages is to assign the address to the data field in the of_device_id struct, which is a const void pointer. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn --- drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c | 4 ++-- 1 file changed

[PATCH 4/8] phy: lantiq: rcu-usb2: Constify ltq_rcu_usb2_phy_ops

2020-08-23 Thread Rikard Falkeborn
The only usage is to pass its address to devm_phy_create() 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/phy/lantiq/phy-lantiq-rcu-usb2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 0/8] drivers: phy: Constify static phy_ops structs

2020-08-23 Thread Rikard Falkeborn
-field in of_device_id, which is a const void pointer. Making the structs const allows the compiler to put them in read-only memory. The patches are all independent of each other, and have been compile-tested only. Rikard Falkeborn (8): phy: cadence: salvo: Constify cdns_salvo_phy_ops phy: fsl

[PATCH 3/8] phy: hisilicon; Constify hi3660_phy_ops

2020-08-23 Thread Rikard Falkeborn
The only usage is to pass its address to devm_phy_create() 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/phy/hisilicon/phy-hi3660-usb3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 2/8] phy: fsl-imx8mq-usb: Constify imx8mq_usb_phy_ops

2020-08-23 Thread Rikard Falkeborn
The only usage is to pass its address to devm_phy_create() 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/phy/freescale/phy-fsl-imx8mq-usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH] const_structs.checkpatch: Add phy_ops

2020-08-24 Thread Rikard Falkeborn
All usages of phy_ops in include/linux uses const phy_ops * and all instances of phy_ops in the kernel that are not const already can be made const (patches have been posted for those separately). Suggested-by: Joe Perches Signed-off-by: Rikard Falkeborn --- See [1] for a patch series

[PATCH] power: supply: bq2515x: Constify static variables

2020-08-24 Thread Rikard Falkeborn
Constify a number of static variables that are not modified to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn --- drivers/power/supply/bq2515x_charger.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/power/supply

[PATCH 3/3] firmware: arm_scmi: Constify static scmi-ops

2020-09-06 Thread Rikard Falkeborn
These are never modified, so make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn --- drivers/firmware/arm_scmi/clock.c | 2 +- drivers/firmware/arm_scmi/common.h | 2 +- drivers/firmware/arm_scmi/mailbox.c | 2 +- drivers/firmware/arm_scmi

[PATCH 1/3] cpufreq: arm_scmi: Constify scmi_perf_ops pointers

2020-09-06 Thread Rikard Falkeborn
The perf_ops are not modified through this pointer. Make them const to indicate that. This is in preparation to make the scmi-ops pointers in scmi_handle const. Signed-off-by: Rikard Falkeborn --- drivers/cpufreq/scmi-cpufreq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff

[PATCH 2/3] firmware: arm_scmi: Constify ops pointers in scmi_handle

2020-09-06 Thread Rikard Falkeborn
These are never modified, so make them const to allow drivers to make them const. Signed-off-by: Rikard Falkeborn --- include/linux/scmi_protocol.h | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/linux/scmi_protocol.h b/include/linux/scmi_protocol.h

[PATCH 0/3] arm_scmi: Constify ops pointers in struct scmi_handle

2020-09-06 Thread Rikard Falkeborn
A small patch series aiming to constify static scmi_*_ops structs in drivers/firmware/arm_scmi. Since these are not modified, constify them to allow the compiler to put them in read-only memory. Rikard Falkeborn (3): cpufreq: arm_scmi: Constify scmi_perf_ops pointers firmware: arm_scmi

[PATCH 1/8] regulator: tps51632: Constify tps51632_dcdc_ops

2020-08-29 Thread Rikard Falkeborn
The only usage of tps51632_dcdc_ops is to assign its address to the ops field in the regulator_desc 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/regulator/tps51632-regulator.c | 2 +- 1 file

[PATCH 0/8] regulator/tps*: Constify static regulator ops

2020-08-29 Thread Rikard Falkeborn
Constify static instances of struct regulator_ops to allow the compiler to put them in read-only memory. Patches are independent. Compile-tested only. Rikard Falkeborn (8): regulator: tps51632: Constify tps51632_dcdc_ops regulator: tps6105x: Constify tps6105x_regulator_ops regulator

[PATCH 7/8] regulator: tps65912: Constify static regulator_ops

2020-08-29 Thread Rikard Falkeborn
The only usage of tps65912_ops_dcdc and tps65912_ops_ldo 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/regulator/tps65912

[PATCH 3/8] regulator: tps62360: Constify tps62360_dcdc_ops

2020-08-29 Thread Rikard Falkeborn
The only usage of tps62360_dcdc_ops is to assign its address to the ops field in the regulator_desc 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/regulator/tps62360-regulator.c | 2 +- 1 file

[PATCH 8/8] regulator: tps65910: Constify static regulator_ops

2020-08-29 Thread Rikard Falkeborn
The only usage of these 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/regulator/tps65910-regulator.c | 10 +- 1 file

[PATCH 6/8] regulator: tps6586x: Constify static regulator_ops

2020-08-29 Thread Rikard Falkeborn
The only usage of these are 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/regulator/tps6586x-regulator.c | 8 1 file

[PATCH 5/8] regulator: tps65090: constify static regulator_ops

2020-08-29 Thread Rikard Falkeborn
The only usages of these are 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/regulator/tps65090-regulator.c | 8 1 file

[PATCH 4/8] regulator: tps65086: Constify static regulator_ops

2020-08-29 Thread Rikard Falkeborn
The only usage of reg_ops and switch_ops is to assign their addresses 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/regulator/tps65086-regulator.c | 4

[PATCH 2/8] regulator: tps6105x: Constify tps6105x_regulator_ops

2020-08-29 Thread Rikard Falkeborn
The only usage of tps6105x_regulator_ops is to assign its address to the ops field in the regulator_desc 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/regulator/tps6105x-regulator.c | 2 +- 1 file

[PATCH] drm/gma500: Constify static structs

2020-08-30 Thread Rikard Falkeborn
The only usage of these is to assign their address to the fbops field in the fb_info 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/gpu/drm/gma500/framebuffer.c | 6 +++--- 1 file changed, 3

[PATCH 0/3] pinctrl/actions: Constify static variables

2020-08-30 Thread Rikard Falkeborn
Constify a couple of static variables which are not modified to allow the compiler to put them in read-only memory. Patch 1/3 is probably the most important one since those structs contain function pointer. The patches are independent, and can be applied in any order. Compile-tested only. Rikard

<    1   2   3   >