Re: [PATCH] drm/amd/display/dc/dce: Fix multiple potential integer overflows

2018-07-05 Thread Gustavo A. R. Silva
On 07/04/2018 12:51 PM, Harry Wentland wrote: [..] >>> >>> @@ -145,8 +145,8 @@ static bool calculate_fb_and_fractional_fb_divider( >>> * of fractional feedback decimal point and the fractional FB Divider >>> precision >>> * is 2 then the equation becomes (ullfeedbackDivider + 5*100) /

Re: [PATCH] drm/amd/display/dc/dce: Fix multiple potential integer overflows

2018-07-05 Thread Gustavo A. R. Silva
Hi Michel, On 07/04/2018 02:38 AM, Michel Dänzer wrote: > On 2018-07-04 03:13 AM, Gustavo A. R. Silva wrote: >> Add suffix ULL to constant 5 and cast variables target_pix_clk_khz and >> feedback_divider to uint64_t in order to avoid multiple potential integer >> overflows and give the compiler

Re: [PATCH] drm/amd/display/dc/dce: Fix multiple potential integer overflows

2018-07-04 Thread Harry Wentland
On 2018-07-04 01:54 PM, Gustavo A. R. Silva wrote: > > > On 07/04/2018 12:51 PM, Harry Wentland wrote: > [..] @@ -145,8 +145,8 @@ static bool calculate_fb_and_fractional_fb_divider( * of fractional feedback decimal point and the fractional FB Divider precision *

Re: [PATCH] drm/amd/display/dc/dce: Fix multiple potential integer overflows

2018-07-04 Thread Harry Wentland
On 2018-07-04 03:38 AM, Michel Dänzer wrote: > On 2018-07-04 03:13 AM, Gustavo A. R. Silva wrote: >> Add suffix ULL to constant 5 and cast variables target_pix_clk_khz and >> feedback_divider to uint64_t in order to avoid multiple potential integer >> overflows and give the compiler complete

Re: [PATCH] drm/amd/display/dc/dce: Fix multiple potential integer overflows

2018-07-04 Thread Michel Dänzer
On 2018-07-04 03:13 AM, Gustavo A. R. Silva wrote: > Add suffix ULL to constant 5 and cast variables target_pix_clk_khz and > feedback_divider to uint64_t in order to avoid multiple potential integer > overflows and give the compiler complete information about the proper > arithmetic to use. > >

[PATCH] drm/amd/display/dc/dce: Fix multiple potential integer overflows

2018-07-04 Thread Gustavo A. R. Silva
Add suffix ULL to constant 5 and cast variables target_pix_clk_khz and feedback_divider to uint64_t in order to avoid multiple potential integer overflows and give the compiler complete information about the proper arithmetic to use. Notice that such constant and variables are used in contexts