Messages in this thread | | | From | David Laight <> | Subject | RE: [Intel-wired-lan] [PATCH] ice: use min() to make code cleaner in ice_gnss | Date | Mon, 21 Mar 2022 15:47:28 +0000 |
| |
> Use `min_t(typeof(bytes_left), ICE_MAX_I2C_DATA_SIZE)` to avoid > this. Plain definitions are usually treated as `unsigned long` > unless there's a suffix (u, ull etc.).
I suspect they are 'int'. And the compiler will convert to 'unsigned int' in any arithmetic. And the 'signed v unsigned' compare warning is supressed to integer constants.
David
- Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)
| |