Thread (7 messages) flat view 7 messages, 5 authors, 2025-12-03

Re: [PATCH] fbdev/pxafb: Fix multiple clamped values in pxafb_adjust_timing

From: David Laight <hidden>
Date: 2025-12-02 20:32:45
Also in: dri-devel, lkml

On Tue, 2 Dec 2025 19:36:17 +0100
Thorsten Blum [off-list ref] wrote:
On 2. Dec 2025, at 19:28, Helge Deller wrote:
quoted
On 12/2/25 19:15, Thorsten Blum wrote:  
quoted
The variables were never clamped because the return value of clamp_val()
was not used. Fix this by assigning the clamped values, and use clamp()
instead of clamp_val().
Cc: stable@vger.kernel.org
Fixes: 3f16ff608a75 ("[ARM] pxafb: cleanup of the timing checking code")
Signed-off-by: Thorsten Blum <redacted>
---
 drivers/video/fbdev/pxafb.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)  
Thanks for the patch!
It looks good, so I'll include it in the fbdev tree.
Out of curiosity:
How did you notice? Do you actually have the hardware and tested it?  
I only compile-tested it.

I stumbled upon another driver with the same bug and then used grep to
search for other instances and found about 6 or 7, including this one.
I've just hacked minmax.h so clamp() and clamp_t() (and thus clamp_val())
are 'static inline u64 __must_check clamp(...)'.

Didn't find any in any other files.
But I think you missed some double error in the same file (nearby).

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