The member "data" of structure of_device_id is changed to const
pointer. Hence initializing this with const type data.
This will fix the compilation warning like
drivers/dma/tegra20-apb-dma.c:1217:9: warning: assignment discards 'const' qualifier from
pointer target type [enabled by default]
This warning came after the change
---------
commit 98d7bbb9929bcc14e11ac8a55245a4f2dc174e17
Author: Uwe Kleine-König [off-list ref]
of: add const to struct *of_device_id.data
---------
Signed-off-by: Laxman Dewangan <redacted>
Acked-by: Stephen Warren <redacted>
Acked-by: Vinod Koul <vinod.koul-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
---
Resending patch to Uwe and adding ack from Stephen and Vinod.
Fix typo in description.
drivers/dma/tegra20-apb-dma.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
@@ -201,7 +201,7 @@ struct tegra_dma {structclk*dma_clk;spinlock_tglobal_lock;void__iomem*base_addr;-structtegra_dma_chip_data*chip_data;+conststructtegra_dma_chip_data*chip_data;/* Some register need to be cache before suspend */u32reg_gen;
@@ -1173,14 +1173,14 @@ static void tegra_dma_free_chan_resources(struct dma_chan *dc)}/* Tegra20 specific DMA controller information */-staticstructtegra_dma_chip_datategra20_dma_chip_data={+staticconststructtegra_dma_chip_datategra20_dma_chip_data={.nr_channels=16,.max_dma_count=1024UL*64,};#if defined(CONFIG_OF)/* Tegra30 specific DMA controller information */-staticstructtegra_dma_chip_datategra30_dma_chip_data={+staticconststructtegra_dma_chip_datategra30_dma_chip_data={.nr_channels=32,.max_dma_count=1024UL*64,};
@@ -1204,7 +1204,7 @@ static int __devinit tegra_dma_probe(struct platform_device *pdev)structtegra_dma*tdma;intret;inti;-structtegra_dma_chip_data*cdata=NULL;+conststructtegra_dma_chip_data*cdata=NULL;if(pdev->dev.of_node){conststructof_device_id*match;
Hello,
On Wed, Aug 29, 2012 at 10:47:27AM +0530, Laxman Dewangan wrote:
The member "data" of structure of_device_id is changed to const
pointer. Hence initializing this with const type data.
This will fix the compilation warning like
drivers/dma/tegra20-apb-dma.c:1217:9: warning: assignment discards 'const' qualifier from
pointer target type [enabled by default]
This warning came after the change
---------
commit 98d7bbb9929bcc14e11ac8a55245a4f2dc174e17
Author: Uwe Kleine-König [off-list ref]
of: add const to struct *of_device_id.data
---------
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Acked-by: Stephen Warren <redacted>
Acked-by: Vinod Koul <redacted>
I took the patch into my series now and split it in two to prevent
warnings in the middle of the series. I assumed the two acks for both
patches and send them in a moment in reply to this mail.
You can find the updated series
git://git.pengutronix.de/git/ukl/linux.git ofdeviceiddata
Arnd or Olof, can you please update the corresponding branch arm-soc
from there?
Best regards and thanks
Uwe
From: Laxman Dewangan <ldewangan@nvidia.com>
This prepares *of_device_id.data becoming const. Without this change
the following warning would occur:
drivers/dma/tegra20-apb-dma.c: In function 'tegra_dma_probe':
drivers/dma/tegra20-apb-dma.c:1210:9: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
[ukl: split Laxman's patch to prevent warnings in the middle of the
series. Original patch was sent with msgid
1346217447-19730-1-git-send-email-ldewangan@nvidia.com]
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Acked-by: Stephen Warren <redacted>
Acked-by: Vinod Koul <redacted>
Signed-off-by: Uwe Kleine-König <redacted>
---
drivers/dma/tegra20-apb-dma.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
@@ -201,7 +201,7 @@ struct tegra_dma {structclk*dma_clk;spinlock_tglobal_lock;void__iomem*base_addr;-structtegra_dma_chip_data*chip_data;+conststructtegra_dma_chip_data*chip_data;/* Some register need to be cache before suspend */u32reg_gen;
@@ -1197,7 +1197,7 @@ static int __devinit tegra_dma_probe(struct platform_device *pdev)structtegra_dma*tdma;intret;inti;-structtegra_dma_chip_data*cdata=NULL;+conststructtegra_dma_chip_data*cdata=NULL;if(pdev->dev.of_node){conststructof_device_id*match;
From: Laxman Dewangan <redacted>
Since of_device_id.data is declared as a pointer to const data a few
more consts can be added in this driver.
[ukl: split Laxman's patch to prevent warnings in the middle of the
series. Original patch was sent with msgid
1346217447-19730-1-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org]
Signed-off-by: Laxman Dewangan <redacted>
Acked-by: Stephen Warren <redacted>
Acked-by: Vinod Koul <vinod.koul-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
Signed-off-by: Uwe Kleine-König <redacted>
---
drivers/dma/tegra20-apb-dma.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
From: Stephen Warren <hidden> Date: 2012-09-10 18:21:15
On 08/29/2012 02:51 AM, Uwe Kleine-König wrote:
From: Laxman Dewangan <redacted>
This prepares *of_device_id.data becoming const. Without this change
the following warning would occur:
drivers/dma/tegra20-apb-dma.c: In function 'tegra_dma_probe':
drivers/dma/tegra20-apb-dma.c:1210:9: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
[ukl: split Laxman's patch to prevent warnings in the middle of the
series. Original patch was sent with msgid
1346217447-19730-1-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org]
Signed-off-by: Laxman Dewangan <redacted>
Acked-by: Stephen Warren <redacted>
Acked-by: Vinod Koul <vinod.koul-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
Signed-off-by: Uwe Kleine-König <redacted>
Uwe,
I don't see these patches in linux-next, so compilation is still broken.
Can you please apply them? Thanks.
On Mon, Sep 10, 2012 at 12:21:09PM -0600, Stephen Warren wrote:
On 08/29/2012 02:51 AM, Uwe Kleine-König wrote:
quoted
From: Laxman Dewangan <ldewangan@nvidia.com>
This prepares *of_device_id.data becoming const. Without this change
the following warning would occur:
drivers/dma/tegra20-apb-dma.c: In function 'tegra_dma_probe':
drivers/dma/tegra20-apb-dma.c:1210:9: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
[ukl: split Laxman's patch to prevent warnings in the middle of the
series. Original patch was sent with msgid
1346217447-19730-1-git-send-email-ldewangan@nvidia.com]
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Acked-by: Stephen Warren <redacted>
Acked-by: Vinod Koul <redacted>
Signed-off-by: Uwe Kleine-König <redacted>
Uwe,
I don't see these patches in linux-next, so compilation is still broken.
Can you please apply them? Thanks.
I have, but my new tree didn't make it into arm-soc. Arnd/Olof, can you
please refetch it?
Thanks
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |