linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dma: tegra: add const to of_device_id.data's structure
@ 2012-08-26 10:14 Laxman Dewangan
  2012-08-27  4:25 ` Stephen Warren
  0 siblings, 1 reply; 4+ messages in thread
From: Laxman Dewangan @ 2012-08-26 10:14 UTC (permalink / raw)
  To: vinod.koul, djbw; +Cc: linux-kernel, linux-tegra, swarren, Laxman Dewangan

The membe "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 <u.kleine-koenig@pengutronix.de>
    of: add const to struct *of_device_id.data
---------

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
---
 drivers/dma/tegra20-apb-dma.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c
index 24acd71..09a15ff 100644
--- a/drivers/dma/tegra20-apb-dma.c
+++ b/drivers/dma/tegra20-apb-dma.c
@@ -201,7 +201,7 @@ struct tegra_dma {
 	struct clk			*dma_clk;
 	spinlock_t			global_lock;
 	void __iomem			*base_addr;
-	struct tegra_dma_chip_data	*chip_data;
+	const struct tegra_dma_chip_data	*chip_data;
 
 	/* Some register need to be cache before suspend */
 	u32				reg_gen;
@@ -1173,14 +1173,14 @@ static void tegra_dma_free_chan_resources(struct dma_chan *dc)
 }
 
 /* Tegra20 specific DMA controller information */
-static struct tegra_dma_chip_data tegra20_dma_chip_data = {
+static const struct tegra_dma_chip_data tegra20_dma_chip_data = {
 	.nr_channels		= 16,
 	.max_dma_count		= 1024UL * 64,
 };
 
 #if defined(CONFIG_OF)
 /* Tegra30 specific DMA controller information */
-static struct tegra_dma_chip_data tegra30_dma_chip_data = {
+static const struct tegra_dma_chip_data tegra30_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)
 	struct tegra_dma *tdma;
 	int ret;
 	int i;
-	struct tegra_dma_chip_data *cdata = NULL;
+	const struct tegra_dma_chip_data *cdata = NULL;
 
 	if (pdev->dev.of_node) {
 		const struct of_device_id *match;
-- 
1.7.1.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] dma: tegra: add const to of_device_id.data's structure
  2012-08-26 10:14 [PATCH] dma: tegra: add const to of_device_id.data's structure Laxman Dewangan
@ 2012-08-27  4:25 ` Stephen Warren
  2012-08-28 18:38   ` Uwe Kleine-König
  2012-08-28 22:08   ` Vinod Koul
  0 siblings, 2 replies; 4+ messages in thread
From: Stephen Warren @ 2012-08-27  4:25 UTC (permalink / raw)
  To: Laxman Dewangan, Uwe Kleine-König
  Cc: vinod.koul, djbw, linux-kernel, linux-tegra

On 08/26/2012 03:14 AM, Laxman Dewangan wrote:
> The membe "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 <u.kleine-koenig@pengutronix.de>
>     of: add const to struct *of_device_id.data
> ---------

Acked-by: Stephen Warren <swarren@wwwdotorg.org>

I wonder if this should go through Uwe's branch that made similar
changes for all other drivers though? Uwe now CC'd.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] dma: tegra: add const to of_device_id.data's structure
  2012-08-27  4:25 ` Stephen Warren
@ 2012-08-28 18:38   ` Uwe Kleine-König
  2012-08-28 22:08   ` Vinod Koul
  1 sibling, 0 replies; 4+ messages in thread
From: Uwe Kleine-König @ 2012-08-28 18:38 UTC (permalink / raw)
  To: Stephen Warren
  Cc: Laxman Dewangan, vinod.koul, djbw, linux-kernel, linux-tegra

On Sun, Aug 26, 2012 at 09:25:26PM -0700, Stephen Warren wrote:
> On 08/26/2012 03:14 AM, Laxman Dewangan wrote:
> > The membe "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 <u.kleine-koenig@pengutronix.de>
> >     of: add const to struct *of_device_id.data
> > ---------
> 
> Acked-by: Stephen Warren <swarren@wwwdotorg.org>
> 
> I wonder if this should go through Uwe's branch that made similar
> changes for all other drivers though? Uwe now CC'd.
If you forward/bounce the patch to me I can include it in my branch. I
wonder if I missed this warning while testing. I did test all arm
defconfigs based on 3.6-rc1.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] dma: tegra: add const to of_device_id.data's structure
  2012-08-27  4:25 ` Stephen Warren
  2012-08-28 18:38   ` Uwe Kleine-König
@ 2012-08-28 22:08   ` Vinod Koul
  1 sibling, 0 replies; 4+ messages in thread
From: Vinod Koul @ 2012-08-28 22:08 UTC (permalink / raw)
  To: Stephen Warren
  Cc: vinod.koul, Laxman Dewangan, Uwe Kleine-König, djbw,
	linux-kernel, linux-tegra

On Sun, 2012-08-26 at 21:25 -0700, Stephen Warren wrote:
> On 08/26/2012 03:14 AM, Laxman Dewangan wrote:
> > The membe "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 <u.kleine-koenig@pengutronix.de>
> >     of: add const to struct *of_device_id.data
> > ---------
> 
> Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Acked-by: Vinod Koul <vinod.koul@linux.intel.com>

-- 
~Vinod Koul
Intel Corp.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-08-28 22:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-26 10:14 [PATCH] dma: tegra: add const to of_device_id.data's structure Laxman Dewangan
2012-08-27  4:25 ` Stephen Warren
2012-08-28 18:38   ` Uwe Kleine-König
2012-08-28 22:08   ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).