On Fri, Mar 18, 2016 at 6:48 PM, Maarten Brock <[email protected]> wrote:
> ----- Original Message -----
> From: Geert Uytterhoeven [mailto:[email protected]]
> To: Sudip Mukherjee [mailto:[email protected]]
> Cc: Peter Korsgaard [mailto:[email protected]], Greg Kroah-Hartman
> [mailto:[email protected]], Jiri Slaby [mailto:[email protected]],
> [email protected] [mailto:[email protected]],
> [email protected] [mailto:[email protected]]
> Sent: Fri, 18 Mar 2016 13:48:06 +0100
> Subject: Re: [PATCH] serial-uartlite: fix build warning
>
>> On Thu, Mar 10, 2016 at 2:14 PM, Sudip Mukherjee
>> <[email protected]> wrote:
>> > We were getting build warnings about:
>> > drivers/tty/serial/uartlite.c: In function ‘ulite_request_port’:
>> > drivers/tty/serial/uartlite.c:348:21: warning: assignment discards
>> > 'const' qualifier from pointer target type
>> > port->private_data = &uartlite_be;
>> > ^
>> > drivers/tty/serial/uartlite.c:354:22: warning: assignment discards
>> > 'const' qualifier from pointer target type
>> > port->private_data = &uartlite_le;
>> > ^
>> >
>> > Fixes: 2905697a82ea ("serial-uartlite: Constify uartlite_be/uartlite_le")
>> > Signed-off-by: Sudip Mukherjee <[email protected]>
>>
>> Acked-by: Geert Uytterhoeven <[email protected]>
>
> Reverting is not the same as fixing.
>
> Rant:
> It is a stupid warning IMHO, but being a compiler writer myself (SDCC) I
> understand how it can arise. If you assign some const pointer to a void
> pointer without an explicit cast gcc does not complain about the complete
> loss of type, but it does warn about losing constness. In general I'd say:
> make up your mind; either warn about both or don't warn about either.
You're right, I was a bit too hasty adding my Acked-by.
Hereby I would like to withdraw my Acked-by.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
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