Skip to content

Commit 86f06bc

Browse files
Samson Tamalexdeucher
authored andcommitted
drm/amd/display: Fix mismatch type comparison in custom_float
[Why & How] Passing uint into uchar function param. Pass uint instead Signed-off-by: Samson Tam <Samson.Tam@amd.com> Reviewed-by: Alvin Lee <alvin.lee2@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 97b05c8 commit 86f06bc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

drivers/gpu/drm/amd/display/dc/sspl/spl_fixpt31_32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ struct spl_fixed31_32 spl_fixpt_exp(struct spl_fixed31_32 arg)
346346
if (m > 0)
347347
return spl_fixpt_shl(
348348
spl_fixed31_32_exp_from_taylor_series(r),
349-
(unsigned char)m);
349+
(unsigned int)m);
350350
else
351351
return spl_fixpt_div_int(
352352
spl_fixed31_32_exp_from_taylor_series(r),

drivers/gpu/drm/amd/display/dc/sspl/spl_fixpt31_32.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ static inline struct spl_fixed31_32 spl_fixpt_clamp(
189189
* @brief
190190
* result = arg << shift
191191
*/
192-
static inline struct spl_fixed31_32 spl_fixpt_shl(struct spl_fixed31_32 arg, unsigned char shift)
192+
static inline struct spl_fixed31_32 spl_fixpt_shl(struct spl_fixed31_32 arg, unsigned int shift)
193193
{
194194
SPL_ASSERT(((arg.value >= 0) && (arg.value <= LLONG_MAX >> shift)) ||
195195
((arg.value < 0) && (arg.value >= ~(LLONG_MAX >> shift))));
@@ -203,7 +203,7 @@ static inline struct spl_fixed31_32 spl_fixpt_shl(struct spl_fixed31_32 arg, uns
203203
* @brief
204204
* result = arg >> shift
205205
*/
206-
static inline struct spl_fixed31_32 spl_fixpt_shr(struct spl_fixed31_32 arg, unsigned char shift)
206+
static inline struct spl_fixed31_32 spl_fixpt_shr(struct spl_fixed31_32 arg, unsigned int shift)
207207
{
208208
bool negative = arg.value < 0;
209209

0 commit comments

Comments
 (0)