Re: Buiild error in i915/xe (was: [PATCH next 4/7] minmax.h: Use BUILD_BUG_ON_MSG() for the lo < hi test in clamp())

2025-01-21 Thread David Laight
On Sat, 18 Jan 2025 13:21:39 -0800 Linus Torvalds wrote: > On Sat, 18 Jan 2025 at 09:49, Guenter Roeck wrote: > > > > No idea why the compiler would know that the values are invalid. > > It's not that the compiler knows tat they are invalid, but I bet what > happens is in scale() (and possibl

Re: Buiild error in i915/xe

2025-01-21 Thread David Laight
On Sat, 18 Jan 2025 14:58:48 -0800 Guenter Roeck wrote: > On 1/18/25 14:11, David Laight wrote: > > On Sat, 18 Jan 2025 13:21:39 -0800 > > Linus Torvalds wrote: > > > >> On Sat, 18 Jan 2025 at 09:49, Guenter Roeck wrote: > >>> > >>> No idea why the compiler would know that the values are i

Re: Buiild error in i915/xe

2025-01-21 Thread David Laight
On Mon, 20 Jan 2025 06:15:30 -0800 Guenter Roeck wrote: > On 1/20/25 03:21, Jani Nikula wrote: > > On Mon, 20 Jan 2025, David Laight wrote: > >> On Mon, 20 Jan 2025 12:48:11 +0200 > >> Jani Nikula wrote: > >> > >>> On Sun, 19 Jan 2025, David Laight wrote: > On Sat, 18 Jan 2025 14:58

Re: Buiild error in i915/xe (was: [PATCH next 4/7] minmax.h: Use BUILD_BUG_ON_MSG() for the lo < hi test in clamp())

2025-01-21 Thread Pedro Falcato
On Sat, Jan 18, 2025 at 10:11 PM David Laight wrote: > > On Sat, 18 Jan 2025 13:21:39 -0800 > Linus Torvalds wrote: > > > On Sat, 18 Jan 2025 at 09:49, Guenter Roeck wrote: > > > > > > No idea why the compiler would know that the values are invalid. > > > > It's not that the compiler knows tat t

Re: Buiild error in i915/xe (was: [PATCH next 4/7] minmax.h: Use BUILD_BUG_ON_MSG() for the lo < hi test in clamp())

2025-01-21 Thread David Laight
On Sat, 18 Jan 2025 08:13:06 -0800 Guenter Roeck wrote: > Hi, > > On Mon, Nov 18, 2024 at 07:13:31PM +, David Laight wrote: > > Use BUILD_BUG_ON_MSG(statically_true(ulo > uhi), ...) for the sanity > > check of the bounds in clamp(). > > Gives better error coverage and one less expansion of t

Re: Buiild error in i915/xe (was: [PATCH next 4/7] minmax.h: Use BUILD_BUG_ON_MSG() for the lo < hi test in clamp())

2025-01-21 Thread David Laight
On Sat, 18 Jan 2025 09:49:21 -0800 Guenter Roeck wrote: > On Sat, Jan 18, 2025 at 05:09:59PM +, David Laight wrote: > > On Sat, 18 Jan 2025 08:13:06 -0800 > > Guenter Roeck wrote: > > > > > Hi, > > > > > > On Mon, Nov 18, 2024 at 07:13:31PM +, David Laight wrote: > > > > Use BUILD_

Re: Buiild error in i915/xe

2025-01-21 Thread David Laight
On Mon, 20 Jan 2025 12:48:11 +0200 Jani Nikula wrote: > On Sun, 19 Jan 2025, David Laight wrote: > > On Sat, 18 Jan 2025 14:58:48 -0800 > > Guenter Roeck wrote: > > > >> On 1/18/25 14:11, David Laight wrote: > >> > On Sat, 18 Jan 2025 13:21:39 -0800 > >> > Linus Torvalds wrote: > >> >

Re: Buiild error in i915/xe

2025-01-21 Thread David Laight
On Sat, 18 Jan 2025 10:36:11 -0800 Guenter Roeck wrote: > On 1/18/25 10:09, David Laight wrote: > > On Sat, 18 Jan 2025 09:49:21 -0800 > > Guenter Roeck wrote: > > > >> On Sat, Jan 18, 2025 at 05:09:59PM +, David Laight wrote: > >>> On Sat, 18 Jan 2025 08:13:06 -0800 > >>> Guenter Roeck

