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
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
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
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
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) \
>
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
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
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
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
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
:
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
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 --
: 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
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
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
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
.
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
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
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
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
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
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 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
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
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 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
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 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 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
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 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 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 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
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 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
:
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
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
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
/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
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
:
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
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
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
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
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:
> >
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
-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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
101 - 200 of 284 matches
Mail list logo