From: Jani Nikula <jani.nikula@linux.intel.com>
To: linux-kernel@vger.kernel.org
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
David Airlie <airlied@linux.ie>,
intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
Andrzej Hajda <a.hajda@samsung.com>,
Daniel Vetter <daniel.vetter@intel.com>,
Marek Szyprowski <m.szyprowski@samsung.com>
Subject: Re: [PATCH 03/38] drm/i915: fix handling gen8_emit_flush_coherentl3_wa result
Date: Mon, 21 Sep 2015 16:59:58 +0300 [thread overview]
Message-ID: <87vbb398kh.fsf@intel.com> (raw)
In-Reply-To: <1442842450-29769-4-git-send-email-a.hajda@samsung.com>
On Mon, 21 Sep 2015, Andrzej Hajda <a.hajda@samsung.com> wrote:
> The function can return negative value.
>
> The problem has been detected using proposed semantic patch
> scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1].
>
> [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576
>
> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/i915/intel_lrc.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> index fe06accb0..ff9a481 100644
> --- a/drivers/gpu/drm/i915/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> @@ -1254,9 +1254,10 @@ static int gen8_init_indirectctx_bb(struct intel_engine_cs *ring,
>
> /* WaFlushCoherentL3CacheLinesAtContextSwitch:bdw */
> if (IS_BROADWELL(ring->dev)) {
> - index = gen8_emit_flush_coherentl3_wa(ring, batch, index);
> - if (index < 0)
> - return index;
> + int rc = gen8_emit_flush_coherentl3_wa(ring, batch, index);
> + if (rc < 0)
> + return rc;
> + index = rc;
> }
>
> /* WaClearSlmSpaceAtContextSwitch:bdw,chv */
> --
> 1.9.1
>
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
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-21 13:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-21 13:33 [PATCH 00/38] Fixes related to incorrect usage of unsigned types Andrzej Hajda
2015-09-21 13:33 ` [PATCH 03/38] drm/i915: fix handling gen8_emit_flush_coherentl3_wa result Andrzej Hajda
2015-09-21 13:59 ` Jani Nikula [this message]
2015-09-22 9:42 ` Daniel Vetter
[not found] ` <17571.1442842945@warthog.procyon.org.uk>
2015-09-22 9:13 ` [PATCH 00/38] Fixes related to incorrect usage of unsigned types Andrzej Hajda
2015-09-22 9:46 ` Jacek Anaszewski
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=87vbb398kh.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=a.hajda@samsung.com \
--cc=airlied@linux.ie \
--cc=b.zolnierkie@samsung.com \
--cc=daniel.vetter@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
/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