linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: "Maciej W. Rozycki" <macro@orcam.me.uk>
Cc: Jiri Slaby <jirislaby@kernel.org>,
	linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/4] serial: 8250: Fixes for Oxford Semiconductor 950 UARTs
Date: Tue, 15 Jun 2021 17:52:05 +0200	[thread overview]
Message-ID: <YMjMpQtLeP3xceYR@kroah.com> (raw)
In-Reply-To: <alpine.DEB.2.21.2106151602120.61948@angie.orcam.me.uk>

On Tue, Jun 15, 2021 at 04:19:03PM +0200, Maciej W. Rozycki wrote:
> On Tue, 15 Jun 2021, Greg Kroah-Hartman wrote:
> 
> > This patch series causes the following build warning to be added:
> > 
> > drivers/tty/serial/8250/8250_pci.c: In function ‘pci_oxsemi_tornado_setup’:
> > drivers/tty/serial/8250/8250_pci.c:1258:32: warning: unsigned conversion from ‘int’ to ‘unsigned char’ changes value from ‘-129’ to ‘127’ [-Woverflow]
> >  1258 |                 up->mcr_mask = ~UART_MCR_CLKSEL;
> >       |                                ^
> > 
> > 
> > Can you fix this up and resend?
> 
>  I've seen that, but that's not a problem with my change, but rather with 
> <linux/serial_reg.h> making this macro (and the remaining ones from this 
> group) expand to a signed constant (0x80 rather than 0x80u).

As your change causes it to show up, it must have something to do with
it :)

>  I can fix the header, but that would be a separate change, and mind too 
> that this is a user header, so it's not clear to me what the impact might 
> be on user apps making use of it.

You can not change the uapi header, why would you want to?

>  We could use a GCC pragma to suppress the warning temporarily across this 
> piece of code, but it's not clear to me either what our policy has been on 
> such approach.

What pragma?

>  Thoughts?

Why does your change cause this to show up?

>  NB casting UART_MCR_CLKSEL here to an unsigned type does not help as GCC
> still sees the original constant through the cast; I've already tried that 
> of course.
> 
>  Last but not least: do we need to have this warning enabled in the first 
> place?

No idea, but that's a different discussion, with a different group of
people :)

thanks,

greg k-h

  reply	other threads:[~2021-06-15 15:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-10 18:38 [PATCH 0/4] serial: 8250: Fixes for Oxford Semiconductor 950 UARTs Maciej W. Rozycki
2021-06-10 18:38 ` [PATCH 1/4] serial: 8250: Dissociate 4MHz Titan ports from Oxford ports Maciej W. Rozycki
2021-06-10 18:39 ` [PATCH 2/4] serial: 8250: Correct the clock for OxSemi PCIe devices Maciej W. Rozycki
2021-06-10 18:39 ` [PATCH 3/4] serial: 8250: Add proper clock handling " Maciej W. Rozycki
2021-06-16 16:58   ` kernel test robot
2021-06-16 21:00   ` kernel test robot
2021-06-17 11:23   ` kernel test robot
2021-06-10 18:39 ` [PATCH 4/4] serial: 8250: Define RX trigger levels for OxSemi 950 devices Maciej W. Rozycki
2021-06-15 12:07 ` [PATCH 0/4] serial: 8250: Fixes for Oxford Semiconductor 950 UARTs Greg Kroah-Hartman
2021-06-15 14:19   ` Maciej W. Rozycki
2021-06-15 15:52     ` Greg Kroah-Hartman [this message]
2021-06-15 17:12       ` Maciej W. Rozycki
2021-06-15 21:45         ` David Laight
2021-06-26  4:13           ` Maciej W. Rozycki

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=YMjMpQtLeP3xceYR@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=macro@orcam.me.uk \
    /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).