dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Alex Deucher <alexdeucher@gmail.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: David Airlie <airlied@linux.ie>,
	Alex Deucher <alexander.deucher@amd.com>,
	Jerome Glisse <jglisse@redhat.com>,
	kernel-janitors@vger.kernel.org,
	Maling list - DRI developers <dri-devel@lists.freedesktop.org>
Subject: Re: [patch -next] drm/radeon/dpm/btc: off by one in btc_set_mc_special_registers()
Date: Wed, 2 Oct 2013 11:33:44 -0400	[thread overview]
Message-ID: <CADnq5_M3nuMgex8OY670fGDStwa1CEzATVT3==Z9bm68tmAdjA@mail.gmail.com> (raw)
In-Reply-To: <20130927201838.GJ6247@mwanda>

On Fri, Sep 27, 2013 at 4:18 PM, Dan Carpenter <dan.carpenter@oracle.com> 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@oracle.com>
> ---
> 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@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2013-10-02 15:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-27 20:18 [patch -next] drm/radeon/dpm/btc: off by one in btc_set_mc_special_registers() Dan Carpenter
2013-10-02 15:33 ` Alex Deucher [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-07-01 16:35 Dan Carpenter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADnq5_M3nuMgex8OY670fGDStwa1CEzATVT3==Z9bm68tmAdjA@mail.gmail.com' \
    --to=alexdeucher@gmail.com \
    --cc=airlied@linux.ie \
    --cc=alexander.deucher@amd.com \
    --cc=dan.carpenter@oracle.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jglisse@redhat.com \
    --cc=kernel-janitors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).