From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Peter Korsgaard <jacmet@sunsite.dk>, Jiri Slaby <jslaby@suse.com>,
Maarten Brock <m.brock@vanmierlo.com>,
Rich Felker <dalias@libc.org>,
Michal Simek <michal.simek@xilinx.com>,
linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH, RESEND] serial-uartlite: un-constify uartlite_be/uartlite_le
Date: Sat, 16 Apr 2016 17:39:01 -0700 [thread overview]
Message-ID: <20160417003901.GA29002@kroah.com> (raw)
In-Reply-To: <1460851985-1280235-1-git-send-email-arnd@arndb.de>
On Sun, Apr 17, 2016 at 02:12:47AM +0200, Arnd Bergmann wrote:
> The patch to make uartlite_be/uartlite_le const was well-intended but
> caused a new build warning:
>
> tty/serial/uartlite.c: In function 'ulite_request_port':
> tty/serial/uartlite.c:348:21: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
> tty/serial/uartlite.c:354:22: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
>
> It would be nice to allow passing const pointers through
> port->private_data, but that would be way more work, so this
> reverts part of the original commit for now.
>
> A possible alternative might be to pass a structure in the private_data
> that contains a const pointer to the operations, which introduces a little
> extra overhead, or we could just add a cast to a non-const pointer, I'll
> leave that to the maintainer.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: 2905697a82ea ("serial-uartlite: Constify uartlite_be/uartlite_le")
> ---
> drivers/tty/serial/uartlite.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> I sent this patch on March 10, but it never made it in.
>
> Greg, could you apply the patch as a bugfix for 4.6? The warning is
> annoying as it shows up in several defconfig builds and allmodconfig.
Ugh, sorry about this, will get to it soon...
next prev parent reply other threads:[~2016-04-17 0:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-17 0:12 [PATCH, RESEND] serial-uartlite: un-constify uartlite_be/uartlite_le Arnd Bergmann
2016-04-17 0:39 ` Greg Kroah-Hartman [this message]
2016-04-17 16:59 ` Sudip Mukherjee
2016-04-19 6:14 ` Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160417003901.GA29002@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=arnd@arndb.de \
--cc=dalias@libc.org \
--cc=jacmet@sunsite.dk \
--cc=jslaby@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=m.brock@vanmierlo.com \
--cc=michal.simek@xilinx.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).