RE: [PATCH 0/4] serial: 8250: Fixes for Oxford Semiconductor 950 UARTs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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)




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux