Re: [PATCH] scsi: Remove negative constant left-shifts

2019-02-27 Thread Martin K. Petersen
Iustin, > Negative constant left-shift is undefined behaviour in the C standard, > and as such newer versions of clang (at least) warn against it. GCC > supports it for a long time, but it would be better to remove it and > rely on defined behaviour. Applied to 5.1/scsi-queue. Thanks! -- Mart

Re: [PATCH] scsi: Remove negative constant left-shifts

2019-02-22 Thread Lee Duncan
On 2/21/19 4:20 PM, Iustin Pop wrote: > Negative constant left-shift is undefined behaviour in the C standard, > and as such newer versions of clang (at least) warn against it. GCC > supports it for a long time, but it would be better to remove it and > rely on defined behaviour. > > My understand

[PATCH] scsi: Remove negative constant left-shifts

2019-02-21 Thread Iustin Pop
Negative constant left-shift is undefined behaviour in the C standard, and as such newer versions of clang (at least) warn against it. GCC supports it for a long time, but it would be better to remove it and rely on defined behaviour. My understanding is "~(-1 << N)" in 2's complement is intended