Re: [Intel-gfx] [PATCH v2] drm/i915/tv: avoid possible division by zero

2023-07-26 Thread Su Hui
On 2023/7/25 13:51, Dan Carpenter wrote: The reason why the first five attempts had bugs is because we are trying to write it in the most complicated way possible, shifting by logical not what? Wonderful! Should I add your name as signed-of-by? I will send a v3 patch later. Really thanks for you

Re: [Intel-gfx] [PATCH v2] drm/i915/tv: avoid possible division by zero

2023-07-26 Thread Su Hui
On 2023/7/25 01:35, Andi Shyti wrote: On Tue, Jul 18, 2023 at 09:32:17AM +0800, Su Hui wrote: Clang warning: drivers/gpu/drm/i915/display/intel_tv.c: line 991, column 22 Division by zero. Assuming tv_mode->oversample=1 and (!tv_mode->progressive)=1, then division by zero will happen. Fixes: 1bb

Re: [Intel-gfx] [PATCH v2] drm/i915/tv: avoid possible division by zero

2023-07-25 Thread Dan Carpenter
On Wed, Jul 26, 2023 at 09:21:50AM +0800, Su Hui wrote: > On 2023/7/25 13:51, Dan Carpenter wrote: > > The reason why the first five attempts had bugs is because we are > > trying to write it in the most complicated way possible, shifting by > > logical not what? > Wonderful! Should I add your name

Re: [Intel-gfx] [PATCH v2] drm/i915/tv: avoid possible division by zero

2023-07-24 Thread Dan Carpenter
The reason why the first five attempts had bugs is because we are trying to write it in the most complicated way possible, shifting by logical not what? regards, dan carpenter diff --git a/drivers/gpu/drm/i915/display/intel_tv.c b/drivers/gpu/drm/i915/display/intel_tv.c index 36b479b46b60..6997b

Re: [Intel-gfx] [PATCH v2] drm/i915/tv: avoid possible division by zero

2023-07-24 Thread Andi Shyti
On Tue, Jul 18, 2023 at 09:32:17AM +0800, Su Hui wrote: > Clang warning: drivers/gpu/drm/i915/display/intel_tv.c: > line 991, column 22 Division by zero. > Assuming tv_mode->oversample=1 and (!tv_mode->progressive)=1, > then division by zero will happen. > > Fixes: 1bba5543e4fe ("drm/i915: Fix TV

[Intel-gfx] [PATCH v2] drm/i915/tv: avoid possible division by zero

2023-07-19 Thread Su Hui
Clang warning: drivers/gpu/drm/i915/display/intel_tv.c: line 991, column 22 Division by zero. Assuming tv_mode->oversample=1 and (!tv_mode->progressive)=1, then division by zero will happen. Fixes: 1bba5543e4fe ("drm/i915: Fix TV encoder clock computation") Signed-off-by: Su Hui --- drivers/gpu/