Thread (11 messages) flat view 11 messages, 5 authors, 2021-03-18

Re: [PATCH v4 RESEND net-next] net: socket: use BIT() for MSG_*

From: Guenter Roeck <linux@roeck-us.net>
Date: 2021-03-17 10:18:43
Also in: lkml

On 3/17/21 2:40 AM, Andy Shevchenko wrote:
On Wed, Mar 17, 2021 at 11:36 AM Andy Shevchenko
[off-list ref] wrote:
quoted
On Wed, Mar 17, 2021 at 10:21 AM Menglong Dong [off-list ref] wrote:
...
quoted
It maybe fixed by swapping positions of the arguments, i.e. ~(FOO |
BAR) & flags.
...and type casting will be needed anyway here...

I was thinking about this case

drivers/i2c/busses/i2c-designware-common.c:420:
dev->sda_hold_time & ~(u32)DW_IC_SDA_HOLD_RX_MASK
,
quoted
but sda_hold_time there is unsigned.
That is needed because of the %d. Without the (u32), the expression is
promoted to unsigned long and the compiler wants to see %ld.

Guenter
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help