* [PATCH v2] mfd: stmpe: Revert "Constify static struct resource"
@ 2021-03-04 23:07 ` Rikard Falkeborn
0 siblings, 0 replies; 6+ messages in thread
From: Rikard Falkeborn @ 2021-03-04 23:07 UTC (permalink / raw)
To: Lee Jones
Cc: Maxime Coquelin, Alexandre Torgue, linux-stm32, linux-arm-kernel,
linux-kernel, Rikard Falkeborn, Andy Shevchenko
In stmpe_devices_init(), the start and end field of these structs are
modified, so they can not be const. Add a comment to those structs that
lacked it to reduce the risk that this happens again.
This reverts commit 8d7b3a6dac4eae22c58b0853696cbd256966741b.
Fixes: 8d7b3a6dac4e ("mfd: stmpe: Constify static struct resource")
Reported-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
---
Changes
V1-V2: Add comments to the structs that they are dynamically modified
Rewrite commit message.
V1: https://lore.kernel.org/lkml/20210302234710.74455-1-rikard.falkeborn@gmail.com/
drivers/mfd/stmpe.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c
index 90f3292230c9..1dd39483e7c1 100644
--- a/drivers/mfd/stmpe.c
+++ b/drivers/mfd/stmpe.c
@@ -312,7 +312,7 @@ EXPORT_SYMBOL_GPL(stmpe_set_altfunc);
* GPIO (all variants)
*/
-static const struct resource stmpe_gpio_resources[] = {
+static struct resource stmpe_gpio_resources[] = {
/* Start and end filled dynamically */
{
.flags = IORESOURCE_IRQ,
@@ -336,7 +336,8 @@ static const struct mfd_cell stmpe_gpio_cell_noirq = {
* Keypad (1601, 2401, 2403)
*/
-static const struct resource stmpe_keypad_resources[] = {
+static struct resource stmpe_keypad_resources[] = {
+ /* Start and end filled dynamically */
{
.name = "KEYPAD",
.flags = IORESOURCE_IRQ,
@@ -357,7 +358,8 @@ static const struct mfd_cell stmpe_keypad_cell = {
/*
* PWM (1601, 2401, 2403)
*/
-static const struct resource stmpe_pwm_resources[] = {
+static struct resource stmpe_pwm_resources[] = {
+ /* Start and end filled dynamically */
{
.name = "PWM0",
.flags = IORESOURCE_IRQ,
@@ -445,7 +447,8 @@ static struct stmpe_variant_info stmpe801_noirq = {
* Touchscreen (STMPE811 or STMPE610)
*/
-static const struct resource stmpe_ts_resources[] = {
+static struct resource stmpe_ts_resources[] = {
+ /* Start and end filled dynamically */
{
.name = "TOUCH_DET",
.flags = IORESOURCE_IRQ,
@@ -467,7 +470,8 @@ static const struct mfd_cell stmpe_ts_cell = {
* ADC (STMPE811)
*/
-static const struct resource stmpe_adc_resources[] = {
+static struct resource stmpe_adc_resources[] = {
+ /* Start and end filled dynamically */
{
.name = "STMPE_TEMP_SENS",
.flags = IORESOURCE_IRQ,
--
2.30.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2] mfd: stmpe: Revert "Constify static struct resource"
@ 2021-03-04 23:07 ` Rikard Falkeborn
0 siblings, 0 replies; 6+ messages in thread
From: Rikard Falkeborn @ 2021-03-04 23:07 UTC (permalink / raw)
To: Lee Jones
Cc: Maxime Coquelin, Alexandre Torgue, linux-stm32, linux-arm-kernel,
linux-kernel, Rikard Falkeborn, Andy Shevchenko
In stmpe_devices_init(), the start and end field of these structs are
modified, so they can not be const. Add a comment to those structs that
lacked it to reduce the risk that this happens again.
This reverts commit 8d7b3a6dac4eae22c58b0853696cbd256966741b.
Fixes: 8d7b3a6dac4e ("mfd: stmpe: Constify static struct resource")
Reported-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
---
Changes
V1-V2: Add comments to the structs that they are dynamically modified
Rewrite commit message.
V1: https://lore.kernel.org/lkml/20210302234710.74455-1-rikard.falkeborn@gmail.com/
drivers/mfd/stmpe.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c
index 90f3292230c9..1dd39483e7c1 100644
--- a/drivers/mfd/stmpe.c
+++ b/drivers/mfd/stmpe.c
@@ -312,7 +312,7 @@ EXPORT_SYMBOL_GPL(stmpe_set_altfunc);
* GPIO (all variants)
*/
-static const struct resource stmpe_gpio_resources[] = {
+static struct resource stmpe_gpio_resources[] = {
/* Start and end filled dynamically */
{
.flags = IORESOURCE_IRQ,
@@ -336,7 +336,8 @@ static const struct mfd_cell stmpe_gpio_cell_noirq = {
* Keypad (1601, 2401, 2403)
*/
-static const struct resource stmpe_keypad_resources[] = {
+static struct resource stmpe_keypad_resources[] = {
+ /* Start and end filled dynamically */
{
.name = "KEYPAD",
.flags = IORESOURCE_IRQ,
@@ -357,7 +358,8 @@ static const struct mfd_cell stmpe_keypad_cell = {
/*
* PWM (1601, 2401, 2403)
*/
-static const struct resource stmpe_pwm_resources[] = {
+static struct resource stmpe_pwm_resources[] = {
+ /* Start and end filled dynamically */
{
.name = "PWM0",
.flags = IORESOURCE_IRQ,
@@ -445,7 +447,8 @@ static struct stmpe_variant_info stmpe801_noirq = {
* Touchscreen (STMPE811 or STMPE610)
*/
-static const struct resource stmpe_ts_resources[] = {
+static struct resource stmpe_ts_resources[] = {
+ /* Start and end filled dynamically */
{
.name = "TOUCH_DET",
.flags = IORESOURCE_IRQ,
@@ -467,7 +470,8 @@ static const struct mfd_cell stmpe_ts_cell = {
* ADC (STMPE811)
*/
-static const struct resource stmpe_adc_resources[] = {
+static struct resource stmpe_adc_resources[] = {
+ /* Start and end filled dynamically */
{
.name = "STMPE_TEMP_SENS",
.flags = IORESOURCE_IRQ,
--
2.30.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2] mfd: stmpe: Revert "Constify static struct resource"
2021-03-04 23:07 ` Rikard Falkeborn
@ 2021-03-05 10:18 ` Andy Shevchenko
-1 siblings, 0 replies; 6+ messages in thread
From: Andy Shevchenko @ 2021-03-05 10:18 UTC (permalink / raw)
To: Rikard Falkeborn
Cc: Lee Jones, Maxime Coquelin, Alexandre Torgue, linux-stm32,
linux-arm-kernel, linux-kernel
On Fri, Mar 05, 2021 at 12:07:09AM +0100, Rikard Falkeborn wrote:
> In stmpe_devices_init(), the start and end field of these structs are
> modified, so they can not be const. Add a comment to those structs that
> lacked it to reduce the risk that this happens again.
>
> This reverts commit 8d7b3a6dac4eae22c58b0853696cbd256966741b.
FWIW,
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Fixes: 8d7b3a6dac4e ("mfd: stmpe: Constify static struct resource")
> Reported-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
> ---
> Changes
> V1-V2: Add comments to the structs that they are dynamically modified
> Rewrite commit message.
>
> V1: https://lore.kernel.org/lkml/20210302234710.74455-1-rikard.falkeborn@gmail.com/
>
> drivers/mfd/stmpe.c | 14 +++++++++-----
> 1 file changed, 9 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c
> index 90f3292230c9..1dd39483e7c1 100644
> --- a/drivers/mfd/stmpe.c
> +++ b/drivers/mfd/stmpe.c
> @@ -312,7 +312,7 @@ EXPORT_SYMBOL_GPL(stmpe_set_altfunc);
> * GPIO (all variants)
> */
>
> -static const struct resource stmpe_gpio_resources[] = {
> +static struct resource stmpe_gpio_resources[] = {
> /* Start and end filled dynamically */
> {
> .flags = IORESOURCE_IRQ,
> @@ -336,7 +336,8 @@ static const struct mfd_cell stmpe_gpio_cell_noirq = {
> * Keypad (1601, 2401, 2403)
> */
>
> -static const struct resource stmpe_keypad_resources[] = {
> +static struct resource stmpe_keypad_resources[] = {
> + /* Start and end filled dynamically */
> {
> .name = "KEYPAD",
> .flags = IORESOURCE_IRQ,
> @@ -357,7 +358,8 @@ static const struct mfd_cell stmpe_keypad_cell = {
> /*
> * PWM (1601, 2401, 2403)
> */
> -static const struct resource stmpe_pwm_resources[] = {
> +static struct resource stmpe_pwm_resources[] = {
> + /* Start and end filled dynamically */
> {
> .name = "PWM0",
> .flags = IORESOURCE_IRQ,
> @@ -445,7 +447,8 @@ static struct stmpe_variant_info stmpe801_noirq = {
> * Touchscreen (STMPE811 or STMPE610)
> */
>
> -static const struct resource stmpe_ts_resources[] = {
> +static struct resource stmpe_ts_resources[] = {
> + /* Start and end filled dynamically */
> {
> .name = "TOUCH_DET",
> .flags = IORESOURCE_IRQ,
> @@ -467,7 +470,8 @@ static const struct mfd_cell stmpe_ts_cell = {
> * ADC (STMPE811)
> */
>
> -static const struct resource stmpe_adc_resources[] = {
> +static struct resource stmpe_adc_resources[] = {
> + /* Start and end filled dynamically */
> {
> .name = "STMPE_TEMP_SENS",
> .flags = IORESOURCE_IRQ,
> --
> 2.30.1
>
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] mfd: stmpe: Revert "Constify static struct resource"
@ 2021-03-05 10:18 ` Andy Shevchenko
0 siblings, 0 replies; 6+ messages in thread
From: Andy Shevchenko @ 2021-03-05 10:18 UTC (permalink / raw)
To: Rikard Falkeborn
Cc: Lee Jones, Maxime Coquelin, Alexandre Torgue, linux-stm32,
linux-arm-kernel, linux-kernel
On Fri, Mar 05, 2021 at 12:07:09AM +0100, Rikard Falkeborn wrote:
> In stmpe_devices_init(), the start and end field of these structs are
> modified, so they can not be const. Add a comment to those structs that
> lacked it to reduce the risk that this happens again.
>
> This reverts commit 8d7b3a6dac4eae22c58b0853696cbd256966741b.
FWIW,
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Fixes: 8d7b3a6dac4e ("mfd: stmpe: Constify static struct resource")
> Reported-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
> ---
> Changes
> V1-V2: Add comments to the structs that they are dynamically modified
> Rewrite commit message.
>
> V1: https://lore.kernel.org/lkml/20210302234710.74455-1-rikard.falkeborn@gmail.com/
>
> drivers/mfd/stmpe.c | 14 +++++++++-----
> 1 file changed, 9 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c
> index 90f3292230c9..1dd39483e7c1 100644
> --- a/drivers/mfd/stmpe.c
> +++ b/drivers/mfd/stmpe.c
> @@ -312,7 +312,7 @@ EXPORT_SYMBOL_GPL(stmpe_set_altfunc);
> * GPIO (all variants)
> */
>
> -static const struct resource stmpe_gpio_resources[] = {
> +static struct resource stmpe_gpio_resources[] = {
> /* Start and end filled dynamically */
> {
> .flags = IORESOURCE_IRQ,
> @@ -336,7 +336,8 @@ static const struct mfd_cell stmpe_gpio_cell_noirq = {
> * Keypad (1601, 2401, 2403)
> */
>
> -static const struct resource stmpe_keypad_resources[] = {
> +static struct resource stmpe_keypad_resources[] = {
> + /* Start and end filled dynamically */
> {
> .name = "KEYPAD",
> .flags = IORESOURCE_IRQ,
> @@ -357,7 +358,8 @@ static const struct mfd_cell stmpe_keypad_cell = {
> /*
> * PWM (1601, 2401, 2403)
> */
> -static const struct resource stmpe_pwm_resources[] = {
> +static struct resource stmpe_pwm_resources[] = {
> + /* Start and end filled dynamically */
> {
> .name = "PWM0",
> .flags = IORESOURCE_IRQ,
> @@ -445,7 +447,8 @@ static struct stmpe_variant_info stmpe801_noirq = {
> * Touchscreen (STMPE811 or STMPE610)
> */
>
> -static const struct resource stmpe_ts_resources[] = {
> +static struct resource stmpe_ts_resources[] = {
> + /* Start and end filled dynamically */
> {
> .name = "TOUCH_DET",
> .flags = IORESOURCE_IRQ,
> @@ -467,7 +470,8 @@ static const struct mfd_cell stmpe_ts_cell = {
> * ADC (STMPE811)
> */
>
> -static const struct resource stmpe_adc_resources[] = {
> +static struct resource stmpe_adc_resources[] = {
> + /* Start and end filled dynamically */
> {
> .name = "STMPE_TEMP_SENS",
> .flags = IORESOURCE_IRQ,
> --
> 2.30.1
>
--
With Best Regards,
Andy Shevchenko
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] mfd: stmpe: Revert "Constify static struct resource"
2021-03-04 23:07 ` Rikard Falkeborn
@ 2021-03-09 18:17 ` Lee Jones
-1 siblings, 0 replies; 6+ messages in thread
From: Lee Jones @ 2021-03-09 18:17 UTC (permalink / raw)
To: Rikard Falkeborn
Cc: Maxime Coquelin, Alexandre Torgue, linux-stm32, linux-arm-kernel,
linux-kernel, Andy Shevchenko
On Fri, 05 Mar 2021, Rikard Falkeborn wrote:
> In stmpe_devices_init(), the start and end field of these structs are
> modified, so they can not be const. Add a comment to those structs that
> lacked it to reduce the risk that this happens again.
>
> This reverts commit 8d7b3a6dac4eae22c58b0853696cbd256966741b.
>
> Fixes: 8d7b3a6dac4e ("mfd: stmpe: Constify static struct resource")
> Reported-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
> ---
> Changes
> V1-V2: Add comments to the structs that they are dynamically modified
> Rewrite commit message.
>
> V1: https://lore.kernel.org/lkml/20210302234710.74455-1-rikard.falkeborn@gmail.com/
>
> drivers/mfd/stmpe.c | 14 +++++++++-----
> 1 file changed, 9 insertions(+), 5 deletions(-)
Applied, thanks.
--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] mfd: stmpe: Revert "Constify static struct resource"
@ 2021-03-09 18:17 ` Lee Jones
0 siblings, 0 replies; 6+ messages in thread
From: Lee Jones @ 2021-03-09 18:17 UTC (permalink / raw)
To: Rikard Falkeborn
Cc: Maxime Coquelin, Alexandre Torgue, linux-stm32, linux-arm-kernel,
linux-kernel, Andy Shevchenko
On Fri, 05 Mar 2021, Rikard Falkeborn wrote:
> In stmpe_devices_init(), the start and end field of these structs are
> modified, so they can not be const. Add a comment to those structs that
> lacked it to reduce the risk that this happens again.
>
> This reverts commit 8d7b3a6dac4eae22c58b0853696cbd256966741b.
>
> Fixes: 8d7b3a6dac4e ("mfd: stmpe: Constify static struct resource")
> Reported-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
> ---
> Changes
> V1-V2: Add comments to the structs that they are dynamically modified
> Rewrite commit message.
>
> V1: https://lore.kernel.org/lkml/20210302234710.74455-1-rikard.falkeborn@gmail.com/
>
> drivers/mfd/stmpe.c | 14 +++++++++-----
> 1 file changed, 9 insertions(+), 5 deletions(-)
Applied, thanks.
--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-03-09 18:19 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-04 23:07 [PATCH v2] mfd: stmpe: Revert "Constify static struct resource" Rikard Falkeborn
2021-03-04 23:07 ` Rikard Falkeborn
2021-03-05 10:18 ` Andy Shevchenko
2021-03-05 10:18 ` Andy Shevchenko
2021-03-09 18:17 ` Lee Jones
2021-03-09 18:17 ` Lee Jones
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.