linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: "'Maciej W. Rozycki'" <macro@orcam.me.uk>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>,
	"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
	"linux-kernel@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 21:45:31 +0000	[thread overview]
Message-ID: <aff02581e694421eba04afc2fc3644df@AcuMS.aculab.com> (raw)
In-Reply-To: <alpine.DEB.2.21.2106151805460.61948@angie.orcam.me.uk>

From: Maciej W. Rozycki
> Sent: 15 June 2021 18:13
...
>  As I have noted above there is a data type signedness difference between
> `mcr_mask' and UART_MCR_CLKSEL.  So we have the value of 0x80 (128).
> Once bitwise-complemented it becomes 0xffffff7f (-129).  Once assigned to
> `mcr_mask' however it becomes 0x7f (127), which is considered an unsafe
> conversion between signed and unsigned integers by GCC, which is why the
> compiler complains about it.

Blame the iso C standards committee for making integer promotions
'value preserving' instead of 'sign preserving' as they were in K&R C.

Try using ^ 0xffu instead of ~.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

  reply	other threads:[~2021-06-15 21:45 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
2021-06-15 17:12       ` Maciej W. Rozycki
2021-06-15 21:45         ` David Laight [this message]
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=aff02581e694421eba04afc2fc3644df@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=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).