linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: drivers/staging/media/ipu3/ipu3-css.c:1831: bad compare ?
       [not found] <DB7PR08MB380173BC25D42FD8E5C9ED8C9C890@DB7PR08MB3801.eurprd08.prod.outlook.com>
@ 2019-01-08  0:07 ` sakari.ailus
  0 siblings, 0 replies; only message in thread
From: sakari.ailus @ 2019-01-08  0:07 UTC (permalink / raw)
  To: David Binderman; +Cc: mchehab, gregkh, linux-media, devel, linux-kernel

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-01-08  0:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <DB7PR08MB380173BC25D42FD8E5C9ED8C9C890@DB7PR08MB3801.eurprd08.prod.outlook.com>
2019-01-08  0:07 ` drivers/staging/media/ipu3/ipu3-css.c:1831: bad compare ? sakari.ailus

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).