Re: Buiild error in i915/xe

2025-01-20 Thread Guenter Roeck
On 1/20/25 11:14, Linus Torvalds wrote: On Mon, 20 Jan 2025 at 10:55, Andy Shevchenko wrote: Excuse me if I am missing something, but clamp() has a warning inside it, correct? Why do we need an additional warning on top of that? Note: the warning in clamp() only finds compile-time obvious w

Re: Buiild error in i915/xe

2025-01-20 Thread Andy Shevchenko
On Mon, Jan 20, 2025 at 06:41:43PM +, David Laight wrote: > On Mon, 20 Jan 2025 06:15:30 -0800 > Guenter Roeck wrote: > > On 1/20/25 03:21, Jani Nikula wrote: > > > On Mon, 20 Jan 2025, David Laight wrote: > > >> On Mon, 20 Jan 2025 12:48:11 +0200 > > >> Jani Nikula wrote: > > >>> On Sun,

Re: Buiild error in i915/xe

2025-01-20 Thread Linus Torvalds
On Mon, 20 Jan 2025 at 10:55, Andy Shevchenko wrote: > > Excuse me if I am missing something, but clamp() has a warning inside it, > correct? > Why do we need an additional warning on top of that? Note: the warning in clamp() only finds compile-time obvious wrong uses. It's really meant to noti

Re: Buiild error in i915/xe

2025-01-20 Thread Guenter Roeck
On 1/20/25 03:21, Jani Nikula wrote: On Mon, 20 Jan 2025, David Laight wrote: On Mon, 20 Jan 2025 12:48:11 +0200 Jani Nikula wrote: On Sun, 19 Jan 2025, David Laight wrote: On Sat, 18 Jan 2025 14:58:48 -0800 Guenter Roeck wrote: On 1/18/25 14:11, David Laight wrote: On Sat, 18 Jan 20

Re: Buiild error in i915/xe

2025-01-20 Thread Jani Nikula
On Mon, 20 Jan 2025, David Laight wrote: > On Mon, 20 Jan 2025 12:48:11 +0200 > Jani Nikula wrote: > >> On Sun, 19 Jan 2025, David Laight wrote: >> > On Sat, 18 Jan 2025 14:58:48 -0800 >> > Guenter Roeck wrote: >> > >> >> On 1/18/25 14:11, David Laight wrote: >> >> > On Sat, 18 Jan 2025 13:

Re: Buiild error in i915/xe

2025-01-20 Thread Jani Nikula
On Sun, 19 Jan 2025, David Laight wrote: > On Sat, 18 Jan 2025 14:58:48 -0800 > Guenter Roeck wrote: > >> On 1/18/25 14:11, David Laight wrote: >> > On Sat, 18 Jan 2025 13:21:39 -0800 >> > Linus Torvalds wrote: >> > >> >> On Sat, 18 Jan 2025 at 09:49, Guenter Roeck wrote: >> >>> >> >>> No

Re: Buiild error in i915/xe

2025-01-18 Thread Guenter Roeck
On 1/18/25 14:11, David Laight wrote: On Sat, 18 Jan 2025 13:21:39 -0800 Linus Torvalds wrote: On Sat, 18 Jan 2025 at 09:49, Guenter Roeck wrote: No idea why the compiler would know that the values are invalid. It's not that the compiler knows tat they are invalid, but I bet what happens

✗ Fi.CI.BUILD: failure for Buiild error in i915/xe (was: [PATCH next 4/7] minmax.h: Use BUILD_BUG_ON_MSG() for the lo < hi test in clamp()) (rev2)

2025-01-18 Thread Patchwork
== Series Details == Series: Buiild error in i915/xe (was: [PATCH next 4/7] minmax.h: Use BUILD_BUG_ON_MSG() for the lo < hi test in clamp()) (rev2) URL : https://patchwork.freedesktop.org/series/143703/ State : failure == Summary == Error: patch https://patchwork.freedesktop.org/api/

Re: Buiild error in i915/xe

2025-01-18 Thread Linus Torvalds
On Sat, 18 Jan 2025 at 13:59, Guenter Roeck wrote: > > I am not sure what to do here. That kind of problem seems difficult > to avoid, and I am sure we will hit it again elsewhere. Should I declare > gcc 13.x off limits for parisc builds ? No, I'm sure it can happen on other architectures too. I

Re: Buiild error in i915/xe

2025-01-18 Thread Guenter Roeck
On 1/18/25 13:21, Linus Torvalds wrote: On Sat, 18 Jan 2025 at 09:49, Guenter Roeck wrote: No idea why the compiler would know that the values are invalid. It's not that the compiler knows tat they are invalid, but I bet what happens is in scale() (and possibly other places that do similar c

Re: Buiild error in i915/xe

2025-01-18 Thread Guenter Roeck
On 1/18/25 13:18, David Laight wrote: On Sat, 18 Jan 2025 10:36:11 -0800 Guenter Roeck wrote: On 1/18/25 10:09, David Laight wrote: On Sat, 18 Jan 2025 09:49:21 -0800 Guenter Roeck wrote: On Sat, Jan 18, 2025 at 05:09:59PM +, David Laight wrote: On Sat, 18 Jan 2025 08:13:06 -0800 G

Re: Buiild error in i915/xe (was: [PATCH next 4/7] minmax.h: Use BUILD_BUG_ON_MSG() for the lo < hi test in clamp())

2025-01-18 Thread Linus Torvalds
On Sat, 18 Jan 2025 at 09:49, Guenter Roeck wrote: > > No idea why the compiler would know that the values are invalid. It's not that the compiler knows tat they are invalid, but I bet what happens is in scale() (and possibly other places that do similar checks), which does this: WARN_ON

✗ i915.CI.BAT: failure for Buiild error in i915/xe (was: [PATCH next 4/7] minmax.h: Use BUILD_BUG_ON_MSG() for the lo < hi test in clamp())

2025-01-18 Thread Patchwork
== Series Details == Series: Buiild error in i915/xe (was: [PATCH next 4/7] minmax.h: Use BUILD_BUG_ON_MSG() for the lo < hi test in clamp()) URL : https://patchwork.freedesktop.org/series/143703/ State : failure == Summary == CI Bug Log - changes from CI_DRM_15979 -> Patchwork_14

✗ Fi.CI.CHECKPATCH: warning for Buiild error in i915/xe (was: [PATCH next 4/7] minmax.h: Use BUILD_BUG_ON_MSG() for the lo < hi test in clamp())

2025-01-18 Thread Patchwork
== Series Details == Series: Buiild error in i915/xe (was: [PATCH next 4/7] minmax.h: Use BUILD_BUG_ON_MSG() for the lo < hi test in clamp()) URL : https://patchwork.freedesktop.org/series/143703/ State : warning == Summary == Error: dim checkpatch failed 9955d8377768 Buiild error in i915

Re: Buiild error in i915/xe

2025-01-18 Thread Guenter Roeck
On 1/18/25 10:09, David Laight wrote: On Sat, 18 Jan 2025 09:49:21 -0800 Guenter Roeck wrote: On Sat, Jan 18, 2025 at 05:09:59PM +, David Laight wrote: On Sat, 18 Jan 2025 08:13:06 -0800 Guenter Roeck wrote: Hi, On Mon, Nov 18, 2024 at 07:13:31PM +, David Laight wrote: Use BUI

Re: Buiild error in i915/xe (was: [PATCH next 4/7] minmax.h: Use BUILD_BUG_ON_MSG() for the lo < hi test in clamp())

2025-01-18 Thread Guenter Roeck
On Sat, Jan 18, 2025 at 05:09:59PM +, David Laight wrote: > On Sat, 18 Jan 2025 08:13:06 -0800 > Guenter Roeck wrote: > > > Hi, > > > > On Mon, Nov 18, 2024 at 07:13:31PM +, David Laight wrote: > > > Use BUILD_BUG_ON_MSG(statically_true(ulo > uhi), ...) for the sanity > > > check of the

Buiild error in i915/xe (was: [PATCH next 4/7] minmax.h: Use BUILD_BUG_ON_MSG() for the lo < hi test in clamp())

2025-01-18 Thread Guenter Roeck
Hi, On Mon, Nov 18, 2024 at 07:13:31PM +, David Laight wrote: > Use BUILD_BUG_ON_MSG(statically_true(ulo > uhi), ...) for the sanity > check of the bounds in clamp(). > Gives better error coverage and one less expansion of the arguments. > > Signed-off-by: David Laight This patch triggers a