Re: [patch] drm/amd/powerplay: precedence bug in init_non_clock_fields()

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

 



On Mon, Jan 4, 2016 at 3:44 PM, Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote:
> The cast to uint8_t happens before the right shift so this always sets
> .m3arb to zero.  The cast is actually a no-op so we can remove it.
>
> Fixes: 3bace3591493 ('drm/amd/powerplay: add hardware manager sub-component')
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

Applied.  thanks!

Alex

> ---
> Static analysis stuff.  Not tested.
>
> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c b/drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c
> index 1d385f4..9031a44 100644
> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c
> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c
> @@ -735,8 +735,8 @@ static int init_non_clock_fields(struct pp_hwmgr *hwmgr,
>
>         ps->memory.dllOff = (0 != tmp);
>
> -       ps->memory.m3arb = (uint8_t)(le32_to_cpu(pnon_clock_info->ulCapsAndSettings) &
> -                                               ATOM_PPLIB_M3ARB_MASK) >> ATOM_PPLIB_M3ARB_SHIFT;
> +       ps->memory.m3arb = (le32_to_cpu(pnon_clock_info->ulCapsAndSettings) &
> +                           ATOM_PPLIB_M3ARB_MASK) >> ATOM_PPLIB_M3ARB_SHIFT;
>
>         ps->temperatures.min = PP_TEMPERATURE_UNITS_PER_CENTIGRADES *
>                                      pnon_clock_info->ucMinTemperature;
> _______________________________________________
> dri-devel mailing list
> dri-devel@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel




[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