From: Animesh Manna <animesh.manna@intel.com>
To: Daniel Vetter <daniel@ffwll.ch>, Takashi Iwai <tiwai@suse.de>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Fix CSR MMIO address check
Date: Thu, 10 Sep 2015 01:27:29 +0530 [thread overview]
Message-ID: <55F08F29.6000504@intel.com> (raw)
In-Reply-To: <20150909153051.GT2767@phenom.ffwll.local>
On 9/9/2015 9:00 PM, Daniel Vetter wrote:
> On Wed, Sep 09, 2015 at 04:52:09PM +0200, Takashi Iwai wrote:
>> Fix a wrong logical AND (&&) used for the range check of CSR MMIO.
>>
>> Spotted nicely by gcc -Wlogical-op flag:
>> drivers/gpu/drm/i915/intel_csr.c: In function ‘finish_csr_load’:
>> drivers/gpu/drm/i915/intel_csr.c:353:41: warning: logical ‘and’ of mutually exclusive tests is always false [-Wlogical-op]
>>
>> Fixes: eb805623d8b1 ('drm/i915/skl: Add support to load SKL CSR firmware.')
>> Cc: <stable@vger.kernel.org> # v4.2
>> Signed-off-by: Takashi Iwai <tiwai@suse.de>
> Oops. Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> and for Jani.
> -Daniel
The same change is submitted part of dmc-redesign patch series.
http://lists.freedesktop.org/archives/intel-gfx/2015-August/074447.html
-Animesh
>
>> ---
>> drivers/gpu/drm/i915/intel_csr.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_csr.c b/drivers/gpu/drm/i915/intel_csr.c
>> index ba1ae031e6fd..d0f1b8d833cd 100644
>> --- a/drivers/gpu/drm/i915/intel_csr.c
>> +++ b/drivers/gpu/drm/i915/intel_csr.c
>> @@ -350,7 +350,7 @@ static void finish_csr_load(const struct firmware *fw, void *context)
>> }
>> csr->mmio_count = dmc_header->mmio_count;
>> for (i = 0; i < dmc_header->mmio_count; i++) {
>> - if (dmc_header->mmioaddr[i] < CSR_MMIO_START_RANGE &&
>> + if (dmc_header->mmioaddr[i] < CSR_MMIO_START_RANGE ||
>> dmc_header->mmioaddr[i] > CSR_MMIO_END_RANGE) {
>> DRM_ERROR(" Firmware has wrong mmio address 0x%x\n",
>> dmc_header->mmioaddr[i]);
>> --
>> 2.5.1
>>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-09-09 19:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-09 14:52 [PATCH] drm/i915: Fix CSR MMIO address check Takashi Iwai
2015-09-09 15:30 ` Daniel Vetter
2015-09-09 19:57 ` Animesh Manna [this message]
2015-09-10 9:13 ` Jani Nikula
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=55F08F29.6000504@intel.com \
--to=animesh.manna@intel.com \
--cc=daniel@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
--cc=tiwai@suse.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.