Re: [PATCH-next] Fix unintentional integer overflow

2024-10-08 Thread Advait Dhamorikar
Hi Christian, I am not sure if I correctly understood what you meant, just to clarify When you say this >No, all of this are numerical problems where not taken into account the >size of the destination type. >Saying that all of that are basically just style cleanups which doesn't >need to be ba

Re: [PATCH-next] Fix unintentional integer overflow

2024-10-07 Thread Christian König
Am 08.10.24 um 05:38 schrieb Advait Dhamorikar: Hi Christian, I am not sure if I correctly understood what you meant, just to clarify When you say this No, all of this are numerical problems where not taken into account the size of the destination type. Saying that all of that are basically j

Re: [PATCH-next] Fix unintentional integer overflow

2024-10-07 Thread Christian König
Am 05.10.24 um 09:05 schrieb Advait Dhamorikar: Hi Sathish, Please collate the changes together with Lijo's suggestion as well, "1ULL <<" instead of typecast, there are 3 occurrences of the error in f0b19b84d391. I could only observe two instances of this error in f0b19b84d391 at: 'mask = (1 <

Re: [PATCH-next] Fix unintentional integer overflow

2024-10-07 Thread Advait Dhamorikar
Hi Sathish, > Please collate the changes together with Lijo's suggestion as well, > "1ULL <<" instead of typecast, there are 3 occurrences of the error in > f0b19b84d391. I could only observe two instances of this error in f0b19b84d391 at: 'mask = (1 << (adev->jpeg.num_jpeg_inst * adev->jpeg.num_

Re: [PATCH-next] Fix unintentional integer overflow

2024-10-07 Thread Shuah Khan
On 10/4/24 03:15, Sundararaju, Sathishkumar wrote: All occurrences of this error fix should have been together in a single patch both in _get and _set callbacks corresponding to f0b19b84d391, please avoid separate patch for each occurrence. Sorry Alex, I missed to note this yesterday. Regar

[PATCH-next] Fix unintentional integer overflow

2024-10-07 Thread Advait Dhamorikar
Fix shift-count-overflow when creating mask. The expression's value may not be what the programmer intended, because the expression is evaluated using a narrower integer type. Fixes: f0b19b84d391 ("drm/amdgpu: add amdgpu_jpeg_sched_mask debugfs") Signed-off-by: Advait Dhamorikar --- drivers/gpu/

Re: [PATCH-next] Fix unintentional integer overflow

2024-10-04 Thread Sundararaju, Sathishkumar
On 10/4/2024 11:30 PM, Alex Deucher wrote: On Fri, Oct 4, 2024 at 5:15 AM Sundararaju, Sathishkumar wrote: All occurrences of this error fix should have been together in a single patch both in _get and _set callbacks corresponding to f0b19b84d391, please avoid separate patch for each occu

Re: [PATCH-next] Fix unintentional integer overflow

2024-10-04 Thread Alex Deucher
On Fri, Oct 4, 2024 at 5:15 AM Sundararaju, Sathishkumar wrote: > > > All occurrences of this error fix should have been together in a single patch > both in _get and _set callbacks corresponding to f0b19b84d391, please avoid > separate patch for each occurrence. > > Sorry Alex, I missed to note

Re: [PATCH-next] Fix unintentional integer overflow

2024-10-04 Thread Sundararaju, Sathishkumar
All occurrences of this error fix should have been together in a single patch both in _get and _set callbacks corresponding to f0b19b84d391, please avoid separate patch for each occurrence. Sorry Alex, I missed to note this yesterday. Regards, Sathish On 10/4/2024 1:46 PM, Advait Dhamorik

Re: [PATCH-next] Fix unintentional integer overflow

2024-10-03 Thread Sundararaju, Sathishkumar
On 10/3/2024 12:44 PM, Advait Dhamorikar wrote: Fix overflow issue by casting uint8_t to uint64_t in JPEG instance multiplication. Thank you for the fix, u8 isn't the default it is usually treated as int, is it okay to mention "fix shift-count-overflow in.." or something else of your choice ,

[PATCH-next] Fix unintentional integer overflow

2024-10-03 Thread Advait Dhamorikar
Fix overflow issue by casting uint8_t to uint64_t in JPEG instance multiplication. The expression's value may not be what the programmer intended, because the expression is evaluated using a narrow (i.e. few bits) integer type. Fixes: f0b19b84d391 ("drm/amdgpu: add amdgpu_jpeg_sched_mask debugfs")