* [PATCH 0/6] Fix compilation warnings
@ 2022-10-17 3:21 ` Damien Le Moal
0 siblings, 0 replies; 22+ messages in thread
From: Damien Le Moal @ 2022-10-17 3:21 UTC (permalink / raw)
To: linux-ide
Cc: Arnd Bergmann, linux-arm-kernel, Patrice Chotard,
linux-renesas-soc, Sergey Shtylyov, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team
Several patches for 6.1-fixes to dwiaddress fix compilation warnings
thrown with CC=clang and W=1 and depending on CONFIG_OF settings.
Damien Le Moal (6):
ata: ahci_st: Fix compilation warning
ata: sata_rcar: Fix compilation warning
ata: ahci_brcm: Fix compilation warning
ata: ahci_xgene: Fix compilation warning
ata: ahci_imx: Fix compilation warning
ata: ahci_qoriq: Fix compilation warning
drivers/ata/ahci_brcm.c | 2 +-
drivers/ata/ahci_imx.c | 2 +-
drivers/ata/ahci_qoriq.c | 2 +-
drivers/ata/ahci_st.c | 2 +-
drivers/ata/ahci_xgene.c | 2 +-
drivers/ata/sata_rcar.c | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
--
2.37.3
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH 0/6] Fix compilation warnings
@ 2022-10-17 3:21 ` Damien Le Moal
0 siblings, 0 replies; 22+ messages in thread
From: Damien Le Moal @ 2022-10-17 3:21 UTC (permalink / raw)
To: linux-ide
Cc: Arnd Bergmann, linux-arm-kernel, Patrice Chotard,
linux-renesas-soc, Sergey Shtylyov, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team
Several patches for 6.1-fixes to dwiaddress fix compilation warnings
thrown with CC=clang and W=1 and depending on CONFIG_OF settings.
Damien Le Moal (6):
ata: ahci_st: Fix compilation warning
ata: sata_rcar: Fix compilation warning
ata: ahci_brcm: Fix compilation warning
ata: ahci_xgene: Fix compilation warning
ata: ahci_imx: Fix compilation warning
ata: ahci_qoriq: Fix compilation warning
drivers/ata/ahci_brcm.c | 2 +-
drivers/ata/ahci_imx.c | 2 +-
drivers/ata/ahci_qoriq.c | 2 +-
drivers/ata/ahci_st.c | 2 +-
drivers/ata/ahci_xgene.c | 2 +-
drivers/ata/sata_rcar.c | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
--
2.37.3
_______________________________________________
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] 22+ messages in thread
* [PATCH 1/6] ata: ahci_st: Fix compilation warning
2022-10-17 3:21 ` Damien Le Moal
@ 2022-10-17 3:22 ` Damien Le Moal
-1 siblings, 0 replies; 22+ messages in thread
From: Damien Le Moal @ 2022-10-17 3:22 UTC (permalink / raw)
To: linux-ide
Cc: Arnd Bergmann, linux-arm-kernel, Patrice Chotard,
linux-renesas-soc, Sergey Shtylyov, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team
If CONFIG_OF is disabled and the ahci_st driver is builtin (or
CONFIG_MODULES is disabled), then using the macro of_match_ptr()
results in the st_ahci_match variable being unused, which generates a
compilation warning and a compilation error if CONFIG_WERROR is enabled.
Fix this by directly assigning st_ahci_match to .of_match_table in the
st_ahci_driver platform driver definition.
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
---
drivers/ata/ahci_st.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ata/ahci_st.c b/drivers/ata/ahci_st.c
index 5a2cac60a29a..8607b68eee53 100644
--- a/drivers/ata/ahci_st.c
+++ b/drivers/ata/ahci_st.c
@@ -236,7 +236,7 @@ static struct platform_driver st_ahci_driver = {
.driver = {
.name = DRV_NAME,
.pm = &st_ahci_pm_ops,
- .of_match_table = of_match_ptr(st_ahci_match),
+ .of_match_table = st_ahci_match,
},
.probe = st_ahci_probe,
.remove = ata_platform_remove_one,
--
2.37.3
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 1/6] ata: ahci_st: Fix compilation warning
@ 2022-10-17 3:22 ` Damien Le Moal
0 siblings, 0 replies; 22+ messages in thread
From: Damien Le Moal @ 2022-10-17 3:22 UTC (permalink / raw)
To: linux-ide
Cc: Arnd Bergmann, linux-arm-kernel, Patrice Chotard,
linux-renesas-soc, Sergey Shtylyov, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team
If CONFIG_OF is disabled and the ahci_st driver is builtin (or
CONFIG_MODULES is disabled), then using the macro of_match_ptr()
results in the st_ahci_match variable being unused, which generates a
compilation warning and a compilation error if CONFIG_WERROR is enabled.
Fix this by directly assigning st_ahci_match to .of_match_table in the
st_ahci_driver platform driver definition.
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
---
drivers/ata/ahci_st.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ata/ahci_st.c b/drivers/ata/ahci_st.c
index 5a2cac60a29a..8607b68eee53 100644
--- a/drivers/ata/ahci_st.c
+++ b/drivers/ata/ahci_st.c
@@ -236,7 +236,7 @@ static struct platform_driver st_ahci_driver = {
.driver = {
.name = DRV_NAME,
.pm = &st_ahci_pm_ops,
- .of_match_table = of_match_ptr(st_ahci_match),
+ .of_match_table = st_ahci_match,
},
.probe = st_ahci_probe,
.remove = ata_platform_remove_one,
--
2.37.3
_______________________________________________
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] 22+ messages in thread
* [PATCH 2/6] ata: sata_rcar: Fix compilation warning
2022-10-17 3:21 ` Damien Le Moal
@ 2022-10-17 3:22 ` Damien Le Moal
-1 siblings, 0 replies; 22+ messages in thread
From: Damien Le Moal @ 2022-10-17 3:22 UTC (permalink / raw)
To: linux-ide
Cc: Arnd Bergmann, linux-arm-kernel, Patrice Chotard,
linux-renesas-soc, Sergey Shtylyov, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team
When compiling with clang and W=1, the following warning is generated:
drivers/ata/sata_rcar.c:878:15: error: cast to smaller integer type
'enum sata_rcar_type' from 'const void *'
[-Werror,-Wvoid-pointer-to-enum-cast]
priv->type = (enum sata_rcar_type)of_device_get_match_data(dev);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fix this by using a cast to unsigned long to match the "void *" type
size returned by of_device_get_match_data().
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
---
drivers/ata/sata_rcar.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ata/sata_rcar.c b/drivers/ata/sata_rcar.c
index 590ebea99601..0195eb29f6c2 100644
--- a/drivers/ata/sata_rcar.c
+++ b/drivers/ata/sata_rcar.c
@@ -875,7 +875,7 @@ static int sata_rcar_probe(struct platform_device *pdev)
if (!priv)
return -ENOMEM;
- priv->type = (enum sata_rcar_type)of_device_get_match_data(dev);
+ priv->type = (unsigned long)of_device_get_match_data(dev);
pm_runtime_enable(dev);
ret = pm_runtime_get_sync(dev);
--
2.37.3
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 2/6] ata: sata_rcar: Fix compilation warning
@ 2022-10-17 3:22 ` Damien Le Moal
0 siblings, 0 replies; 22+ messages in thread
From: Damien Le Moal @ 2022-10-17 3:22 UTC (permalink / raw)
To: linux-ide
Cc: Arnd Bergmann, linux-arm-kernel, Patrice Chotard,
linux-renesas-soc, Sergey Shtylyov, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team
When compiling with clang and W=1, the following warning is generated:
drivers/ata/sata_rcar.c:878:15: error: cast to smaller integer type
'enum sata_rcar_type' from 'const void *'
[-Werror,-Wvoid-pointer-to-enum-cast]
priv->type = (enum sata_rcar_type)of_device_get_match_data(dev);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fix this by using a cast to unsigned long to match the "void *" type
size returned by of_device_get_match_data().
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
---
drivers/ata/sata_rcar.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ata/sata_rcar.c b/drivers/ata/sata_rcar.c
index 590ebea99601..0195eb29f6c2 100644
--- a/drivers/ata/sata_rcar.c
+++ b/drivers/ata/sata_rcar.c
@@ -875,7 +875,7 @@ static int sata_rcar_probe(struct platform_device *pdev)
if (!priv)
return -ENOMEM;
- priv->type = (enum sata_rcar_type)of_device_get_match_data(dev);
+ priv->type = (unsigned long)of_device_get_match_data(dev);
pm_runtime_enable(dev);
ret = pm_runtime_get_sync(dev);
--
2.37.3
_______________________________________________
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] 22+ messages in thread
* [PATCH 3/6] ata: ahci_brcm: Fix compilation warning
2022-10-17 3:21 ` Damien Le Moal
@ 2022-10-17 3:22 ` Damien Le Moal
-1 siblings, 0 replies; 22+ messages in thread
From: Damien Le Moal @ 2022-10-17 3:22 UTC (permalink / raw)
To: linux-ide
Cc: Arnd Bergmann, linux-arm-kernel, Patrice Chotard,
linux-renesas-soc, Sergey Shtylyov, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team
When compiling with clang and W=1, the following warning is generated:
drivers/ata/ahci_brcm.c:451:18: error: cast to smaller integer type
'enum brcm_ahci_version' from 'const void *'
[-Werror,-Wvoid-pointer-to-enum-cast]
priv->version = (enum brcm_ahci_version)of_id->data;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fix this by using a cast to unsigned long to match the "void *" type
size of of_id->data.
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
---
drivers/ata/ahci_brcm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ata/ahci_brcm.c b/drivers/ata/ahci_brcm.c
index f61795c546cf..6f216eb25610 100644
--- a/drivers/ata/ahci_brcm.c
+++ b/drivers/ata/ahci_brcm.c
@@ -448,7 +448,7 @@ static int brcm_ahci_probe(struct platform_device *pdev)
if (!of_id)
return -ENODEV;
- priv->version = (enum brcm_ahci_version)of_id->data;
+ priv->version = (unsigned long)of_id->data;
priv->dev = dev;
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "top-ctrl");
--
2.37.3
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 3/6] ata: ahci_brcm: Fix compilation warning
@ 2022-10-17 3:22 ` Damien Le Moal
0 siblings, 0 replies; 22+ messages in thread
From: Damien Le Moal @ 2022-10-17 3:22 UTC (permalink / raw)
To: linux-ide
Cc: Arnd Bergmann, linux-arm-kernel, Patrice Chotard,
linux-renesas-soc, Sergey Shtylyov, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team
When compiling with clang and W=1, the following warning is generated:
drivers/ata/ahci_brcm.c:451:18: error: cast to smaller integer type
'enum brcm_ahci_version' from 'const void *'
[-Werror,-Wvoid-pointer-to-enum-cast]
priv->version = (enum brcm_ahci_version)of_id->data;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fix this by using a cast to unsigned long to match the "void *" type
size of of_id->data.
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
---
drivers/ata/ahci_brcm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ata/ahci_brcm.c b/drivers/ata/ahci_brcm.c
index f61795c546cf..6f216eb25610 100644
--- a/drivers/ata/ahci_brcm.c
+++ b/drivers/ata/ahci_brcm.c
@@ -448,7 +448,7 @@ static int brcm_ahci_probe(struct platform_device *pdev)
if (!of_id)
return -ENODEV;
- priv->version = (enum brcm_ahci_version)of_id->data;
+ priv->version = (unsigned long)of_id->data;
priv->dev = dev;
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "top-ctrl");
--
2.37.3
_______________________________________________
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] 22+ messages in thread
* [PATCH 4/6] ata: ahci_xgene: Fix compilation warning
2022-10-17 3:21 ` Damien Le Moal
@ 2022-10-17 3:22 ` Damien Le Moal
-1 siblings, 0 replies; 22+ messages in thread
From: Damien Le Moal @ 2022-10-17 3:22 UTC (permalink / raw)
To: linux-ide
Cc: Arnd Bergmann, linux-arm-kernel, Patrice Chotard,
linux-renesas-soc, Sergey Shtylyov, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team
When compiling with clang and W=1, the following warning is generated:
drivers/ata/ahci_xgene.c:788:14: error: cast to smaller integer type
'enum xgene_ahci_version' from 'const void *'
[-Werror,-Wvoid-pointer-to-enum-cast]
version = (enum xgene_ahci_version) of_devid->data;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fix this by using a cast to unsigned long to match the "void *" type
size of of_devid->data.
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
---
drivers/ata/ahci_xgene.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ata/ahci_xgene.c b/drivers/ata/ahci_xgene.c
index 7bb5db17f864..1e08704d5117 100644
--- a/drivers/ata/ahci_xgene.c
+++ b/drivers/ata/ahci_xgene.c
@@ -785,7 +785,7 @@ static int xgene_ahci_probe(struct platform_device *pdev)
of_devid = of_match_device(xgene_ahci_of_match, dev);
if (of_devid) {
if (of_devid->data)
- version = (enum xgene_ahci_version) of_devid->data;
+ version = (unsigned long) of_devid->data;
}
#ifdef CONFIG_ACPI
else {
--
2.37.3
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 4/6] ata: ahci_xgene: Fix compilation warning
@ 2022-10-17 3:22 ` Damien Le Moal
0 siblings, 0 replies; 22+ messages in thread
From: Damien Le Moal @ 2022-10-17 3:22 UTC (permalink / raw)
To: linux-ide
Cc: Arnd Bergmann, linux-arm-kernel, Patrice Chotard,
linux-renesas-soc, Sergey Shtylyov, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team
When compiling with clang and W=1, the following warning is generated:
drivers/ata/ahci_xgene.c:788:14: error: cast to smaller integer type
'enum xgene_ahci_version' from 'const void *'
[-Werror,-Wvoid-pointer-to-enum-cast]
version = (enum xgene_ahci_version) of_devid->data;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fix this by using a cast to unsigned long to match the "void *" type
size of of_devid->data.
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
---
drivers/ata/ahci_xgene.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ata/ahci_xgene.c b/drivers/ata/ahci_xgene.c
index 7bb5db17f864..1e08704d5117 100644
--- a/drivers/ata/ahci_xgene.c
+++ b/drivers/ata/ahci_xgene.c
@@ -785,7 +785,7 @@ static int xgene_ahci_probe(struct platform_device *pdev)
of_devid = of_match_device(xgene_ahci_of_match, dev);
if (of_devid) {
if (of_devid->data)
- version = (enum xgene_ahci_version) of_devid->data;
+ version = (unsigned long) of_devid->data;
}
#ifdef CONFIG_ACPI
else {
--
2.37.3
_______________________________________________
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] 22+ messages in thread
* [PATCH 5/6] ata: ahci_imx: Fix compilation warning
2022-10-17 3:21 ` Damien Le Moal
@ 2022-10-17 3:22 ` Damien Le Moal
-1 siblings, 0 replies; 22+ messages in thread
From: Damien Le Moal @ 2022-10-17 3:22 UTC (permalink / raw)
To: linux-ide
Cc: Arnd Bergmann, linux-arm-kernel, Patrice Chotard,
linux-renesas-soc, Sergey Shtylyov, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team
When compiling with clang and W=1, the following warning is generated:
drivers/ata/ahci_imx.c:1070:18: error: cast to smaller integer type
'enum ahci_imx_type' from 'const void *'
[-Werror,-Wvoid-pointer-to-enum-cast]
imxpriv->type = (enum ahci_imx_type)of_id->data;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fix this by using a cast to unsigned long to match the "void *" type
size of of_id->data.
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
---
drivers/ata/ahci_imx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ata/ahci_imx.c b/drivers/ata/ahci_imx.c
index 632caa301458..a950767f7948 100644
--- a/drivers/ata/ahci_imx.c
+++ b/drivers/ata/ahci_imx.c
@@ -1067,7 +1067,7 @@ static int imx_ahci_probe(struct platform_device *pdev)
imxpriv->ahci_pdev = pdev;
imxpriv->no_device = false;
imxpriv->first_time = true;
- imxpriv->type = (enum ahci_imx_type)of_id->data;
+ imxpriv->type = (unsigned long)of_id->data;
imxpriv->sata_clk = devm_clk_get(dev, "sata");
if (IS_ERR(imxpriv->sata_clk)) {
--
2.37.3
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 5/6] ata: ahci_imx: Fix compilation warning
@ 2022-10-17 3:22 ` Damien Le Moal
0 siblings, 0 replies; 22+ messages in thread
From: Damien Le Moal @ 2022-10-17 3:22 UTC (permalink / raw)
To: linux-ide
Cc: Arnd Bergmann, linux-arm-kernel, Patrice Chotard,
linux-renesas-soc, Sergey Shtylyov, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team
When compiling with clang and W=1, the following warning is generated:
drivers/ata/ahci_imx.c:1070:18: error: cast to smaller integer type
'enum ahci_imx_type' from 'const void *'
[-Werror,-Wvoid-pointer-to-enum-cast]
imxpriv->type = (enum ahci_imx_type)of_id->data;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fix this by using a cast to unsigned long to match the "void *" type
size of of_id->data.
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
---
drivers/ata/ahci_imx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ata/ahci_imx.c b/drivers/ata/ahci_imx.c
index 632caa301458..a950767f7948 100644
--- a/drivers/ata/ahci_imx.c
+++ b/drivers/ata/ahci_imx.c
@@ -1067,7 +1067,7 @@ static int imx_ahci_probe(struct platform_device *pdev)
imxpriv->ahci_pdev = pdev;
imxpriv->no_device = false;
imxpriv->first_time = true;
- imxpriv->type = (enum ahci_imx_type)of_id->data;
+ imxpriv->type = (unsigned long)of_id->data;
imxpriv->sata_clk = devm_clk_get(dev, "sata");
if (IS_ERR(imxpriv->sata_clk)) {
--
2.37.3
_______________________________________________
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] 22+ messages in thread
* [PATCH 6/6] ata: ahci_qoriq: Fix compilation warning
2022-10-17 3:21 ` Damien Le Moal
@ 2022-10-17 3:22 ` Damien Le Moal
-1 siblings, 0 replies; 22+ messages in thread
From: Damien Le Moal @ 2022-10-17 3:22 UTC (permalink / raw)
To: linux-ide
Cc: Arnd Bergmann, linux-arm-kernel, Patrice Chotard,
linux-renesas-soc, Sergey Shtylyov, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team
When compiling with clang and W=1, the following warning is generated:
drivers/ata/ahci_qoriq.c:283:22: error: cast to smaller integer type
'enum ahci_qoriq_type' from 'const void *'
[-Werror,-Wvoid-pointer-to-enum-cast]
qoriq_priv->type = (enum ahci_qoriq_type)of_id->data;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fix this by using a cast to unsigned long to match the "void *" type
size of of_id->data.
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
---
drivers/ata/ahci_qoriq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ata/ahci_qoriq.c b/drivers/ata/ahci_qoriq.c
index 6cd61842ad48..9cf9bf36a874 100644
--- a/drivers/ata/ahci_qoriq.c
+++ b/drivers/ata/ahci_qoriq.c
@@ -280,7 +280,7 @@ static int ahci_qoriq_probe(struct platform_device *pdev)
return -ENOMEM;
if (of_id)
- qoriq_priv->type = (enum ahci_qoriq_type)of_id->data;
+ qoriq_priv->type = (unsigned long)of_id->data;
else
qoriq_priv->type = (enum ahci_qoriq_type)acpi_id->driver_data;
--
2.37.3
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 6/6] ata: ahci_qoriq: Fix compilation warning
@ 2022-10-17 3:22 ` Damien Le Moal
0 siblings, 0 replies; 22+ messages in thread
From: Damien Le Moal @ 2022-10-17 3:22 UTC (permalink / raw)
To: linux-ide
Cc: Arnd Bergmann, linux-arm-kernel, Patrice Chotard,
linux-renesas-soc, Sergey Shtylyov, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team
When compiling with clang and W=1, the following warning is generated:
drivers/ata/ahci_qoriq.c:283:22: error: cast to smaller integer type
'enum ahci_qoriq_type' from 'const void *'
[-Werror,-Wvoid-pointer-to-enum-cast]
qoriq_priv->type = (enum ahci_qoriq_type)of_id->data;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fix this by using a cast to unsigned long to match the "void *" type
size of of_id->data.
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
---
drivers/ata/ahci_qoriq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ata/ahci_qoriq.c b/drivers/ata/ahci_qoriq.c
index 6cd61842ad48..9cf9bf36a874 100644
--- a/drivers/ata/ahci_qoriq.c
+++ b/drivers/ata/ahci_qoriq.c
@@ -280,7 +280,7 @@ static int ahci_qoriq_probe(struct platform_device *pdev)
return -ENOMEM;
if (of_id)
- qoriq_priv->type = (enum ahci_qoriq_type)of_id->data;
+ qoriq_priv->type = (unsigned long)of_id->data;
else
qoriq_priv->type = (enum ahci_qoriq_type)acpi_id->driver_data;
--
2.37.3
_______________________________________________
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] 22+ messages in thread
* Re: [PATCH 2/6] ata: sata_rcar: Fix compilation warning
2022-10-17 3:22 ` Damien Le Moal
@ 2022-10-17 7:13 ` Geert Uytterhoeven
-1 siblings, 0 replies; 22+ messages in thread
From: Geert Uytterhoeven @ 2022-10-17 7:13 UTC (permalink / raw)
To: Damien Le Moal
Cc: linux-ide, Arnd Bergmann, linux-arm-kernel, Patrice Chotard,
linux-renesas-soc, Sergey Shtylyov, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team
Hi Damien,
On Mon, Oct 17, 2022 at 5:22 AM Damien Le Moal
<damien.lemoal@opensource.wdc.com> wrote:
> When compiling with clang and W=1, the following warning is generated:
>
> drivers/ata/sata_rcar.c:878:15: error: cast to smaller integer type
> 'enum sata_rcar_type' from 'const void *'
> [-Werror,-Wvoid-pointer-to-enum-cast]
> priv->type = (enum sata_rcar_type)of_device_get_match_data(dev);
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Fix this by using a cast to unsigned long to match the "void *" type
> size returned by of_device_get_match_data().
>
> Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Modulo bike-shedding about "uintptr_t" vs. "unsigned long".
I'd prefer the former (the road to Zettalinux?), but Linus prefers the latter.
> --- a/drivers/ata/sata_rcar.c
> +++ b/drivers/ata/sata_rcar.c
> @@ -875,7 +875,7 @@ static int sata_rcar_probe(struct platform_device *pdev)
> if (!priv)
> return -ENOMEM;
>
> - priv->type = (enum sata_rcar_type)of_device_get_match_data(dev);
> + priv->type = (unsigned long)of_device_get_match_data(dev);
>
> pm_runtime_enable(dev);
> ret = pm_runtime_get_sync(dev);
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 2/6] ata: sata_rcar: Fix compilation warning
@ 2022-10-17 7:13 ` Geert Uytterhoeven
0 siblings, 0 replies; 22+ messages in thread
From: Geert Uytterhoeven @ 2022-10-17 7:13 UTC (permalink / raw)
To: Damien Le Moal
Cc: linux-ide, Arnd Bergmann, linux-arm-kernel, Patrice Chotard,
linux-renesas-soc, Sergey Shtylyov, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team
Hi Damien,
On Mon, Oct 17, 2022 at 5:22 AM Damien Le Moal
<damien.lemoal@opensource.wdc.com> wrote:
> When compiling with clang and W=1, the following warning is generated:
>
> drivers/ata/sata_rcar.c:878:15: error: cast to smaller integer type
> 'enum sata_rcar_type' from 'const void *'
> [-Werror,-Wvoid-pointer-to-enum-cast]
> priv->type = (enum sata_rcar_type)of_device_get_match_data(dev);
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Fix this by using a cast to unsigned long to match the "void *" type
> size returned by of_device_get_match_data().
>
> Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Modulo bike-shedding about "uintptr_t" vs. "unsigned long".
I'd prefer the former (the road to Zettalinux?), but Linus prefers the latter.
> --- a/drivers/ata/sata_rcar.c
> +++ b/drivers/ata/sata_rcar.c
> @@ -875,7 +875,7 @@ static int sata_rcar_probe(struct platform_device *pdev)
> if (!priv)
> return -ENOMEM;
>
> - priv->type = (enum sata_rcar_type)of_device_get_match_data(dev);
> + priv->type = (unsigned long)of_device_get_match_data(dev);
>
> pm_runtime_enable(dev);
> ret = pm_runtime_get_sync(dev);
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
_______________________________________________
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] 22+ messages in thread
* Re: [PATCH 0/6] Fix compilation warnings
2022-10-17 3:21 ` Damien Le Moal
@ 2022-10-17 7:25 ` Arnd Bergmann
-1 siblings, 0 replies; 22+ messages in thread
From: Arnd Bergmann @ 2022-10-17 7:25 UTC (permalink / raw)
To: Damien Le Moal, linux-ide
Cc: linux-arm-kernel, Patrice Chotard, Linux-Renesas,
Sergey Shtylyov, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team
On Mon, Oct 17, 2022, at 5:21 AM, Damien Le Moal wrote:
> Several patches for 6.1-fixes to dwiaddress fix compilation warnings
> thrown with CC=clang and W=1 and depending on CONFIG_OF settings.
>
> Damien Le Moal (6):
> ata: ahci_st: Fix compilation warning
> ata: sata_rcar: Fix compilation warning
> ata: ahci_brcm: Fix compilation warning
> ata: ahci_xgene: Fix compilation warning
> ata: ahci_imx: Fix compilation warning
> ata: ahci_qoriq: Fix compilation warning
Whole series
Acked-by: Arnd Bergmann <arnd@arndb.de>
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 0/6] Fix compilation warnings
@ 2022-10-17 7:25 ` Arnd Bergmann
0 siblings, 0 replies; 22+ messages in thread
From: Arnd Bergmann @ 2022-10-17 7:25 UTC (permalink / raw)
To: Damien Le Moal, linux-ide
Cc: linux-arm-kernel, Patrice Chotard, Linux-Renesas,
Sergey Shtylyov, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team
On Mon, Oct 17, 2022, at 5:21 AM, Damien Le Moal wrote:
> Several patches for 6.1-fixes to dwiaddress fix compilation warnings
> thrown with CC=clang and W=1 and depending on CONFIG_OF settings.
>
> Damien Le Moal (6):
> ata: ahci_st: Fix compilation warning
> ata: sata_rcar: Fix compilation warning
> ata: ahci_brcm: Fix compilation warning
> ata: ahci_xgene: Fix compilation warning
> ata: ahci_imx: Fix compilation warning
> ata: ahci_qoriq: Fix compilation warning
Whole series
Acked-by: Arnd Bergmann <arnd@arndb.de>
_______________________________________________
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] 22+ messages in thread
* Re: [PATCH 2/6] ata: sata_rcar: Fix compilation warning
2022-10-17 3:22 ` Damien Le Moal
@ 2022-10-17 19:08 ` Sergey Shtylyov
-1 siblings, 0 replies; 22+ messages in thread
From: Sergey Shtylyov @ 2022-10-17 19:08 UTC (permalink / raw)
To: Damien Le Moal, linux-ide
Cc: Arnd Bergmann, linux-arm-kernel, Patrice Chotard,
linux-renesas-soc, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team
On 10/17/22 6:22 AM, Damien Le Moal wrote:
> When compiling with clang and W=1, the following warning is generated:
>
> drivers/ata/sata_rcar.c:878:15: error: cast to smaller integer type
> 'enum sata_rcar_type' from 'const void *'
> [-Werror,-Wvoid-pointer-to-enum-cast]
> priv->type = (enum sata_rcar_type)of_device_get_match_data(dev);
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Fix this by using a cast to unsigned long to match the "void *" type
> size returned by of_device_get_match_data().
>
> Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
[...]
MBR, Sergey
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 2/6] ata: sata_rcar: Fix compilation warning
@ 2022-10-17 19:08 ` Sergey Shtylyov
0 siblings, 0 replies; 22+ messages in thread
From: Sergey Shtylyov @ 2022-10-17 19:08 UTC (permalink / raw)
To: Damien Le Moal, linux-ide
Cc: Arnd Bergmann, linux-arm-kernel, Patrice Chotard,
linux-renesas-soc, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team
On 10/17/22 6:22 AM, Damien Le Moal wrote:
> When compiling with clang and W=1, the following warning is generated:
>
> drivers/ata/sata_rcar.c:878:15: error: cast to smaller integer type
> 'enum sata_rcar_type' from 'const void *'
> [-Werror,-Wvoid-pointer-to-enum-cast]
> priv->type = (enum sata_rcar_type)of_device_get_match_data(dev);
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Fix this by using a cast to unsigned long to match the "void *" type
> size returned by of_device_get_match_data().
>
> Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
[...]
MBR, Sergey
_______________________________________________
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] 22+ messages in thread
* Re: [PATCH 3/6] ata: ahci_brcm: Fix compilation warning
2022-10-17 3:22 ` Damien Le Moal
@ 2022-10-17 19:57 ` Florian Fainelli
-1 siblings, 0 replies; 22+ messages in thread
From: Florian Fainelli @ 2022-10-17 19:57 UTC (permalink / raw)
To: Damien Le Moal, linux-ide
Cc: Arnd Bergmann, linux-arm-kernel, Patrice Chotard,
linux-renesas-soc, Sergey Shtylyov, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team
On 10/16/22 20:22, Damien Le Moal wrote:
> When compiling with clang and W=1, the following warning is generated:
>
> drivers/ata/ahci_brcm.c:451:18: error: cast to smaller integer type
> 'enum brcm_ahci_version' from 'const void *'
> [-Werror,-Wvoid-pointer-to-enum-cast]
> priv->version = (enum brcm_ahci_version)of_id->data;
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Fix this by using a cast to unsigned long to match the "void *" type
> size of of_id->data.
>
> Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Acked-bby: Florian Fainelli <f.fainelli@gmail.com>
--
Florian
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 3/6] ata: ahci_brcm: Fix compilation warning
@ 2022-10-17 19:57 ` Florian Fainelli
0 siblings, 0 replies; 22+ messages in thread
From: Florian Fainelli @ 2022-10-17 19:57 UTC (permalink / raw)
To: Damien Le Moal, linux-ide
Cc: Arnd Bergmann, linux-arm-kernel, Patrice Chotard,
linux-renesas-soc, Sergey Shtylyov, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team
On 10/16/22 20:22, Damien Le Moal wrote:
> When compiling with clang and W=1, the following warning is generated:
>
> drivers/ata/ahci_brcm.c:451:18: error: cast to smaller integer type
> 'enum brcm_ahci_version' from 'const void *'
> [-Werror,-Wvoid-pointer-to-enum-cast]
> priv->version = (enum brcm_ahci_version)of_id->data;
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Fix this by using a cast to unsigned long to match the "void *" type
> size of of_id->data.
>
> Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Acked-bby: Florian Fainelli <f.fainelli@gmail.com>
--
Florian
_______________________________________________
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] 22+ messages in thread
end of thread, other threads:[~2022-10-17 19:58 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-17 3:21 [PATCH 0/6] Fix compilation warnings Damien Le Moal
2022-10-17 3:21 ` Damien Le Moal
2022-10-17 3:22 ` [PATCH 1/6] ata: ahci_st: Fix compilation warning Damien Le Moal
2022-10-17 3:22 ` Damien Le Moal
2022-10-17 3:22 ` [PATCH 2/6] ata: sata_rcar: " Damien Le Moal
2022-10-17 3:22 ` Damien Le Moal
2022-10-17 7:13 ` Geert Uytterhoeven
2022-10-17 7:13 ` Geert Uytterhoeven
2022-10-17 19:08 ` Sergey Shtylyov
2022-10-17 19:08 ` Sergey Shtylyov
2022-10-17 3:22 ` [PATCH 3/6] ata: ahci_brcm: " Damien Le Moal
2022-10-17 3:22 ` Damien Le Moal
2022-10-17 19:57 ` Florian Fainelli
2022-10-17 19:57 ` Florian Fainelli
2022-10-17 3:22 ` [PATCH 4/6] ata: ahci_xgene: " Damien Le Moal
2022-10-17 3:22 ` Damien Le Moal
2022-10-17 3:22 ` [PATCH 5/6] ata: ahci_imx: " Damien Le Moal
2022-10-17 3:22 ` Damien Le Moal
2022-10-17 3:22 ` [PATCH 6/6] ata: ahci_qoriq: " Damien Le Moal
2022-10-17 3:22 ` Damien Le Moal
2022-10-17 7:25 ` [PATCH 0/6] Fix compilation warnings Arnd Bergmann
2022-10-17 7:25 ` Arnd Bergmann
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.