mailbox: zynqmp: Remove invalid __percpu annotation in zynqmp_ipi_probe()
Subsystems (3)
PATCH v2 1/1 mailbox: zynqmp: Remove invalid __percpu annotation in zynqmp_ipi_probe()
struct zynqmp_ipi_pdata __percpu *pdata is not a per-cpu variable, so it should not be annotated with __percpu annotation.
Remove invalid __percpu annotation to fix several
zynqmp-ipi-mailbox.c:920:15: warning: incorrect type in assignment (different address spaces)
zynqmp-ipi-mailbox.c:920:15: expected struct zynqmp_ipi_pdata [noderef] __percpu *pdata
zynqmp-ipi-mailbox.c:920:15: got void *
zynqmp-ipi-mailbox.c:927:56: warning: incorrect type in argument 3 (different address spaces)
zynqmp-ipi-mailbox.c:927:56: expected unsigned int [usertype] *out_value
zynqmp-ipi-mailbox.c:927:56: got unsigned int [noderef] __percpu *
...
and several
drivers/mailbox/zynqmp-ipi-mailbox.c:924:9: warning: dereference of noderef expression
...
sparse warnings.
There were no changes in the resulting object file.
---
v2: - Fix typo in commit message
- Add Fixes and Cc: stable.
--- drivers/mailbox/zynqmp-ipi-mailbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mailbox/zynqmp-ipi-mailbox.c +1 -1
@@ -905,7 +905,7 @@ static int zynqmp_ipi_probe(struct platform_device *pdev) {struct device *dev = &pdev->dev;struct device_node *nc, *np = pdev->dev.of_node; -struct zynqmp_ipi_pdata __percpu *pdata; +struct zynqmp_ipi_pdata *pdata;struct of_phandle_args out_irq;struct zynqmp_ipi_mbox *mbox;int num_mboxes, ret = -EINVAL ;
Signature · 1 line
2.42.0
Quoted 40 lines · Uros Bizjak
struct
zynqmp_ipi_pdata__percpu*pdata is not a per-cpu variable, so it should not be annotated with__percpuannotation.Remove invalid
__percpuannotation to fix severalzynqmp-ipi-mailbox.c:920:15: warning: incorrect type in assignment (different address spaces)
zynqmp-ipi-mailbox.c:920:15: expected structzynqmp_ipi_pdata[noderef]__percpu*pdata
zynqmp-ipi-mailbox.c:920:15: got void *
zynqmp-ipi-mailbox.c:927:56: warning: incorrect type in argument 3 (different address spaces)
zynqmp-ipi-mailbox.c:927:56: expected unsigned int [usertype]*out_value
zynqmp-ipi-mailbox.c:927:56: got unsigned int [noderef]__percpu*
...and several
drivers/mailbox/zynqmp-ipi-mailbox.c:924:9: warning: dereference of noderef expression
...sparse warnings.
There were no changes in the resulting object file.
Fixes 6ffb1635341b ("mailbox: zynqmp: handle SGI for shared IPI")Signed-off-by Uros Bizjak <[email protected]>Cc Jassi Brar <[email protected]>Cc Michal Simek <[email protected]>Cc Tanmay Shah <[email protected]>---
v2: - Fix typo in commit message
- Add Fixes and Cc: stable.--- drivers/mailbox/zynqmp-ipi-mailbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/mailbox/zynqmp-ipi-mailbox.c +0
-0
drivers/mailbox/zynqmp-ipi-mailbox.c static int zynqmp_ipi_probe(struct platform_device *pdev) · line 911
Quoted 8 lines
drivers/mailbox/zynqmp-ipi-mailbox.c +1
-1@@ -905,7 +905,7 @@ static int zynqmp_ipi_probe(struct platform_device *pdev) {struct device *dev = &pdev->dev;struct device_node *nc, *np = pdev->dev.of_node; -struct zynqmp_ipi_pdata __percpu *pdata; +struct zynqmp_ipi_pdata *pdata;struct of_phandle_args out_irq;struct zynqmp_ipi_mbox *mbox;int num_mboxes, ret = -EINVAL ;
Tanmay: Please take a look
I think this patch is correct. Pdata structure is allocated only once not for every CPU and marking here is not correct. Information from zynqmp_ipi_pdata are likely fixed and the same for every CPU. Only IRQ handling is done per cpu basis but that's it.
Thanks,
Michal
Tanmay Shah
Reviewed-byQuoted 62 lines · Michal Simek
Quoted 48 lines · Uros Bizjak
struct
zynqmp_ipi_pdata__percpu*pdata is not a per-cpu variable, so it should not be annotated with__percpuannotation.Remove invalid
__percpuannotation to fix severalzynqmp-ipi-mailbox.c:920:15: warning: incorrect type in assignment (different address spaces) zynqmp-ipi-mailbox.c:920:15: expected struct
zynqmp_ipi_pdata[noderef]__percpu*pdata zynqmp-ipi-mailbox.c:920:15: got void *
zynqmp-ipi-mailbox.c:927:56: warning: incorrect type in argument 3 (different address spaces) zynqmp-ipi-mailbox.c:927:56: expected unsigned int [usertype]*out_valuezynqmp-ipi-mailbox.c:927:56: got unsigned int [noderef]__percpu*
...and several
drivers/mailbox/zynqmp-ipi-mailbox.c:924:9: warning: dereference of noderef expression
...sparse warnings.
There were no changes in the resulting object file.
Fixes 6ffb1635341b ("mailbox: zynqmp: handle SGI for shared IPI")Signed-off-by Uros Bizjak <[email protected]>Cc Jassi Brar <[email protected]>Cc Michal Simek <[email protected]>Cc Tanmay Shah <[email protected]>---
v2: - Fix typo in commit message
- Add Fixes and Cc: stable.
---
drivers/mailbox/zynqmp-ipi-mailbox.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)drivers/mailbox/zynqmp-ipi-mailbox.c +1
-1@@ -905,7 +905,7 @@ static int zynqmp_ipi_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct device_node *nc, *np = pdev->dev.of_node; - struct zynqmp_ipi_pdata __percpu *pdata; + struct zynqmp_ipi_pdata *pdata; struct of_phandle_args out_irq; struct zynqmp_ipi_mbox *mbox;Quoted 1 line
int
num_mboxes, ret =-EINVAL;Tanmay: Please take a look
I think this patch is correct. Pdata structure is allocated only once not for every CPU and marking here is not correct. Information from
zynqmp_ipi_pdataare likely fixed and the same for every CPU. Only IRQ handling is done per cpu basis but that's it.Reviewed-by Michal Simek <[email protected]>Thanks,
Michal
Quoted 2 lines · Tanmay Shah
Reviewed-by Tanmay Shah <[email protected]>
Is there anything else expected from me to move this patch forward?
Uros.
Quoted 74 lines · Michal Simek
Quoted 71 lines · Uros Bizjak
Quoted 54 lines
struct
zynqmp_ipi_pdata__percpu*pdata is not a per-cpu variable, so it should not be annotated with__percpuannotation.Remove invalid
__percpuannotation to fix severalzynqmp-ipi-mailbox.c:920:15: warning: incorrect type in assignment (different address spaces)
zynqmp-ipi-mailbox.c:920:15: expected structzynqmp_ipi_pdata
[noderef]__percpu*pdata
zynqmp-ipi-mailbox.c:920:15: got void *
zynqmp-ipi-mailbox.c:927:56: warning: incorrect type in argument 3 (different address spaces)
zynqmp-ipi-mailbox.c:927:56: expected unsigned int [usertype]*out_value
zynqmp-ipi-mailbox.c:927:56: got unsigned int [noderef]__percpu*
...and several
drivers/mailbox/zynqmp-ipi-mailbox.c:924:9: warning: dereference of noderef expression
...sparse warnings.
There were no changes in the resulting object file.
Fixes 6ffb1635341b ("mailbox: zynqmp: handle SGI for shared IPI")Signed-off-by Uros Bizjak <[email protected]>Cc Jassi Brar <[email protected]>Cc Michal Simek <[email protected]>Cc Tanmay Shah <[email protected]>---
v2: - Fix typo in commit message
- Add Fixes and Cc: stable.--- drivers/mailbox/zynqmp-ipi-mailbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/mailbox/ renamed from drivers/mailbox/zynqmp-ipi-mailbox.c +0
-0
zynqmp-ipi-mailbox.c
indexaa5249da59b2..0c143beaafda100644drivers/mailbox/zynqmp-ipi-mailbox.c +1
-1@@ -905,7 +905,7 @@ static int zynqmp_ipi_probe(struct platform_device *pdev) {struct device *dev = &pdev->dev;struct device_node *nc, *np = pdev->dev.of_node; -struct zynqmp_ipi_pdata __percpu *pdata; +struct zynqmp_ipi_pdata *pdata;struct of_phandle_args out_irq;struct zynqmp_ipi_mbox *mbox;Quoted 1 line
int num_mboxes, ret = -EINVAL;Tanmay: Please take a look
I think this patch is correct. Pdata structure is allocated only once not for every CPU and marking here is not correct. Information from
zynqmp_ipi_pdataare likely fixed and the same for every CPU. Only IRQ handling is done per cpu basis but that's it.Reviewed-by Michal Simek <[email protected]>Thanks,
Michal
Quoted 8 lines · Uros Bizjak
Quoted 2 lines · Tanmay Shah
Reviewed-by Tanmay Shah <[email protected]>Is there anything else expected from me to move this patch forward?
Uros.
Not from my side. I am not sure workflow for this subsystem but, I believe this needs RB from Jassi. (subsystem maintainer).
Quoted 74 lines
Quoted 74 lines · Michal Simek
Quoted 71 lines · Uros Bizjak
Quoted 54 lines
struct
zynqmp_ipi_pdata__percpu*pdata is not a per-cpu variable, so it should not be annotated with__percpuannotation.Remove invalid
__percpuannotation to fix severalzynqmp-ipi-mailbox.c:920:15: warning: incorrect type in assignment (different address spaces)
zynqmp-ipi-mailbox.c:920:15: expected structzynqmp_ipi_pdata
[noderef]__percpu*pdata
zynqmp-ipi-mailbox.c:920:15: got void *
zynqmp-ipi-mailbox.c:927:56: warning: incorrect type in argument 3 (different address spaces)
zynqmp-ipi-mailbox.c:927:56: expected unsigned int [usertype]*out_value
zynqmp-ipi-mailbox.c:927:56: got unsigned int [noderef]__percpu*
...and several
drivers/mailbox/zynqmp-ipi-mailbox.c:924:9: warning: dereference of noderef expression
...sparse warnings.
There were no changes in the resulting object file.
Fixes 6ffb1635341b ("mailbox: zynqmp: handle SGI for shared IPI")Signed-off-by Uros Bizjak <[email protected]>Cc Jassi Brar <[email protected]>Cc Michal Simek <[email protected]>Cc Tanmay Shah <[email protected]>---
v2: - Fix typo in commit message
- Add Fixes and Cc: stable.--- drivers/mailbox/zynqmp-ipi-mailbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/mailbox/ renamed from drivers/mailbox/zynqmp-ipi-mailbox.c +0
-0
zynqmp-ipi-mailbox.c
indexaa5249da59b2..0c143beaafda100644drivers/mailbox/zynqmp-ipi-mailbox.c +1
-1@@ -905,7 +905,7 @@ static int zynqmp_ipi_probe(struct platform_device *pdev) {struct device *dev = &pdev->dev;struct device_node *nc, *np = pdev->dev.of_node; -struct zynqmp_ipi_pdata __percpu *pdata; +struct zynqmp_ipi_pdata *pdata;struct of_phandle_args out_irq;struct zynqmp_ipi_mbox *mbox;Quoted 1 line
int num_mboxes, ret = -EINVAL;Tanmay: Please take a look
I think this patch is correct. Pdata structure is allocated only once not for every CPU and marking here is not correct. Information from
zynqmp_ipi_pdataare likely fixed and the same for every CPU. Only IRQ handling is done per cpu basis but that's it.Reviewed-by Michal Simek <[email protected]>Thanks,
Michal