Re: [patch -next] drm/radeon/dpm/btc: off by one in btc_set_mc_special_registers()

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

 



On Fri, Sep 27, 2013 at 4:18 PM, Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote:
> It should be ">=" instead of ">" here.  The table->mc_reg_address[]
> array has SMC_EVERGREEN_MC_REGISTER_ARRAY_SIZE (16) elements.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> ---
> Resend.

Applied.  thanks!

Alex

>
> diff --git a/drivers/gpu/drm/radeon/btc_dpm.c b/drivers/gpu/drm/radeon/btc_dpm.c
> index bab0185..55491e7 100644
> --- a/drivers/gpu/drm/radeon/btc_dpm.c
> +++ b/drivers/gpu/drm/radeon/btc_dpm.c
> @@ -1913,7 +1913,7 @@ static int btc_set_mc_special_registers(struct radeon_device *rdev,
>                         }
>                         j++;
>
> -                       if (j > SMC_EVERGREEN_MC_REGISTER_ARRAY_SIZE)
> +                       if (j >= SMC_EVERGREEN_MC_REGISTER_ARRAY_SIZE)
>                                 return -EINVAL;
>
>                         tmp = RREG32(MC_PMG_CMD_MRS);
> @@ -1928,7 +1928,7 @@ static int btc_set_mc_special_registers(struct radeon_device *rdev,
>                         }
>                         j++;
>
> -                       if (j > SMC_EVERGREEN_MC_REGISTER_ARRAY_SIZE)
> +                       if (j >= SMC_EVERGREEN_MC_REGISTER_ARRAY_SIZE)
>                                 return -EINVAL;
>                         break;
>                 case MC_SEQ_RESERVE_M >> 2:
> @@ -1942,7 +1942,7 @@ static int btc_set_mc_special_registers(struct radeon_device *rdev,
>                         }
>                         j++;
>
> -                       if (j > SMC_EVERGREEN_MC_REGISTER_ARRAY_SIZE)
> +                       if (j >= SMC_EVERGREEN_MC_REGISTER_ARRAY_SIZE)
>                                 return -EINVAL;
>                         break;
>                 default:
> _______________________________________________
> dri-devel mailing list
> dri-devel@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux