* [PATCH 01/10] mfd: twl4030-irq: Fix incorrect type in assignment warning
2020-06-24 15:06 [PATCH 00/10] Fix a bunch of W=1 warnings in MFD Lee Jones
@ 2020-06-24 15:06 ` Lee Jones
2020-06-24 15:06 ` [PATCH 02/10] mfd: twl4030-irq: Fix cast to restricted __le32 warning Lee Jones
` (8 subsequent siblings)
9 siblings, 0 replies; 19+ messages in thread
From: Lee Jones @ 2020-06-24 15:06 UTC (permalink / raw)
To: lee.jones
Cc: Kai Svahn, Tony Lindgren, linux-kernel, stable, Syed Khasim,
linux-omap, linux-arm-kernel
Silences Sparse warning:
drivers/mfd/twl4030-irq.c:485:26: warning: incorrect type in assignment (different base types)
drivers/mfd/twl4030-irq.c:485:26: expected unsigned int [usertype] word
drivers/mfd/twl4030-irq.c:485:26: got restricted __le32 [usertype]
Cc: <stable@vger.kernel.org>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Kai Svahn <kai.svahn@nokia.com>
Cc: Syed Khasim <x0khasim@ti.com>
Cc: linux-omap@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/mfd/twl4030-irq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mfd/twl4030-irq.c b/drivers/mfd/twl4030-irq.c
index 910a304b397ce..d05bc74daba32 100644
--- a/drivers/mfd/twl4030-irq.c
+++ b/drivers/mfd/twl4030-irq.c
@@ -477,7 +477,7 @@ static void twl4030_sih_bus_sync_unlock(struct irq_data *data)
if (agent->imr_change_pending) {
union {
- u32 word;
+ __le32 word;
u8 bytes[4];
} imr;
--
2.25.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] 19+ messages in thread
* [PATCH 02/10] mfd: twl4030-irq: Fix cast to restricted __le32 warning
2020-06-24 15:06 [PATCH 00/10] Fix a bunch of W=1 warnings in MFD Lee Jones
2020-06-24 15:06 ` [PATCH 01/10] mfd: twl4030-irq: Fix incorrect type in assignment warning Lee Jones
@ 2020-06-24 15:06 ` Lee Jones
2020-06-24 15:06 ` [PATCH 03/10] mfd: tps6586x: " Lee Jones
` (7 subsequent siblings)
9 siblings, 0 replies; 19+ messages in thread
From: Lee Jones @ 2020-06-24 15:06 UTC (permalink / raw)
To: lee.jones
Cc: Kai Svahn, Tony Lindgren, linux-kernel, stable, Syed Khasim,
linux-omap, linux-arm-kernel
Silences Sparse warning(s):
drivers/mfd/twl4030-irq.c:573:40: warning: cast to restricted __le32
drivers/mfd/twl4030-irq.c:573:40: warning: cast to restricted __le32
drivers/mfd/twl4030-irq.c:573:40: warning: cast to restricted __le32
drivers/mfd/twl4030-irq.c:573:40: warning: cast to restricted __le32
drivers/mfd/twl4030-irq.c:573:40: warning: cast to restricted __le32
drivers/mfd/twl4030-irq.c:573:40: warning: cast to restricted __le32
Cc: <stable@vger.kernel.org>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Kai Svahn <kai.svahn@nokia.com>
Cc: Syed Khasim <x0khasim@ti.com>
Cc: linux-omap@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/mfd/twl4030-irq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mfd/twl4030-irq.c b/drivers/mfd/twl4030-irq.c
index d05bc74daba32..ab417438d1faa 100644
--- a/drivers/mfd/twl4030-irq.c
+++ b/drivers/mfd/twl4030-irq.c
@@ -561,7 +561,7 @@ static inline int sih_read_isr(const struct sih *sih)
int status;
union {
u8 bytes[4];
- u32 word;
+ __le32 word;
} isr;
/* FIXME need retry-on-error ... */
--
2.25.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] 19+ messages in thread
* [PATCH 03/10] mfd: tps6586x: Fix cast to restricted __le32 warning
2020-06-24 15:06 [PATCH 00/10] Fix a bunch of W=1 warnings in MFD Lee Jones
2020-06-24 15:06 ` [PATCH 01/10] mfd: twl4030-irq: Fix incorrect type in assignment warning Lee Jones
2020-06-24 15:06 ` [PATCH 02/10] mfd: twl4030-irq: Fix cast to restricted __le32 warning Lee Jones
@ 2020-06-24 15:06 ` Lee Jones
2020-06-24 15:06 ` [PATCH 04/10] mfd: altera-sysmgr: Fix physical address storing hacks Lee Jones
` (6 subsequent siblings)
9 siblings, 0 replies; 19+ messages in thread
From: Lee Jones @ 2020-06-24 15:06 UTC (permalink / raw)
To: lee.jones
Cc: stable, Eric Miao, linux-kernel, linux-arm-kernel, Mike Rapoport
Silences Sparse warning(s):
drivers/mfd/tps6586x.c:323:16: warning: cast to restricted __le32
drivers/mfd/tps6586x.c:323:16: warning: cast to restricted __le32
drivers/mfd/tps6586x.c:323:16: warning: cast to restricted __le32
drivers/mfd/tps6586x.c:323:16: warning: cast to restricted __le32
drivers/mfd/tps6586x.c:323:16: warning: cast to restricted __le32
drivers/mfd/tps6586x.c:323:16: warning: cast to restricted __le32
Cc: <stable@vger.kernel.org>
Cc: Mike Rapoport <mike@compulab.co.il>
Cc: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/mfd/tps6586x.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/mfd/tps6586x.c b/drivers/mfd/tps6586x.c
index c8aadd39324e3..c36597797ddd8 100644
--- a/drivers/mfd/tps6586x.c
+++ b/drivers/mfd/tps6586x.c
@@ -309,18 +309,19 @@ static const struct irq_domain_ops tps6586x_domain_ops = {
static irqreturn_t tps6586x_irq(int irq, void *data)
{
struct tps6586x *tps6586x = data;
- u32 acks;
+ uint32_t acks;
+ __le32 val;
int ret = 0;
ret = tps6586x_reads(tps6586x->dev, TPS6586X_INT_ACK1,
- sizeof(acks), (uint8_t *)&acks);
+ sizeof(acks), (uint8_t *)&val);
if (ret < 0) {
dev_err(tps6586x->dev, "failed to read interrupt status\n");
return IRQ_NONE;
}
- acks = le32_to_cpu(acks);
+ acks = le32_to_cpu(val);
while (acks) {
int i = __ffs(acks);
--
2.25.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] 19+ messages in thread
* [PATCH 04/10] mfd: altera-sysmgr: Fix physical address storing hacks
2020-06-24 15:06 [PATCH 00/10] Fix a bunch of W=1 warnings in MFD Lee Jones
` (2 preceding siblings ...)
2020-06-24 15:06 ` [PATCH 03/10] mfd: tps6586x: " Lee Jones
@ 2020-06-24 15:06 ` Lee Jones
2020-07-01 19:33 ` Sasha Levin
2020-07-10 14:03 ` Sasha Levin
2020-06-24 15:06 ` [PATCH 05/10] mfd: sprd-sc27xx-spi: Fix symbol 'sprd_pmic_detect_charger_type' was not declared warning Lee Jones
` (5 subsequent siblings)
9 siblings, 2 replies; 19+ messages in thread
From: Lee Jones @ 2020-06-24 15:06 UTC (permalink / raw)
To: lee.jones; +Cc: stable, Thor Thayer, linux-kernel, linux-arm-kernel
Sparse reports:
drivers/mfd/altera-sysmgr.c:150:30: warning: incorrect type in assignment (different address spaces)
drivers/mfd/altera-sysmgr.c:150:30: expected unsigned int [usertype] *base
drivers/mfd/altera-sysmgr.c:150:30: got void [noderef] <asn:2> *
drivers/mfd/altera-sysmgr.c:156:26: warning: incorrect type in argument 3 (different address spaces)
drivers/mfd/altera-sysmgr.c:156:26: expected void [noderef] <asn:2> *regs
drivers/mfd/altera-sysmgr.c:156:26: got unsigned int [usertype] *base
It appears as though the driver data property 'resource_size_t *base'
was being used to store 2 different types of addresses (physical and
IO-mapped) under a single declared type.
Fortunately, no value is recalled from the driver data entry, so it
can be easily omitted. Instead we can use the value obtained directly
from the platform resource to pass through Regmap into the call-backs
to be used for the SMCC call and use a local dedicated __iomem
variable for IO-remapping.
Cc: <stable@vger.kernel.org>
Cc: Thor Thayer <thor.thayer@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/mfd/altera-sysmgr.c | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/drivers/mfd/altera-sysmgr.c b/drivers/mfd/altera-sysmgr.c
index d2a13a547a3ca..83f0765f819b0 100644
--- a/drivers/mfd/altera-sysmgr.c
+++ b/drivers/mfd/altera-sysmgr.c
@@ -22,11 +22,9 @@
/**
* struct altr_sysmgr - Altera SOCFPGA System Manager
* @regmap: the regmap used for System Manager accesses.
- * @base : the base address for the System Manager
*/
struct altr_sysmgr {
struct regmap *regmap;
- resource_size_t *base;
};
static struct platform_driver altr_sysmgr_driver;
@@ -127,6 +125,7 @@ static int sysmgr_probe(struct platform_device *pdev)
struct regmap_config sysmgr_config = altr_sysmgr_regmap_cfg;
struct device *dev = &pdev->dev;
struct device_node *np = dev->of_node;
+ void __iomem *base;
sysmgr = devm_kzalloc(dev, sizeof(*sysmgr), GFP_KERNEL);
if (!sysmgr)
@@ -139,22 +138,19 @@ static int sysmgr_probe(struct platform_device *pdev)
sysmgr_config.max_register = resource_size(res) -
sysmgr_config.reg_stride;
if (of_device_is_compatible(np, "altr,sys-mgr-s10")) {
- /* Need physical address for SMCC call */
- sysmgr->base = (resource_size_t *)res->start;
sysmgr_config.reg_read = s10_protected_reg_read;
sysmgr_config.reg_write = s10_protected_reg_write;
- regmap = devm_regmap_init(dev, NULL, sysmgr->base,
+ /* Need physical address for SMCC call */
+ regmap = devm_regmap_init(dev, NULL, (void *)res->start,
&sysmgr_config);
} else {
- sysmgr->base = devm_ioremap(dev, res->start,
- resource_size(res));
- if (!sysmgr->base)
+ base = devm_ioremap(dev, res->start, resource_size(res));
+ if (!base)
return -ENOMEM;
sysmgr_config.max_register = res->end - res->start - 3;
- regmap = devm_regmap_init_mmio(dev, sysmgr->base,
- &sysmgr_config);
+ regmap = devm_regmap_init_mmio(dev, base, &sysmgr_config);
}
if (IS_ERR(regmap)) {
--
2.25.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] 19+ messages in thread
* Re: [PATCH 04/10] mfd: altera-sysmgr: Fix physical address storing hacks
2020-06-24 15:06 ` [PATCH 04/10] mfd: altera-sysmgr: Fix physical address storing hacks Lee Jones
@ 2020-07-01 19:33 ` Sasha Levin
2020-07-02 6:28 ` Lee Jones
2020-07-10 14:03 ` Sasha Levin
1 sibling, 1 reply; 19+ messages in thread
From: Sasha Levin @ 2020-07-01 19:33 UTC (permalink / raw)
To: Sasha Levin, Lee Jones, lee.jones
Cc: stable, Thor Thayer, linux-kernel, linux-arm-kernel
Hi
[This is an automated email]
This commit has been processed because it contains a -stable tag.
The stable tag indicates that it's relevant for the following trees: all
The bot has tested the following trees: v5.7.6, v5.4.49, v4.19.130, v4.14.186, v4.9.228, v4.4.228.
v5.7.6: Build OK!
v5.4.49: Build OK!
v4.19.130: Failed to apply! Possible dependencies:
51908d2e9b7c7 ("mfd: stpmic1: Add STPMIC1 driver")
f36e789a1f8d0 ("mfd: altera-sysmgr: Add SOCFPGA System Manager")
v4.14.186: Failed to apply! Possible dependencies:
51908d2e9b7c7 ("mfd: stpmic1: Add STPMIC1 driver")
f36e789a1f8d0 ("mfd: altera-sysmgr: Add SOCFPGA System Manager")
v4.9.228: Failed to apply! Possible dependencies:
51908d2e9b7c7 ("mfd: stpmic1: Add STPMIC1 driver")
937d3a0af521e ("mfd: Add support for Allwinner SoCs ADC")
d0f949e220fdf ("mfd: Add STM32 Timers driver")
f36e789a1f8d0 ("mfd: altera-sysmgr: Add SOCFPGA System Manager")
v4.4.228: Failed to apply! Possible dependencies:
51908d2e9b7c7 ("mfd: stpmic1: Add STPMIC1 driver")
8ce064bfe7c8c ("MAINTAINERS: Add Altera Arria10 System Resource Chip")
937d3a0af521e ("mfd: Add support for Allwinner SoCs ADC")
9787f5e28b507 ("mfd: altr_a10sr: Add Altera Arria10 DevKit System Resource Chip")
b25c6b7d2801f ("mfd: act8945a: Add Active-semi ACT8945A PMIC MFD driver")
d0f949e220fdf ("mfd: Add STM32 Timers driver")
f36e789a1f8d0 ("mfd: altera-sysmgr: Add SOCFPGA System Manager")
NOTE: The patch will not be queued to stable trees until it is upstream.
How should we proceed with this patch?
--
Thanks
Sasha
_______________________________________________
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] 19+ messages in thread
* Re: [PATCH 04/10] mfd: altera-sysmgr: Fix physical address storing hacks
2020-07-01 19:33 ` Sasha Levin
@ 2020-07-02 6:28 ` Lee Jones
0 siblings, 0 replies; 19+ messages in thread
From: Lee Jones @ 2020-07-02 6:28 UTC (permalink / raw)
To: Sasha Levin; +Cc: stable, Thor Thayer, linux-kernel, linux-arm-kernel
On Wed, 01 Jul 2020, Sasha Levin wrote:
> Hi
>
> [This is an automated email]
>
> This commit has been processed because it contains a -stable tag.
> The stable tag indicates that it's relevant for the following trees: all
>
> The bot has tested the following trees: v5.7.6, v5.4.49, v4.19.130, v4.14.186, v4.9.228, v4.4.228.
>
> v5.7.6: Build OK!
> v5.4.49: Build OK!
> v4.19.130: Failed to apply! Possible dependencies:
> 51908d2e9b7c7 ("mfd: stpmic1: Add STPMIC1 driver")
> f36e789a1f8d0 ("mfd: altera-sysmgr: Add SOCFPGA System Manager")
>
> v4.14.186: Failed to apply! Possible dependencies:
> 51908d2e9b7c7 ("mfd: stpmic1: Add STPMIC1 driver")
> f36e789a1f8d0 ("mfd: altera-sysmgr: Add SOCFPGA System Manager")
>
> v4.9.228: Failed to apply! Possible dependencies:
> 51908d2e9b7c7 ("mfd: stpmic1: Add STPMIC1 driver")
> 937d3a0af521e ("mfd: Add support for Allwinner SoCs ADC")
> d0f949e220fdf ("mfd: Add STM32 Timers driver")
> f36e789a1f8d0 ("mfd: altera-sysmgr: Add SOCFPGA System Manager")
>
> v4.4.228: Failed to apply! Possible dependencies:
> 51908d2e9b7c7 ("mfd: stpmic1: Add STPMIC1 driver")
> 8ce064bfe7c8c ("MAINTAINERS: Add Altera Arria10 System Resource Chip")
> 937d3a0af521e ("mfd: Add support for Allwinner SoCs ADC")
> 9787f5e28b507 ("mfd: altr_a10sr: Add Altera Arria10 DevKit System Resource Chip")
> b25c6b7d2801f ("mfd: act8945a: Add Active-semi ACT8945A PMIC MFD driver")
> d0f949e220fdf ("mfd: Add STM32 Timers driver")
> f36e789a1f8d0 ("mfd: altera-sysmgr: Add SOCFPGA System Manager")
>
>
> NOTE: The patch will not be queued to stable trees until it is upstream.
>
> How should we proceed with this patch?
Please drop it.
Greg indicated that these should not be bound for Stable.
--
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] 19+ messages in thread
* Re: [PATCH 04/10] mfd: altera-sysmgr: Fix physical address storing hacks
2020-06-24 15:06 ` [PATCH 04/10] mfd: altera-sysmgr: Fix physical address storing hacks Lee Jones
2020-07-01 19:33 ` Sasha Levin
@ 2020-07-10 14:03 ` Sasha Levin
1 sibling, 0 replies; 19+ messages in thread
From: Sasha Levin @ 2020-07-10 14:03 UTC (permalink / raw)
To: Sasha Levin, Lee Jones, lee.jones
Cc: stable, Thor Thayer, linux-kernel, linux-arm-kernel
Hi
[This is an automated email]
This commit has been processed because it contains a -stable tag.
The stable tag indicates that it's relevant for the following trees: all
The bot has tested the following trees: v5.7.6, v5.4.49, v4.19.130, v4.14.186, v4.9.228, v4.4.228.
v5.7.6: Build OK!
v5.4.49: Build OK!
v4.19.130: Failed to apply! Possible dependencies:
51908d2e9b7c7 ("mfd: stpmic1: Add STPMIC1 driver")
f36e789a1f8d0 ("mfd: altera-sysmgr: Add SOCFPGA System Manager")
v4.14.186: Failed to apply! Possible dependencies:
51908d2e9b7c7 ("mfd: stpmic1: Add STPMIC1 driver")
f36e789a1f8d0 ("mfd: altera-sysmgr: Add SOCFPGA System Manager")
v4.9.228: Failed to apply! Possible dependencies:
51908d2e9b7c7 ("mfd: stpmic1: Add STPMIC1 driver")
937d3a0af521e ("mfd: Add support for Allwinner SoCs ADC")
d0f949e220fdf ("mfd: Add STM32 Timers driver")
f36e789a1f8d0 ("mfd: altera-sysmgr: Add SOCFPGA System Manager")
v4.4.228: Failed to apply! Possible dependencies:
51908d2e9b7c7 ("mfd: stpmic1: Add STPMIC1 driver")
8ce064bfe7c8c ("MAINTAINERS: Add Altera Arria10 System Resource Chip")
937d3a0af521e ("mfd: Add support for Allwinner SoCs ADC")
9787f5e28b507 ("mfd: altr_a10sr: Add Altera Arria10 DevKit System Resource Chip")
b25c6b7d2801f ("mfd: act8945a: Add Active-semi ACT8945A PMIC MFD driver")
d0f949e220fdf ("mfd: Add STM32 Timers driver")
f36e789a1f8d0 ("mfd: altera-sysmgr: Add SOCFPGA System Manager")
NOTE: The patch will not be queued to stable trees until it is upstream.
How should we proceed with this patch?
--
Thanks
Sasha
_______________________________________________
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] 19+ messages in thread
* [PATCH 05/10] mfd: sprd-sc27xx-spi: Fix symbol 'sprd_pmic_detect_charger_type' was not declared warning
2020-06-24 15:06 [PATCH 00/10] Fix a bunch of W=1 warnings in MFD Lee Jones
` (3 preceding siblings ...)
2020-06-24 15:06 ` [PATCH 04/10] mfd: altera-sysmgr: Fix physical address storing hacks Lee Jones
@ 2020-06-24 15:06 ` Lee Jones
2020-06-25 2:46 ` Baolin Wang
2020-06-24 15:07 ` [PATCH 06/10] mfd: ab3100-core: Fix incompatible types in comparison expression warning Lee Jones
` (4 subsequent siblings)
9 siblings, 1 reply; 19+ messages in thread
From: Lee Jones @ 2020-06-24 15:06 UTC (permalink / raw)
To: lee.jones
Cc: Chunyan Zhang, linux-kernel, stable, Baolin Wang, Orson Zhai,
linux-arm-kernel
Sparse reports:
drivers/mfd/sprd-sc27xx-spi.c:59:23: warning: symbol 'sprd_pmic_detect_charger_type' was not declared. Should it be static?
... due to a missing header file.
Cc: <stable@vger.kernel.org>
Cc: Orson Zhai <orsonzhai@gmail.com>
Cc: Baolin Wang <baolin.wang7@gmail.com>
Cc: Chunyan Zhang <zhang.lyra@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/mfd/sprd-sc27xx-spi.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/mfd/sprd-sc27xx-spi.c b/drivers/mfd/sprd-sc27xx-spi.c
index 33336cde47243..c305e941e435c 100644
--- a/drivers/mfd/sprd-sc27xx-spi.c
+++ b/drivers/mfd/sprd-sc27xx-spi.c
@@ -7,6 +7,7 @@
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mfd/core.h>
+#include <linux/mfd/sc27xx-pmic.h>
#include <linux/of_device.h>
#include <linux/regmap.h>
#include <linux/spi/spi.h>
--
2.25.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] 19+ messages in thread
* Re: [PATCH 05/10] mfd: sprd-sc27xx-spi: Fix symbol 'sprd_pmic_detect_charger_type' was not declared warning
2020-06-24 15:06 ` [PATCH 05/10] mfd: sprd-sc27xx-spi: Fix symbol 'sprd_pmic_detect_charger_type' was not declared warning Lee Jones
@ 2020-06-25 2:46 ` Baolin Wang
0 siblings, 0 replies; 19+ messages in thread
From: Baolin Wang @ 2020-06-25 2:46 UTC (permalink / raw)
To: Lee Jones; +Cc: stable, Chunyan Zhang, LKML, linux-arm-kernel, Orson Zhai
Hi Lee,
On Wed, Jun 24, 2020 at 11:07 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> Sparse reports:
>
> drivers/mfd/sprd-sc27xx-spi.c:59:23: warning: symbol 'sprd_pmic_detect_charger_type' was not declared. Should it be static?
>
> ... due to a missing header file.
>
> Cc: <stable@vger.kernel.org>
> Cc: Orson Zhai <orsonzhai@gmail.com>
> Cc: Baolin Wang <baolin.wang7@gmail.com>
> Cc: Chunyan Zhang <zhang.lyra@gmail.com>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Thanks.
Reviewed-by: Baolin Wang <baolin.wang7@gmail.com>
> ---
> drivers/mfd/sprd-sc27xx-spi.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/mfd/sprd-sc27xx-spi.c b/drivers/mfd/sprd-sc27xx-spi.c
> index 33336cde47243..c305e941e435c 100644
> --- a/drivers/mfd/sprd-sc27xx-spi.c
> +++ b/drivers/mfd/sprd-sc27xx-spi.c
> @@ -7,6 +7,7 @@
> #include <linux/kernel.h>
> #include <linux/module.h>
> #include <linux/mfd/core.h>
> +#include <linux/mfd/sc27xx-pmic.h>
> #include <linux/of_device.h>
> #include <linux/regmap.h>
> #include <linux/spi/spi.h>
> --
> 2.25.1
>
--
Baolin Wang
_______________________________________________
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] 19+ messages in thread
* [PATCH 06/10] mfd: ab3100-core: Fix incompatible types in comparison expression warning
2020-06-24 15:06 [PATCH 00/10] Fix a bunch of W=1 warnings in MFD Lee Jones
` (4 preceding siblings ...)
2020-06-24 15:06 ` [PATCH 05/10] mfd: sprd-sc27xx-spi: Fix symbol 'sprd_pmic_detect_charger_type' was not declared warning Lee Jones
@ 2020-06-24 15:07 ` Lee Jones
2020-07-07 12:33 ` Linus Walleij
2020-06-24 15:07 ` [PATCH 07/10] mfd: ab8500-debugfs: Fix incompatible types in comparison expression issue Lee Jones
` (3 subsequent siblings)
9 siblings, 1 reply; 19+ messages in thread
From: Lee Jones @ 2020-06-24 15:07 UTC (permalink / raw)
To: lee.jones; +Cc: stable, Linus Walleij, linux-kernel, linux-arm-kernel
Smatch reports:
drivers/mfd/ab3100-core.c:501:20: error: incompatible types in comparison expression (different type sizes):
drivers/mfd/ab3100-core.c:501:20: unsigned int *
drivers/mfd/ab3100-core.c:501:20: unsigned long *
drivers/mfd/ab8500-debugfs.c:1804:20: error: incompatible types in comparison expression (different type sizes):
drivers/mfd/ab8500-debugfs.c:1804:20: unsigned int *
drivers/mfd/ab8500-debugfs.c:1804:20: unsigned long *
Since the second min() argument can be less than 0 a signed
variable is required for assignment. However, the non-sized
type size_t is passed in from the userspace handlers. In order
to firstly compare, then assign the smallest value, we firstly
need to cast them both to the same as the receiving size_t typed
variable.
Cc: <stable@vger.kernel.org>
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/mfd/ab3100-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mfd/ab3100-core.c b/drivers/mfd/ab3100-core.c
index 57723f116bb58..ee71ae04b5e63 100644
--- a/drivers/mfd/ab3100-core.c
+++ b/drivers/mfd/ab3100-core.c
@@ -498,7 +498,7 @@ static ssize_t ab3100_get_set_reg(struct file *file,
int i = 0;
/* Get userspace string and assure termination */
- buf_size = min(count, (sizeof(buf)-1));
+ buf_size = min((ssize_t)count, (ssize_t)(sizeof(buf)-1));
if (copy_from_user(buf, user_buf, buf_size))
return -EFAULT;
buf[buf_size] = 0;
--
2.25.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] 19+ messages in thread
* Re: [PATCH 06/10] mfd: ab3100-core: Fix incompatible types in comparison expression warning
2020-06-24 15:07 ` [PATCH 06/10] mfd: ab3100-core: Fix incompatible types in comparison expression warning Lee Jones
@ 2020-07-07 12:33 ` Linus Walleij
0 siblings, 0 replies; 19+ messages in thread
From: Linus Walleij @ 2020-07-07 12:33 UTC (permalink / raw)
To: Lee Jones; +Cc: stable, linux-kernel, Linux ARM
On Wed, Jun 24, 2020 at 5:07 PM Lee Jones <lee.jones@linaro.org> wrote:
> Smatch reports:
>
> drivers/mfd/ab3100-core.c:501:20: error: incompatible types in comparison expression (different type sizes):
> drivers/mfd/ab3100-core.c:501:20: unsigned int *
> drivers/mfd/ab3100-core.c:501:20: unsigned long *
> drivers/mfd/ab8500-debugfs.c:1804:20: error: incompatible types in comparison expression (different type sizes):
> drivers/mfd/ab8500-debugfs.c:1804:20: unsigned int *
> drivers/mfd/ab8500-debugfs.c:1804:20: unsigned long *
>
> Since the second min() argument can be less than 0 a signed
> variable is required for assignment. However, the non-sized
> type size_t is passed in from the userspace handlers. In order
> to firstly compare, then assign the smallest value, we firstly
> need to cast them both to the same as the receiving size_t typed
> variable.
>
> Cc: <stable@vger.kernel.org>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
_______________________________________________
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] 19+ messages in thread
* [PATCH 07/10] mfd: ab8500-debugfs: Fix incompatible types in comparison expression issue
2020-06-24 15:06 [PATCH 00/10] Fix a bunch of W=1 warnings in MFD Lee Jones
` (5 preceding siblings ...)
2020-06-24 15:07 ` [PATCH 06/10] mfd: ab3100-core: Fix incompatible types in comparison expression warning Lee Jones
@ 2020-06-24 15:07 ` Lee Jones
2020-07-07 12:34 ` Linus Walleij
2020-06-24 15:07 ` [PATCH 08/10] mfd: tc3589x: Remove invalid use of kerneldoc syntax Lee Jones
` (2 subsequent siblings)
9 siblings, 1 reply; 19+ messages in thread
From: Lee Jones @ 2020-06-24 15:07 UTC (permalink / raw)
To: lee.jones; +Cc: stable, Linus Walleij, linux-kernel, linux-arm-kernel
Smatch reports:
drivers/mfd/ab8500-debugfs.c:1804:20: error: incompatible types in comparison expression (different type sizes):
drivers/mfd/ab8500-debugfs.c:1804:20: unsigned int *
drivers/mfd/ab8500-debugfs.c:1804:20: unsigned long *
This is due to mixed types being compared in a min() comparison. Fix
this by treating values as signed and casting them to the same type
as the receiving variable.
Cc: <stable@vger.kernel.org>
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/mfd/ab8500-debugfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mfd/ab8500-debugfs.c b/drivers/mfd/ab8500-debugfs.c
index 1a9a3414d4fa8..6d1bf7c3ca3b1 100644
--- a/drivers/mfd/ab8500-debugfs.c
+++ b/drivers/mfd/ab8500-debugfs.c
@@ -1801,7 +1801,7 @@ static ssize_t ab8500_hwreg_write(struct file *file,
int buf_size, ret;
/* Get userspace string and assure termination */
- buf_size = min(count, (sizeof(buf)-1));
+ buf_size = min((int)count, (int)(sizeof(buf)-1));
if (copy_from_user(buf, user_buf, buf_size))
return -EFAULT;
buf[buf_size] = 0;
--
2.25.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] 19+ messages in thread
* Re: [PATCH 07/10] mfd: ab8500-debugfs: Fix incompatible types in comparison expression issue
2020-06-24 15:07 ` [PATCH 07/10] mfd: ab8500-debugfs: Fix incompatible types in comparison expression issue Lee Jones
@ 2020-07-07 12:34 ` Linus Walleij
0 siblings, 0 replies; 19+ messages in thread
From: Linus Walleij @ 2020-07-07 12:34 UTC (permalink / raw)
To: Lee Jones; +Cc: stable, linux-kernel, Linux ARM
On Wed, Jun 24, 2020 at 5:07 PM Lee Jones <lee.jones@linaro.org> wrote:
> Smatch reports:
>
> drivers/mfd/ab8500-debugfs.c:1804:20: error: incompatible types in comparison expression (different type sizes):
> drivers/mfd/ab8500-debugfs.c:1804:20: unsigned int *
> drivers/mfd/ab8500-debugfs.c:1804:20: unsigned long *
>
> This is due to mixed types being compared in a min() comparison. Fix
> this by treating values as signed and casting them to the same type
> as the receiving variable.
>
> Cc: <stable@vger.kernel.org>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
_______________________________________________
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] 19+ messages in thread
* [PATCH 08/10] mfd: tc3589x: Remove invalid use of kerneldoc syntax
2020-06-24 15:06 [PATCH 00/10] Fix a bunch of W=1 warnings in MFD Lee Jones
` (6 preceding siblings ...)
2020-06-24 15:07 ` [PATCH 07/10] mfd: ab8500-debugfs: Fix incompatible types in comparison expression issue Lee Jones
@ 2020-06-24 15:07 ` Lee Jones
2020-06-24 15:07 ` [PATCH 09/10] mfd: wm8400-core: Supply description for wm8400_reset_codec_reg_cache's arg Lee Jones
2020-06-24 15:07 ` [PATCH 10/10] mfd: wm831x-core: Supply description wm831x_reg_{un}lock args Lee Jones
9 siblings, 0 replies; 19+ messages in thread
From: Lee Jones @ 2020-06-24 15:07 UTC (permalink / raw)
To: lee.jones; +Cc: stable, linux-kernel, linux-arm-kernel
Kerneldoc is for documenting function arguments and return values.
Prevents warnings like:
drivers/mfd/tc3589x.c:32: warning: Enum value 'TC3589X_TC35890' not described in enum 'tc3589x_version'
drivers/mfd/tc3589x.c:32: warning: Enum value 'TC3589X_TC35892' not described in enum 'tc3589x_version'
drivers/mfd/tc3589x.c:32: warning: Enum value 'TC3589X_TC35893' not described in enum 'tc3589x_version'
drivers/mfd/tc3589x.c:32: warning: Enum value 'TC3589X_TC35894' not described in enum 'tc3589x_version'
drivers/mfd/tc3589x.c:32: warning: Enum value 'TC3589X_TC35895' not described in enum 'tc3589x_version'
drivers/mfd/tc3589x.c:32: warning: Enum value 'TC3589X_TC35896' not described in enum 'tc3589x_version'
drivers/mfd/tc3589x.c:32: warning: Enum value 'TC3589X_UNKNOWN' not described in enum 'tc3589x_version'
Cc: <stable@vger.kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/mfd/tc3589x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mfd/tc3589x.c b/drivers/mfd/tc3589x.c
index 67c9995bb1aa6..7882a37ffc352 100644
--- a/drivers/mfd/tc3589x.c
+++ b/drivers/mfd/tc3589x.c
@@ -18,7 +18,7 @@
#include <linux/mfd/tc3589x.h>
#include <linux/err.h>
-/**
+/*
* enum tc3589x_version - indicates the TC3589x version
*/
enum tc3589x_version {
--
2.25.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] 19+ messages in thread
* [PATCH 09/10] mfd: wm8400-core: Supply description for wm8400_reset_codec_reg_cache's arg
2020-06-24 15:06 [PATCH 00/10] Fix a bunch of W=1 warnings in MFD Lee Jones
` (7 preceding siblings ...)
2020-06-24 15:07 ` [PATCH 08/10] mfd: tc3589x: Remove invalid use of kerneldoc syntax Lee Jones
@ 2020-06-24 15:07 ` Lee Jones
2020-06-24 16:24 ` Charles Keepax
2020-06-24 15:07 ` [PATCH 10/10] mfd: wm831x-core: Supply description wm831x_reg_{un}lock args Lee Jones
9 siblings, 1 reply; 19+ messages in thread
From: Lee Jones @ 2020-06-24 15:07 UTC (permalink / raw)
To: lee.jones; +Cc: stable, Mark Brown, linux-kernel, linux-arm-kernel, patches
Kerneldoc syntax is used, but not complete. Descriptions required.
Prevents warnings like:
drivers/mfd/wm8400-core.c:113: warning: Function parameter or member 'wm8400' not described in 'wm8400_reset_codec_reg_cache'
Cc: <stable@vger.kernel.org>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: patches@opensource.cirrus.com
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/mfd/wm8400-core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/mfd/wm8400-core.c b/drivers/mfd/wm8400-core.c
index 3055d6f47afcc..0fe32a05421be 100644
--- a/drivers/mfd/wm8400-core.c
+++ b/drivers/mfd/wm8400-core.c
@@ -108,6 +108,8 @@ static const struct regmap_config wm8400_regmap_config = {
/**
* wm8400_reset_codec_reg_cache - Reset cached codec registers to
* their default values.
+ *
+ * @wm8400: pointer to local driver data structure
*/
void wm8400_reset_codec_reg_cache(struct wm8400 *wm8400)
{
--
2.25.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] 19+ messages in thread
* Re: [PATCH 09/10] mfd: wm8400-core: Supply description for wm8400_reset_codec_reg_cache's arg
2020-06-24 15:07 ` [PATCH 09/10] mfd: wm8400-core: Supply description for wm8400_reset_codec_reg_cache's arg Lee Jones
@ 2020-06-24 16:24 ` Charles Keepax
0 siblings, 0 replies; 19+ messages in thread
From: Charles Keepax @ 2020-06-24 16:24 UTC (permalink / raw)
To: Lee Jones; +Cc: stable, Mark Brown, linux-kernel, linux-arm-kernel, patches
On Wed, Jun 24, 2020 at 04:07:03PM +0100, Lee Jones wrote:
> Kerneldoc syntax is used, but not complete. Descriptions required.
>
> Prevents warnings like:
>
> drivers/mfd/wm8400-core.c:113: warning: Function parameter or member 'wm8400' not described in 'wm8400_reset_codec_reg_cache'
>
> Cc: <stable@vger.kernel.org>
> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
> Cc: patches@opensource.cirrus.com
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Thanks,
Charles
_______________________________________________
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] 19+ messages in thread
* [PATCH 10/10] mfd: wm831x-core: Supply description wm831x_reg_{un}lock args
2020-06-24 15:06 [PATCH 00/10] Fix a bunch of W=1 warnings in MFD Lee Jones
` (8 preceding siblings ...)
2020-06-24 15:07 ` [PATCH 09/10] mfd: wm8400-core: Supply description for wm8400_reset_codec_reg_cache's arg Lee Jones
@ 2020-06-24 15:07 ` Lee Jones
2020-06-24 16:24 ` Charles Keepax
9 siblings, 1 reply; 19+ messages in thread
From: Lee Jones @ 2020-06-24 15:07 UTC (permalink / raw)
To: lee.jones; +Cc: stable, Mark Brown, linux-kernel, linux-arm-kernel, patches
Kerneldoc syntax is used, but not complete. Descriptions required.
Prevents warnings like:
drivers/mfd/wm831x-core.c:119: warning: Function parameter or member 'wm831x' not described in 'wm831x_reg_lock'
drivers/mfd/wm831x-core.c:145: warning: Function parameter or member 'wm831x' not described in 'wm831x_reg_unlock'
Cc: <stable@vger.kernel.org>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: patches@opensource.cirrus.com
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/mfd/wm831x-core.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/mfd/wm831x-core.c b/drivers/mfd/wm831x-core.c
index 02f879b23d9f6..b0344e5353e4f 100644
--- a/drivers/mfd/wm831x-core.c
+++ b/drivers/mfd/wm831x-core.c
@@ -114,6 +114,8 @@ static int wm831x_reg_locked(struct wm831x *wm831x, unsigned short reg)
* The WM831x has a user key preventing writes to particularly
* critical registers. This function locks those registers,
* allowing writes to them.
+ *
+ * @wm831x: pointer to local driver data structure
*/
void wm831x_reg_lock(struct wm831x *wm831x)
{
@@ -140,6 +142,8 @@ EXPORT_SYMBOL_GPL(wm831x_reg_lock);
* The WM831x has a user key preventing writes to particularly
* critical registers. This function locks those registers,
* preventing spurious writes.
+ *
+ * @wm831x: pointer to local driver data structure
*/
int wm831x_reg_unlock(struct wm831x *wm831x)
{
--
2.25.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] 19+ messages in thread
* Re: [PATCH 10/10] mfd: wm831x-core: Supply description wm831x_reg_{un}lock args
2020-06-24 15:07 ` [PATCH 10/10] mfd: wm831x-core: Supply description wm831x_reg_{un}lock args Lee Jones
@ 2020-06-24 16:24 ` Charles Keepax
0 siblings, 0 replies; 19+ messages in thread
From: Charles Keepax @ 2020-06-24 16:24 UTC (permalink / raw)
To: Lee Jones; +Cc: stable, Mark Brown, linux-kernel, linux-arm-kernel, patches
On Wed, Jun 24, 2020 at 04:07:04PM +0100, Lee Jones wrote:
> Kerneldoc syntax is used, but not complete. Descriptions required.
>
> Prevents warnings like:
>
> drivers/mfd/wm831x-core.c:119: warning: Function parameter or member 'wm831x' not described in 'wm831x_reg_lock'
> drivers/mfd/wm831x-core.c:145: warning: Function parameter or member 'wm831x' not described in 'wm831x_reg_unlock'
>
> Cc: <stable@vger.kernel.org>
> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
> Cc: patches@opensource.cirrus.com
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Thanks,
Charles
_______________________________________________
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] 19+ messages in thread