* [PATCH RESEND] dma: tegra: add const to of_device_id.data's structure
@ 2012-08-29 5:17 Laxman Dewangan
2012-08-29 8:49 ` Uwe Kleine-König
0 siblings, 1 reply; 6+ messages in thread
From: Laxman Dewangan @ 2012-08-29 5:17 UTC (permalink / raw)
To: u.kleine-koenig, vinod.koul, djbw
Cc: swarren, linux-kernel, linux-tegra, Laxman Dewangan
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 <u.kleine-koenig@pengutronix.de>
of: add const to struct *of_device_id.data
---------
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Acked-by: Vinod Koul <vinod.koul@linux.intel.com>
---
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(-)
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] 6+ messages in thread
* Re: [PATCH RESEND] dma: tegra: add const to of_device_id.data's structure
2012-08-29 5:17 [PATCH RESEND] dma: tegra: add const to of_device_id.data's structure Laxman Dewangan
@ 2012-08-29 8:49 ` Uwe Kleine-König
2012-08-29 8:51 ` [PATCH 1/2] dma: tegra: make tegra_dma.chip_data a pointer to const data Uwe Kleine-König
0 siblings, 1 reply; 6+ messages in thread
From: Uwe Kleine-König @ 2012-08-29 8:49 UTC (permalink / raw)
To: Laxman Dewangan, Arnd Bergmann, Olof Johansson
Cc: vinod.koul, djbw, swarren, linux-kernel, linux-tegra, kernel
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 <u.kleine-koenig@pengutronix.de>
> of: add const to struct *of_device_id.data
> ---------
>
> Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
> Acked-by: Stephen Warren <swarren@wwwdotorg.org>
> Acked-by: Vinod Koul <vinod.koul@linux.intel.com>
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] dma: tegra: make tegra_dma.chip_data a pointer to const data
2012-08-29 8:49 ` Uwe Kleine-König
@ 2012-08-29 8:51 ` Uwe Kleine-König
2012-08-29 8:51 ` [PATCH 2/2] dma: tegra: make data used as *of_device_id.data const Uwe Kleine-König
2012-09-10 18:21 ` [PATCH 1/2] dma: tegra: make tegra_dma.chip_data a pointer to const data Stephen Warren
0 siblings, 2 replies; 6+ messages in thread
From: Uwe Kleine-König @ 2012-08-29 8:51 UTC (permalink / raw)
To: Laxman Dewangan
Cc: Arnd Bergmann, Olof Johansson, Vinod Koul, djbw, Stephen Warren,
linux-kernel, linux-tegra, kernel
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 <swarren@wwwdotorg.org>
Acked-by: Vinod Koul <vinod.koul@linux.intel.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/dma/tegra20-apb-dma.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c
index d52dbc6..29a39b8 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;
@@ -1197,7 +1197,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.10.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] dma: tegra: make data used as *of_device_id.data const
2012-08-29 8:51 ` [PATCH 1/2] dma: tegra: make tegra_dma.chip_data a pointer to const data Uwe Kleine-König
@ 2012-08-29 8:51 ` Uwe Kleine-König
2012-09-10 18:21 ` [PATCH 1/2] dma: tegra: make tegra_dma.chip_data a pointer to const data Stephen Warren
1 sibling, 0 replies; 6+ messages in thread
From: Uwe Kleine-König @ 2012-08-29 8:51 UTC (permalink / raw)
To: Laxman Dewangan
Cc: Arnd Bergmann, Olof Johansson, Vinod Koul, djbw, Stephen Warren,
linux-kernel, linux-tegra, kernel
From: Laxman Dewangan <ldewangan@nvidia.com>
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@nvidia.com]
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Acked-by: Vinod Koul <vinod.koul@linux.intel.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/dma/tegra20-apb-dma.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c
index 29a39b8..56adcfc 100644
--- a/drivers/dma/tegra20-apb-dma.c
+++ b/drivers/dma/tegra20-apb-dma.c
@@ -1166,14 +1166,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,
};
--
1.7.10.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] dma: tegra: make tegra_dma.chip_data a pointer to const data
2012-08-29 8:51 ` [PATCH 1/2] dma: tegra: make tegra_dma.chip_data a pointer to const data Uwe Kleine-König
2012-08-29 8:51 ` [PATCH 2/2] dma: tegra: make data used as *of_device_id.data const Uwe Kleine-König
@ 2012-09-10 18:21 ` Stephen Warren
2012-09-11 6:58 ` Uwe Kleine-König
1 sibling, 1 reply; 6+ messages in thread
From: Stephen Warren @ 2012-09-10 18:21 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Laxman Dewangan, Arnd Bergmann, Olof Johansson, Vinod Koul, djbw,
linux-kernel, linux-tegra, kernel
On 08/29/2012 02:51 AM, Uwe Kleine-König wrote:
> 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 <swarren@wwwdotorg.org>
> Acked-by: Vinod Koul <vinod.koul@linux.intel.com>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Uwe,
I don't see these patches in linux-next, so compilation is still broken.
Can you please apply them? Thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] dma: tegra: make tegra_dma.chip_data a pointer to const data
2012-09-10 18:21 ` [PATCH 1/2] dma: tegra: make tegra_dma.chip_data a pointer to const data Stephen Warren
@ 2012-09-11 6:58 ` Uwe Kleine-König
0 siblings, 0 replies; 6+ messages in thread
From: Uwe Kleine-König @ 2012-09-11 6:58 UTC (permalink / raw)
To: Stephen Warren, Arnd Bergmann, Olof Johansson
Cc: Laxman Dewangan, Vinod Koul, djbw, linux-kernel, linux-tegra, kernel
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:
> > 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 <swarren@wwwdotorg.org>
> > Acked-by: Vinod Koul <vinod.koul@linux.intel.com>
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
>
> 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/ |
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-09-11 6:58 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-29 5:17 [PATCH RESEND] dma: tegra: add const to of_device_id.data's structure Laxman Dewangan
2012-08-29 8:49 ` Uwe Kleine-König
2012-08-29 8:51 ` [PATCH 1/2] dma: tegra: make tegra_dma.chip_data a pointer to const data Uwe Kleine-König
2012-08-29 8:51 ` [PATCH 2/2] dma: tegra: make data used as *of_device_id.data const Uwe Kleine-König
2012-09-10 18:21 ` [PATCH 1/2] dma: tegra: make tegra_dma.chip_data a pointer to const data Stephen Warren
2012-09-11 6:58 ` Uwe Kleine-König
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).