linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RESEND] ARM: davinci: don't mark vpif_input structures as 'const'
@ 2017-07-27 10:12 Arnd Bergmann
  2017-07-27 10:54 ` Sekhar Nori
  0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2017-07-27 10:12 UTC (permalink / raw)
  To: Sekhar Nori, Kevin Hilman
  Cc: Arnd Bergmann, Bartosz Golaszewski, Axel Haslam,
	Mauro Carvalho Chehab, linux-arm-kernel, linux-kernel

A change to the platform data definitions caused a warning in the board code:

arch/arm/mach-davinci/board-dm646x-evm.c:680:13: error: initialization discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
arch/arm/mach-davinci/board-dm646x-evm.c:690:13: error: initialization discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]

This is a bit unfortunate, since we generally like structure definitions to
be const, but as this is legacy code, the easiest way out is still to
remove the 'const' annotation here.

Fixes: 4a5f8ae50b66 ("[media] davinci: vpif_capture: get subdevs from DT when available")
Fixes: 231ce279e6e3 ("ARM: davinci: fix const warnings")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
I originally sent my fix on Jun 9, but Kevin had already applied an
identical fix for two of the three affected files. This fixes the
third one that his patch missed.

I have a couple of other patches that I'm planning to apply directly
to the fixes branch now, and would do the same for this one unless
there are objections.
---
 arch/arm/mach-davinci/board-da850-evm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c
index b5625d009288..e568c8c6f69c 100644
--- a/arch/arm/mach-davinci/board-da850-evm.c
+++ b/arch/arm/mach-davinci/board-da850-evm.c
@@ -1166,7 +1166,7 @@ static struct tvp514x_platform_data tvp5146_pdata = {
 
 #define TVP514X_STD_ALL (V4L2_STD_NTSC | V4L2_STD_PAL)
 
-static const struct vpif_input da850_ch0_inputs[] = {
+static struct vpif_input da850_ch0_inputs[] = {
 	{
 		.input = {
 			.index = 0,
@@ -1181,7 +1181,7 @@ static const struct vpif_input da850_ch0_inputs[] = {
 	},
 };
 
-static const struct vpif_input da850_ch1_inputs[] = {
+static struct vpif_input da850_ch1_inputs[] = {
 	{
 		.input = {
 			.index = 0,
-- 
2.9.0

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

* Re: [PATCH RESEND] ARM: davinci: don't mark vpif_input structures as 'const'
  2017-07-27 10:12 [PATCH RESEND] ARM: davinci: don't mark vpif_input structures as 'const' Arnd Bergmann
@ 2017-07-27 10:54 ` Sekhar Nori
  2017-07-27 11:11   ` Arnd Bergmann
  0 siblings, 1 reply; 3+ messages in thread
From: Sekhar Nori @ 2017-07-27 10:54 UTC (permalink / raw)
  To: Arnd Bergmann, Kevin Hilman
  Cc: Bartosz Golaszewski, Axel Haslam, Mauro Carvalho Chehab,
	linux-arm-kernel, linux-kernel

Hi Arnd,

On Thursday 27 July 2017 03:42 PM, Arnd Bergmann wrote:
> A change to the platform data definitions caused a warning in the board code:
> 
> arch/arm/mach-davinci/board-dm646x-evm.c:680:13: error: initialization discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
> arch/arm/mach-davinci/board-dm646x-evm.c:690:13: error: initialization discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]

You can replace these by:

arch/arm/mach-davinci/board-da850-evm.c:1221:13: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
arch/arm/mach-davinci/board-da850-evm.c:1231:13: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]

to match with this patch.

> 
> This is a bit unfortunate, since we generally like structure definitions to
> be const, but as this is legacy code, the easiest way out is still to
> remove the 'const' annotation here.
> 
> Fixes: 4a5f8ae50b66 ("[media] davinci: vpif_capture: get subdevs from DT when available")
> Fixes: 231ce279e6e3 ("ARM: davinci: fix const warnings")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Acked-by: Sekhar Nori <nsekhar@ti.com>

Looks like this slipped my testing since I had 
CONFIG_DA850_UI_SD_VIDEO_PORT switched off. Thanks for catching it.

> ---
> I originally sent my fix on Jun 9, but Kevin had already applied an
> identical fix for two of the three affected files. This fixes the
> third one that his patch missed.
> 
> I have a couple of other patches that I'm planning to apply directly
> to the fixes branch now, and would do the same for this one unless
> there are objections.

No problem. Thanks!

~Sekhar

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

* Re: [PATCH RESEND] ARM: davinci: don't mark vpif_input structures as 'const'
  2017-07-27 10:54 ` Sekhar Nori
@ 2017-07-27 11:11   ` Arnd Bergmann
  0 siblings, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2017-07-27 11:11 UTC (permalink / raw)
  To: Sekhar Nori
  Cc: Kevin Hilman, Bartosz Golaszewski, Axel Haslam,
	Mauro Carvalho Chehab, Linux ARM, Linux Kernel Mailing List

On Thu, Jul 27, 2017 at 12:54 PM, Sekhar Nori <nsekhar@ti.com> wrote:
> Hi Arnd,
>
> On Thursday 27 July 2017 03:42 PM, Arnd Bergmann wrote:
>> A change to the platform data definitions caused a warning in the board code:
>>
>> arch/arm/mach-davinci/board-dm646x-evm.c:680:13: error: initialization discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
>> arch/arm/mach-davinci/board-dm646x-evm.c:690:13: error: initialization discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
>
> You can replace these by:
>
> arch/arm/mach-davinci/board-da850-evm.c:1221:13: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
> arch/arm/mach-davinci/board-da850-evm.c:1231:13: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
>
> to match with this patch.

Ok, I thought I had fixed that, but for some reason ended up with the
previous version
of the change text.

>>
>> This is a bit unfortunate, since we generally like structure definitions to
>> be const, but as this is legacy code, the easiest way out is still to
>> remove the 'const' annotation here.
>>
>> Fixes: 4a5f8ae50b66 ("[media] davinci: vpif_capture: get subdevs from DT when available")
>> Fixes: 231ce279e6e3 ("ARM: davinci: fix const warnings")
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> Acked-by: Sekhar Nori <nsekhar@ti.com>

Thanks, applying it now.

        Arnd

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

end of thread, other threads:[~2017-07-27 11:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-27 10:12 [PATCH RESEND] ARM: davinci: don't mark vpif_input structures as 'const' Arnd Bergmann
2017-07-27 10:54 ` Sekhar Nori
2017-07-27 11:11   ` Arnd Bergmann

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).