* [PATCH 1/2] mfd: Constify mfd_cell arrays
@ 2026-10-30 7:11 Krzysztof Kozlowski
2026-10-30 7:11 ` [PATCH 2/2] mfd: cgbc: Allow compile testing Krzysztof Kozlowski
` (5 more replies)
0 siblings, 6 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2026-10-30 7:11 UTC (permalink / raw)
To: Lee Jones, Chen-Yu Tsai, Thomas Richard, Andy Shevchenko,
Chanwoo Choi, Krzysztof Kozlowski, Andreas Werner, Frank Li,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
Matti Vaittinen, Maxime Coquelin, Alexandre Torgue, Liviu Dudau,
Sudeep Holla, Lorenzo Pieralisi, mfd, linux-kernel, imx,
linux-arm-kernel, linux-stm32, patches
Cc: Krzysztof Kozlowski
mfd_add_devices() takes pointer to const, so 'struct mfd_cell' arrays
can be constified whenever driver does not modify it in the probe.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
---
drivers/mfd/ac100.c | 2 +-
drivers/mfd/axp20x.c | 4 ++--
drivers/mfd/cgbc-core.c | 2 +-
drivers/mfd/cs5535-mfd.c | 2 +-
drivers/mfd/intel_soc_pmic_bxtwc.c | 2 +-
drivers/mfd/intel_soc_pmic_chtdc_ti.c | 2 +-
drivers/mfd/intel_soc_pmic_chtwc.c | 2 +-
drivers/mfd/intel_soc_pmic_crc.c | 6 +++---
drivers/mfd/max77705.c | 2 +-
drivers/mfd/menf21bmc.c | 2 +-
drivers/mfd/mxs-lradc.c | 6 +++---
drivers/mfd/rohm-bd718x7.c | 6 +++---
drivers/mfd/rsmu_core.c | 8 ++++----
drivers/mfd/stmfx.c | 2 +-
drivers/mfd/vexpress-sysreg.c | 2 +-
drivers/mfd/wm97xx-core.c | 2 +-
16 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/drivers/mfd/ac100.c b/drivers/mfd/ac100.c
index 8f47c392cbd1..51b4d468c51d 100644
--- a/drivers/mfd/ac100.c
+++ b/drivers/mfd/ac100.c
@@ -75,7 +75,7 @@ static const struct regmap_config ac100_regmap_config = {
.cache_type = REGCACHE_MAPLE,
};
-static struct mfd_cell ac100_cells[] = {
+static const struct mfd_cell ac100_cells[] = {
{
.name = "ac100-codec",
.of_compatible = "x-powers,ac100-codec",
diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c
index 50df66de24e0..4d770e718716 100644
--- a/drivers/mfd/axp20x.c
+++ b/drivers/mfd/axp20x.c
@@ -1055,13 +1055,13 @@ static const struct mfd_cell axp152_cells[] = {
},
};
-static struct mfd_cell axp313a_cells[] = {
+static const struct mfd_cell axp313a_cells[] = {
/* AXP323 is sometimes paired with AXP717 as sub-PMIC */
MFD_CELL_BASIC("axp20x-regulator", NULL, NULL, 0, 1),
MFD_CELL_RES("axp313a-pek", axp313a_pek_resources),
};
-static struct mfd_cell axp717_cells[] = {
+static const struct mfd_cell axp717_cells[] = {
MFD_CELL_NAME("axp20x-regulator"),
MFD_CELL_RES("axp20x-pek", axp717_pek_resources),
MFD_CELL_OF("axp717-adc",
diff --git a/drivers/mfd/cgbc-core.c b/drivers/mfd/cgbc-core.c
index 2becaf797646..3460c50047ea 100644
--- a/drivers/mfd/cgbc-core.c
+++ b/drivers/mfd/cgbc-core.c
@@ -231,7 +231,7 @@ int cgbc_command(struct cgbc_device_data *cgbc, void *cmd, unsigned int cmd_size
}
EXPORT_SYMBOL_GPL(cgbc_command);
-static struct mfd_cell cgbc_devs[] = {
+static const struct mfd_cell cgbc_devs[] = {
{ .name = "cgbc-wdt" },
{ .name = "cgbc-gpio" },
{ .name = "cgbc-i2c", .id = 1 },
diff --git a/drivers/mfd/cs5535-mfd.c b/drivers/mfd/cs5535-mfd.c
index f3becbef19f5..d91d60dc5416 100644
--- a/drivers/mfd/cs5535-mfd.c
+++ b/drivers/mfd/cs5535-mfd.c
@@ -37,7 +37,7 @@ const struct software_node cs5535_gpio_swnode = {
};
EXPORT_SYMBOL_NS(cs5535_gpio_swnode, "CS5535");
-static struct mfd_cell cs5535_mfd_cells[] = {
+static const struct mfd_cell cs5535_mfd_cells[] = {
{
.name = "cs5535-smb",
.num_resources = 1,
diff --git a/drivers/mfd/intel_soc_pmic_bxtwc.c b/drivers/mfd/intel_soc_pmic_bxtwc.c
index 117517c171b5..5aa9e52401f0 100644
--- a/drivers/mfd/intel_soc_pmic_bxtwc.c
+++ b/drivers/mfd/intel_soc_pmic_bxtwc.c
@@ -245,7 +245,7 @@ static const struct resource tmu_resources[] = {
DEFINE_RES_IRQ_NAMED(BXTWC_TMU_IRQ, "TMU"),
};
-static struct mfd_cell bxt_wc_dev[] = {
+static const struct mfd_cell bxt_wc_dev[] = {
{
.name = "bxt_wcove_thermal",
.num_resources = ARRAY_SIZE(thermal_resources),
diff --git a/drivers/mfd/intel_soc_pmic_chtdc_ti.c b/drivers/mfd/intel_soc_pmic_chtdc_ti.c
index 6daf33e07ea0..8412a25d37ff 100644
--- a/drivers/mfd/intel_soc_pmic_chtdc_ti.c
+++ b/drivers/mfd/intel_soc_pmic_chtdc_ti.c
@@ -53,7 +53,7 @@ static const struct resource battery_resources[] = {
DEFINE_RES_IRQ(CHTDC_TI_CCEOCAL),
};
-static struct mfd_cell chtdc_ti_dev[] = {
+static const struct mfd_cell chtdc_ti_dev[] = {
{
.name = "chtdc_ti_pwrbtn",
.num_resources = ARRAY_SIZE(power_button_resources),
diff --git a/drivers/mfd/intel_soc_pmic_chtwc.c b/drivers/mfd/intel_soc_pmic_chtwc.c
index aa71a7d83fcd..f27985a58c87 100644
--- a/drivers/mfd/intel_soc_pmic_chtwc.c
+++ b/drivers/mfd/intel_soc_pmic_chtwc.c
@@ -50,7 +50,7 @@ static const struct resource cht_wc_ext_charger_resources[] = {
DEFINE_RES_IRQ(CHT_WC_EXT_CHGR_IRQ),
};
-static struct mfd_cell cht_wc_dev[] = {
+static const struct mfd_cell cht_wc_dev[] = {
{
.name = "cht_wcove_pwrsrc",
.num_resources = ARRAY_SIZE(cht_wc_pwrsrc_resources),
diff --git a/drivers/mfd/intel_soc_pmic_crc.c b/drivers/mfd/intel_soc_pmic_crc.c
index 627a89334908..ce4c9ef59198 100644
--- a/drivers/mfd/intel_soc_pmic_crc.c
+++ b/drivers/mfd/intel_soc_pmic_crc.c
@@ -54,7 +54,7 @@ static const struct resource gpio_resources[] = {
DEFINE_RES_IRQ_NAMED(CRYSTAL_COVE_IRQ_GPIO, "GPIO"),
};
-static struct mfd_cell crystal_cove_byt_dev[] = {
+static const struct mfd_cell crystal_cove_byt_dev[] = {
{
.name = "crystal_cove_pwrsrc",
.num_resources = ARRAY_SIZE(pwrsrc_resources),
@@ -93,7 +93,7 @@ static struct mfd_cell crystal_cove_byt_dev[] = {
},
};
-static struct mfd_cell crystal_cove_cht_dev[] = {
+static const struct mfd_cell crystal_cove_cht_dev[] = {
{
.name = "crystal_cove_gpio",
.num_resources = ARRAY_SIZE(gpio_resources),
@@ -142,7 +142,7 @@ static struct pwm_lookup crc_pwm_lookup[] = {
struct crystal_cove_config {
unsigned long irq_flags;
- struct mfd_cell *cell_dev;
+ const struct mfd_cell *cell_dev;
int n_cell_devs;
const struct regmap_config *regmap_config;
const struct regmap_irq_chip *irq_chip;
diff --git a/drivers/mfd/max77705.c b/drivers/mfd/max77705.c
index 2e9b81f26414..771015c229c8 100644
--- a/drivers/mfd/max77705.c
+++ b/drivers/mfd/max77705.c
@@ -15,7 +15,7 @@
#include <linux/regmap.h>
#include <linux/of.h>
-static struct mfd_cell max77705_devs[] = {
+static const struct mfd_cell max77705_devs[] = {
MFD_CELL_OF("max77705-rgb", NULL, NULL, 0, 0, "maxim,max77705-rgb"),
MFD_CELL_OF("max77705-charger", NULL, NULL, 0, 0, "maxim,max77705-charger"),
MFD_CELL_OF("max77705-haptic", NULL, NULL, 0, 0, "maxim,max77705-haptic"),
diff --git a/drivers/mfd/menf21bmc.c b/drivers/mfd/menf21bmc.c
index 0f24de516d72..252d5c81db6b 100644
--- a/drivers/mfd/menf21bmc.c
+++ b/drivers/mfd/menf21bmc.c
@@ -17,7 +17,7 @@
#define BMC_CMD_REV_MINOR 0x81
#define BMC_CMD_REV_MAIN 0x82
-static struct mfd_cell menf21bmc_cell[] = {
+static const struct mfd_cell menf21bmc_cell[] = {
{ .name = "menf21bmc_wdt", },
{ .name = "menf21bmc_led", },
{ .name = "menf21bmc_hwmon", }
diff --git a/drivers/mfd/mxs-lradc.c b/drivers/mfd/mxs-lradc.c
index 64afc7631790..71ad5184f7e0 100644
--- a/drivers/mfd/mxs-lradc.c
+++ b/drivers/mfd/mxs-lradc.c
@@ -90,7 +90,7 @@ static struct resource mx28_touchscreen_resources[] = {
DEFINE_RES_IRQ_NAMED(MX28_LRADC_CH7_IRQ, "mxs-lradc-channel7"),
};
-static struct mfd_cell mx23_cells[] = {
+static const struct mfd_cell mx23_cells[] = {
{
.name = "mxs-lradc-adc",
.resources = mx23_adc_resources,
@@ -103,7 +103,7 @@ static struct mfd_cell mx23_cells[] = {
},
};
-static struct mfd_cell mx28_cells[] = {
+static const struct mfd_cell mx28_cells[] = {
{
.name = "mxs-lradc-adc",
.resources = mx28_adc_resources,
@@ -128,7 +128,7 @@ static int mxs_lradc_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct device_node *node = dev->of_node;
struct mxs_lradc *lradc;
- struct mfd_cell *cells = NULL;
+ const struct mfd_cell *cells = NULL;
struct resource *res;
int ret = 0;
u32 ts_wires = 0;
diff --git a/drivers/mfd/rohm-bd718x7.c b/drivers/mfd/rohm-bd718x7.c
index 0b0f8e27e329..bd087004dde8 100644
--- a/drivers/mfd/rohm-bd718x7.c
+++ b/drivers/mfd/rohm-bd718x7.c
@@ -19,12 +19,12 @@
#include "rohm-pwrbutton.h"
-static struct mfd_cell bd71837_mfd_cells[] = {
+static const struct mfd_cell bd71837_mfd_cells[] = {
{ .name = "bd71837-clk", },
{ .name = "bd71837-pmic", },
};
-static struct mfd_cell bd71847_mfd_cells[] = {
+static const struct mfd_cell bd71847_mfd_cells[] = {
{ .name = "bd71847-clk", },
{ .name = "bd71847-pmic", },
};
@@ -113,7 +113,7 @@ static int bd718xx_i2c_probe(struct i2c_client *i2c)
struct irq_domain *irq_domain;
int ret;
unsigned int chip_type;
- struct mfd_cell *mfd;
+ const struct mfd_cell *mfd;
int cells;
if (!i2c->irq) {
diff --git a/drivers/mfd/rsmu_core.c b/drivers/mfd/rsmu_core.c
index fd04a6e5dfa3..02bfb84653ae 100644
--- a/drivers/mfd/rsmu_core.c
+++ b/drivers/mfd/rsmu_core.c
@@ -22,7 +22,7 @@ enum {
RSMU_N_DEVS = 2,
};
-static struct mfd_cell rsmu_cm_devs[] = {
+static const struct mfd_cell rsmu_cm_devs[] = {
[RSMU_PHC] = {
.name = "8a3400x-phc",
},
@@ -31,7 +31,7 @@ static struct mfd_cell rsmu_cm_devs[] = {
},
};
-static struct mfd_cell rsmu_sabre_devs[] = {
+static const struct mfd_cell rsmu_sabre_devs[] = {
[RSMU_PHC] = {
.name = "82p33x1x-phc",
},
@@ -40,7 +40,7 @@ static struct mfd_cell rsmu_sabre_devs[] = {
},
};
-static struct mfd_cell rsmu_sl_devs[] = {
+static const struct mfd_cell rsmu_sl_devs[] = {
[RSMU_PHC] = {
.name = "8v19n85x-phc",
},
@@ -51,7 +51,7 @@ static struct mfd_cell rsmu_sl_devs[] = {
int rsmu_core_init(struct rsmu_ddata *rsmu)
{
- struct mfd_cell *cells;
+ const struct mfd_cell *cells;
int ret;
switch (rsmu->type) {
diff --git a/drivers/mfd/stmfx.c b/drivers/mfd/stmfx.c
index f683fdb6ece6..b0db33c0a7f2 100644
--- a/drivers/mfd/stmfx.c
+++ b/drivers/mfd/stmfx.c
@@ -73,7 +73,7 @@ static const struct resource stmfx_ts_resources[] = {
DEFINE_RES_IRQ(STMFX_REG_IRQ_SRC_EN_TS_OVF),
};
-static struct mfd_cell stmfx_cells[] = {
+static const struct mfd_cell stmfx_cells[] = {
{
.of_compatible = "st,stmfx-0300-pinctrl",
.name = "stmfx-pinctrl",
diff --git a/drivers/mfd/vexpress-sysreg.c b/drivers/mfd/vexpress-sysreg.c
index f49cee91f71c..c5f375cd22ae 100644
--- a/drivers/mfd/vexpress-sysreg.c
+++ b/drivers/mfd/vexpress-sysreg.c
@@ -69,7 +69,7 @@ static const struct software_node vexpress_sysreg_sys_flash_swnode = {
.properties = vexpress_sysreg_sys_flash_props,
};
-static struct mfd_cell vexpress_sysreg_cells[] = {
+static const struct mfd_cell vexpress_sysreg_cells[] = {
{
.name = "basic-mmio-gpio",
.of_compatible = "arm,vexpress-sysreg,sys_led",
diff --git a/drivers/mfd/wm97xx-core.c b/drivers/mfd/wm97xx-core.c
index 1566a9b04b6a..c0ddcd5219b5 100644
--- a/drivers/mfd/wm97xx-core.c
+++ b/drivers/mfd/wm97xx-core.c
@@ -104,7 +104,7 @@ static const struct regmap_config wm9705_regmap_config = {
.writeable_reg = wm97xx_writeable_reg,
};
-static struct mfd_cell wm9705_cells[] = {
+static const struct mfd_cell wm9705_cells[] = {
{ .name = "wm9705-codec", },
{ .name = "wm97xx-ts", },
};
--
2.53.0
^ permalink raw reply [flat|nested] 10+ messages in thread* [PATCH 2/2] mfd: cgbc: Allow compile testing
2026-10-30 7:11 [PATCH 1/2] mfd: Constify mfd_cell arrays Krzysztof Kozlowski
@ 2026-10-30 7:11 ` Krzysztof Kozlowski
2026-10-30 9:49 ` Andy Shevchenko
2026-10-30 10:00 ` Thomas Richard (congatec GmbH)
2026-10-30 8:24 ` [PATCH 1/2] mfd: Constify mfd_cell arrays Matti Vaittinen
` (4 subsequent siblings)
5 siblings, 2 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2026-10-30 7:11 UTC (permalink / raw)
To: Lee Jones, Chen-Yu Tsai, Thomas Richard, Andy Shevchenko,
Chanwoo Choi, Krzysztof Kozlowski, Andreas Werner, Frank Li,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
Matti Vaittinen, Maxime Coquelin, Alexandre Torgue, Liviu Dudau,
Sudeep Holla, Lorenzo Pieralisi, mfd, linux-kernel, imx,
linux-arm-kernel, linux-stm32, patches
Cc: Krzysztof Kozlowski
cgbc-core.c driver does not use any X86-specific headers, so looks like
it can be build tested everywhere for increased build coverage.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
---
drivers/mfd/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index 87ed55c155f0..de957f574056 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -255,7 +255,7 @@ config MFD_AXP20X_RSB
config MFD_CGBC
tristate "Congatec Board Controller"
select MFD_CORE
- depends on X86
+ depends on X86 || COMPILE_TEST
help
This is the core driver of the Board Controller found on some Congatec
SMARC modules. The Board Controller provides functions like watchdog,
--
2.53.0
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [PATCH 2/2] mfd: cgbc: Allow compile testing
2026-10-30 7:11 ` [PATCH 2/2] mfd: cgbc: Allow compile testing Krzysztof Kozlowski
@ 2026-10-30 9:49 ` Andy Shevchenko
2026-10-30 10:00 ` Thomas Richard (congatec GmbH)
1 sibling, 0 replies; 10+ messages in thread
From: Andy Shevchenko @ 2026-10-30 9:49 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Lee Jones, Chen-Yu Tsai, Thomas Richard, Andy Shevchenko,
Chanwoo Choi, Krzysztof Kozlowski, Andreas Werner, Frank Li,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
Matti Vaittinen, Maxime Coquelin, Alexandre Torgue, Liviu Dudau,
Sudeep Holla, Lorenzo Pieralisi, mfd, linux-kernel, imx,
linux-arm-kernel, linux-stm32, patches
On Fri, Oct 30, 2026 at 08:11:39AM +0100, Krzysztof Kozlowski wrote:
> cgbc-core.c driver does not use any X86-specific headers, so looks like
> it can be build tested everywhere for increased build coverage.
Yep, good one.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] mfd: cgbc: Allow compile testing
2026-10-30 7:11 ` [PATCH 2/2] mfd: cgbc: Allow compile testing Krzysztof Kozlowski
2026-10-30 9:49 ` Andy Shevchenko
@ 2026-10-30 10:00 ` Thomas Richard (congatec GmbH)
1 sibling, 0 replies; 10+ messages in thread
From: Thomas Richard (congatec GmbH) @ 2026-10-30 10:00 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Lee Jones, Chen-Yu Tsai, Thomas Richard, Andy Shevchenko,
Chanwoo Choi, Krzysztof Kozlowski, Andreas Werner, Frank Li,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
Matti Vaittinen, Maxime Coquelin, Alexandre Torgue, Liviu Dudau,
Sudeep Holla, Lorenzo Pieralisi, mfd, linux-kernel, imx,
linux-arm-kernel, linux-stm32, patches
> cgbc-core.c driver does not use any X86-specific headers, so looks like
> it can be build tested everywhere for increased build coverage.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
>
> diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
> index 87ed55c155f0..de957f574056 100644
> --- a/drivers/mfd/Kconfig
> +++ b/drivers/mfd/Kconfig
> @@ -255,7 +255,7 @@ config MFD_AXP20X_RSB
> config MFD_CGBC
> tristate "Congatec Board Controller"
> select MFD_CORE
> - depends on X86
> + depends on X86 || COMPILE_TEST
> help
> This is the core driver of the Board Controller found on some Congatec
> SMARC modules. The Board Controller provides functions like watchdog,
Reviewed-by: Thomas Richard (congatec GmbH) <thomas.richard@bootlin.com>
--
Best Regards,
Thomas Richard
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] mfd: Constify mfd_cell arrays
2026-10-30 7:11 [PATCH 1/2] mfd: Constify mfd_cell arrays Krzysztof Kozlowski
2026-10-30 7:11 ` [PATCH 2/2] mfd: cgbc: Allow compile testing Krzysztof Kozlowski
@ 2026-10-30 8:24 ` Matti Vaittinen
2026-10-30 8:34 ` Chen-Yu Tsai
` (3 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: Matti Vaittinen @ 2026-10-30 8:24 UTC (permalink / raw)
To: Krzysztof Kozlowski, Lee Jones, Chen-Yu Tsai, Thomas Richard,
Andy Shevchenko, Chanwoo Choi, Krzysztof Kozlowski,
Andreas Werner, Frank Li, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, Maxime Coquelin, Alexandre Torgue, Liviu Dudau,
Sudeep Holla, Lorenzo Pieralisi, mfd, linux-kernel, imx,
linux-arm-kernel, linux-stm32, patches
On 30/10/2026 09:11, Krzysztof Kozlowski wrote:
> mfd_add_devices() takes pointer to const, so 'struct mfd_cell' arrays
> can be constified whenever driver does not modify it in the probe.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
> ---
> drivers/mfd/ac100.c | 2 +-
> drivers/mfd/axp20x.c | 4 ++--
> drivers/mfd/cgbc-core.c | 2 +-
> drivers/mfd/cs5535-mfd.c | 2 +-
> drivers/mfd/intel_soc_pmic_bxtwc.c | 2 +-
> drivers/mfd/intel_soc_pmic_chtdc_ti.c | 2 +-
> drivers/mfd/intel_soc_pmic_chtwc.c | 2 +-
> drivers/mfd/intel_soc_pmic_crc.c | 6 +++---
> drivers/mfd/max77705.c | 2 +-
> drivers/mfd/menf21bmc.c | 2 +-
> drivers/mfd/mxs-lradc.c | 6 +++---
> drivers/mfd/rohm-bd718x7.c | 6 +++---
Thanks Krzysztof!
Took a look at the ROHM stuff. Looks great to me.
-- Matti
--
Matti Vaittinen
Linux kernel developer at ROHM Semiconductors
Oulu Finland
~~ When things go utterly wrong vim users can always type :help! ~~
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [PATCH 1/2] mfd: Constify mfd_cell arrays
2026-10-30 7:11 [PATCH 1/2] mfd: Constify mfd_cell arrays Krzysztof Kozlowski
2026-10-30 7:11 ` [PATCH 2/2] mfd: cgbc: Allow compile testing Krzysztof Kozlowski
2026-10-30 8:24 ` [PATCH 1/2] mfd: Constify mfd_cell arrays Matti Vaittinen
@ 2026-10-30 8:34 ` Chen-Yu Tsai
2026-10-30 8:47 ` Thomas Weißschuh
` (2 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: Chen-Yu Tsai @ 2026-10-30 8:34 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Lee Jones, Thomas Richard, Andy Shevchenko, Chanwoo Choi,
Krzysztof Kozlowski, Andreas Werner, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, Matti Vaittinen,
Maxime Coquelin, Alexandre Torgue, Liviu Dudau, Sudeep Holla,
Lorenzo Pieralisi, mfd, linux-kernel, imx, linux-arm-kernel,
linux-stm32, patches
On Fri, Oct 30, 2026 at 3:12 PM Krzysztof Kozlowski
<krzysztof.kozlowski@oss.qualcomm.com> wrote:
>
> mfd_add_devices() takes pointer to const, so 'struct mfd_cell' arrays
> can be constified whenever driver does not modify it in the probe.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
> ---
> drivers/mfd/ac100.c | 2 +-
> drivers/mfd/axp20x.c | 4 ++--
Acked-by: Chen-Yu Tsai <wens@kernel.org> # ac100 & axp20x
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [PATCH 1/2] mfd: Constify mfd_cell arrays
2026-10-30 7:11 [PATCH 1/2] mfd: Constify mfd_cell arrays Krzysztof Kozlowski
` (2 preceding siblings ...)
2026-10-30 8:34 ` Chen-Yu Tsai
@ 2026-10-30 8:47 ` Thomas Weißschuh
2026-10-30 14:02 ` Krzysztof Kozlowski
2026-10-30 9:23 ` Charles Keepax
2026-10-30 10:26 ` Thomas Richard (congatec GmbH)
5 siblings, 1 reply; 10+ messages in thread
From: Thomas Weißschuh @ 2026-10-30 8:47 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Lee Jones, Chen-Yu Tsai, Thomas Richard, Andy Shevchenko,
Chanwoo Choi, Krzysztof Kozlowski, Andreas Werner, Frank Li,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
Matti Vaittinen, Maxime Coquelin, Alexandre Torgue, Liviu Dudau,
Sudeep Holla, Lorenzo Pieralisi, mfd, linux-kernel, imx,
linux-arm-kernel, linux-stm32, patches
On Fri, Oct 30, 2026 at 08:11:38AM +0100, Krzysztof Kozlowski wrote:
> mfd_add_devices() takes pointer to const, so 'struct mfd_cell' arrays
> can be constified whenever driver does not modify it in the probe.
Looks like a candidate for scripts/const_structs.checkpatch.
(...)
Thomas
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [PATCH 1/2] mfd: Constify mfd_cell arrays
2026-10-30 8:47 ` Thomas Weißschuh
@ 2026-10-30 14:02 ` Krzysztof Kozlowski
0 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2026-10-30 14:02 UTC (permalink / raw)
To: Thomas Weißschuh
Cc: Lee Jones, Chen-Yu Tsai, Thomas Richard, Andy Shevchenko,
Chanwoo Choi, Krzysztof Kozlowski, Andreas Werner, Frank Li,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
Matti Vaittinen, Maxime Coquelin, Alexandre Torgue, Liviu Dudau,
Sudeep Holla, Lorenzo Pieralisi, mfd, linux-kernel, imx,
linux-arm-kernel, linux-stm32, patches
On 30/10/2026 09:47, Thomas Weißschuh wrote:
> On Fri, Oct 30, 2026 at 08:11:38AM +0100, Krzysztof Kozlowski wrote:
>> mfd_add_devices() takes pointer to const, so 'struct mfd_cell' arrays
>> can be constified whenever driver does not modify it in the probe.
>
> Looks like a candidate for scripts/const_structs.checkpatch.
I think no, too many false positives. 1/3 of drivers modify the mfd_cell.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] mfd: Constify mfd_cell arrays
2026-10-30 7:11 [PATCH 1/2] mfd: Constify mfd_cell arrays Krzysztof Kozlowski
` (3 preceding siblings ...)
2026-10-30 8:47 ` Thomas Weißschuh
@ 2026-10-30 9:23 ` Charles Keepax
2026-10-30 10:26 ` Thomas Richard (congatec GmbH)
5 siblings, 0 replies; 10+ messages in thread
From: Charles Keepax @ 2026-10-30 9:23 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Lee Jones, Chen-Yu Tsai, Thomas Richard, Andy Shevchenko,
Chanwoo Choi, Krzysztof Kozlowski, Andreas Werner, Frank Li,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
Matti Vaittinen, Maxime Coquelin, Alexandre Torgue, Liviu Dudau,
Sudeep Holla, Lorenzo Pieralisi, mfd, linux-kernel, imx,
linux-arm-kernel, linux-stm32, patches
On Fri, Oct 30, 2026 at 08:11:38AM +0100, Krzysztof Kozlowski wrote:
> mfd_add_devices() takes pointer to const, so 'struct mfd_cell' arrays
> can be constified whenever driver does not modify it in the probe.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
> ---
> drivers/mfd/wm97xx-core.c | 2 +-
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Thanks,
Charles
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [PATCH 1/2] mfd: Constify mfd_cell arrays
2026-10-30 7:11 [PATCH 1/2] mfd: Constify mfd_cell arrays Krzysztof Kozlowski
` (4 preceding siblings ...)
2026-10-30 9:23 ` Charles Keepax
@ 2026-10-30 10:26 ` Thomas Richard (congatec GmbH)
5 siblings, 0 replies; 10+ messages in thread
From: Thomas Richard (congatec GmbH) @ 2026-10-30 10:26 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Lee Jones, Chen-Yu Tsai, Thomas Richard, Andy Shevchenko,
Chanwoo Choi, Krzysztof Kozlowski, Andreas Werner, Frank Li,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
Matti Vaittinen, Maxime Coquelin, Alexandre Torgue, Liviu Dudau,
Sudeep Holla, Lorenzo Pieralisi, mfd, linux-kernel, imx,
linux-arm-kernel, linux-stm32, patches
> mfd_add_devices() takes pointer to const, so 'struct mfd_cell' arrays
> can be constified whenever driver does not modify it in the probe.
Acked-by: Thomas Richard (congatec GmbH) <thomas.richard@bootlin.com> # cgbc-core
--
Best Regards,
Thomas Richard
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2026-10-30 14:02 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-30 7:11 [PATCH 1/2] mfd: Constify mfd_cell arrays Krzysztof Kozlowski
2026-10-30 7:11 ` [PATCH 2/2] mfd: cgbc: Allow compile testing Krzysztof Kozlowski
2026-10-30 9:49 ` Andy Shevchenko
2026-10-30 10:00 ` Thomas Richard (congatec GmbH)
2026-10-30 8:24 ` [PATCH 1/2] mfd: Constify mfd_cell arrays Matti Vaittinen
2026-10-30 8:34 ` Chen-Yu Tsai
2026-10-30 8:47 ` Thomas Weißschuh
2026-10-30 14:02 ` Krzysztof Kozlowski
2026-10-30 9:23 ` Charles Keepax
2026-10-30 10:26 ` Thomas Richard (congatec GmbH)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®