RE: [bug report] drm/amdgpu/vpe: enable vpe dpm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[Public]

Hi Dan Carpenter,

This was fixed in https://patchwork.freedesktop.org/patch/573477/?series=128249&rev=1

Thank you!

Regards,
Srini

-----Original Message-----
From: amd-gfx <amd-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx> On Behalf Of Dan Carpenter
Sent: Friday, January 5, 2024 7:04 PM
To: Lee, Peyton <Peyton.Lee@xxxxxxx>
Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx; amd-gfx@xxxxxxxxxxxxxxxxxxxxx
Subject: [bug report] drm/amdgpu/vpe: enable vpe dpm

Hello Peyton Lee,

The patch 5f82a0c90cca: "drm/amdgpu/vpe: enable vpe dpm" from Dec 12,
2023 (linux-next), leads to the following Smatch static checker
warning:

drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c:62 vpe_u1_8_from_fraction() warn: unsigned 'numerator' is never less than zero.
drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c:63 vpe_u1_8_from_fraction() warn: unsigned 'denominator' is never less than zero.

drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c
    60 static uint16_t vpe_u1_8_from_fraction(uint16_t numerator, uint16_t denominator)
    61 {
--> 62         bool arg1_negative = numerator < 0;
    63         bool arg2_negative = denominator < 0;

uint16_t can't be negative.

    64
    65         uint16_t arg1_value = (uint16_t)(arg1_negative ? -numerator : numerator);
    66         uint16_t arg2_value = (uint16_t)(arg2_negative ? -denominator : denominator);
    67
    68         uint16_t remainder;
    69

regards,
dan carpenter




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux