From: "Michal Wajdeczko" <michal.wajdeczko@intel.com>
To: "Jani Nikula" <jani.nikula@linux.intel.com>,
"Joonas Lahtinen" <joonas.lahtinen@linux.intel.com>,
"Rodrigo Vivi" <rodrigo.vivi@intel.com>,
"David Airlie" <airlied@linux.ie>,
intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
"Colin King" <colin.king@canonical.com>
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [Intel-gfx] [PATCH][V3] drm/i915/guc: fix GEM_BUG_ON check
Date: Tue, 12 Jun 2018 14:08:43 +0200 [thread overview]
Message-ID: <op.zkhv0tz5xaggs7@mwajdecz-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <20180612093804.11341-1-colin.king@canonical.com>
On Tue, 12 Jun 2018 11:38:04 +0200, Colin King <colin.king@canonical.com>
wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The check for level being less than zero always false because flags
> is currently unsigned and can never be negative. Fix this by making
> level a s32.
>
> Detected by CoverityScan, CID#1468363 ("Macro compares unsigned to 0")
>
> Fixes: cb5d64e9f13e ("drm/i915/guc: Allow user to control default GuC
> logging")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
>
> ---
> V3: Make level s32 and add the missing Fixes: tag, thanks to Dan
> Carpenter and
> Jani Nikula for correcting my mistakes
>
> ---
> drivers/gpu/drm/i915/intel_guc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_guc.c
> b/drivers/gpu/drm/i915/intel_guc.c
> index 116f4ccf1bbd..bdb1fab322bf 100644
> --- a/drivers/gpu/drm/i915/intel_guc.c
> +++ b/drivers/gpu/drm/i915/intel_guc.c
> @@ -205,7 +205,7 @@ void intel_guc_fini(struct intel_guc *guc)
> static u32 get_log_control_flags(void)
> {
> - u32 level = i915_modparams.guc_log_level;
> + s32 level = i915_modparams.guc_log_level;
s/s32 level/int level
to match modparam type as already suggested by others
> u32 flags = 0;
> GEM_BUG_ON(level < 0);
please note that this BUG_ON will go away with pending [1] so maybe
we can just merge series [2] instead ?
Thanks,
Michal
[1] https://patchwork.freedesktop.org/patch/227365/
[2] https://patchwork.freedesktop.org/series/44201/
prev parent reply other threads:[~2018-06-12 12:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-12 9:38 Colin King
2018-06-12 12:08 ` Michal Wajdeczko [this message]
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=op.zkhv0tz5xaggs7@mwajdecz-mobl1.ger.corp.intel.com \
--to=michal.wajdeczko@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=joonas.lahtinen@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
all inboxes | Powered by JetHome®