linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "sakari.ailus@linux.intel.com" <sakari.ailus@linux.intel.com>
To: David Binderman <dcb314@hotmail.com>
Cc: "mchehab@kernel.org" <mchehab@kernel.org>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
	"devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: drivers/staging/media/ipu3/ipu3-css.c:1831: bad compare ?
Date: Tue, 8 Jan 2019 02:07:20 +0200	[thread overview]
Message-ID: <20190108000719.2rvfpdnvaszl3r7x@kekkonen.localdomain> (raw)
In-Reply-To: <DB7PR08MB380173BC25D42FD8E5C9ED8C9C890@DB7PR08MB3801.eurprd08.prod.outlook.com>

Hi David,

On Mon, Jan 07, 2019 at 10:30:55PM +0000, David Binderman wrote:
> Hello there,
> 
> drivers/staging/media/ipu3/ipu3-css.c:1831:30: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
> 
> Source code is
>         css->pipes[pipe].bindex =
>                 ipu3_css_find_binary(css, pipe, q, r);
>         if (css->pipes[pipe].bindex < 0) {
>                 dev_err(css->dev, "failed to find suitable binary\n");
>                 return -EINVAL;
>         }
> 
> Suggest sanity check return value from function first, then if it is ok,
> assign it to an unsigned variable.

Thanks for reporting this. There have been a few patches to address it so
far, the one going in is here:

<URL:https://patchwork.linuxtv.org/patch/53633/>

-- 
Sakari Ailus
sakari.ailus@linux.intel.com

           reply	other threads:[~2019-01-08  0:07 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <DB7PR08MB380173BC25D42FD8E5C9ED8C9C890@DB7PR08MB3801.eurprd08.prod.outlook.com>]

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=20190108000719.2rvfpdnvaszl3r7x@kekkonen.localdomain \
    --to=sakari.ailus@linux.intel.com \
    --cc=dcb314@hotmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@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).