From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Colin King <colin.king@canonical.com>,
Jani Nikula <jani.nikula@linux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
David Airlie <airlied@linux.ie>,
intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/i915: remove redundant check on has_aliasing_ppgtt
Date: Tue, 10 Oct 2017 14:35:00 +0000 [thread overview]
Message-ID: <1507646100.7677.24.camel@linux.intel.com> (raw)
In-Reply-To: <20171010134733.17516-1-colin.king@canonical.com>
On Tue, 2017-10-10 at 14:47 +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> There is a previous check to on has_aliasing_ppgtt that returns
> 0 if it is false, so it is impossible for has_aliasing_ppgtt to
> be false on the final return of function intel_sanitize_enable_ppgtt,
> so final return in the function always will return 1. Hence the
> redundant ternary operator can be replaced with a return 1.
>
> Detected by CoverityScan, CID#1357136 ("Logically dead code")
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Thanks, I took it a few steps further and removed the variable
altogether. I Cc'd you on the patch.
Regards, Joonas
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
next prev parent reply other threads:[~2017-10-10 14:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-10 13:47 [PATCH] drm/i915: remove redundant check on has_aliasing_ppgtt Colin King
2017-10-10 14:35 ` Joonas Lahtinen [this message]
2017-10-10 14:36 ` Colin Ian King
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=1507646100.7677.24.camel@linux.intel.com \
--to=joonas.lahtinen@linux.intel.com \
--cc=airlied@linux.ie \
--cc=colin.king@canonical.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rodrigo.vivi@intel.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