lkml.org 
[lkml]   [2008]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: [PATCH 2/3] drivers/media/video/sn9c102/sn9c102_core.c Fix Unlikely(x) == y
Date
It's okay, thanks.

Reviewed-by: Luca Risolia <luca.risolia@studio.unibo.it>
---

On Saturday 16 February 2008 17:12:26 Roel Kluin wrote:
> The patch below was not yet tested. If it's incorrect, please comment.
> ---
> Fix Unlikely(x) == y
>
> Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
> ---
> diff --git a/drivers/media/video/sn9c102/sn9c102_core.c
> b/drivers/media/video/sn9c102/sn9c102_core.c index c40ba3a..66313b1 100644
> --- a/drivers/media/video/sn9c102/sn9c102_core.c
> +++ b/drivers/media/video/sn9c102/sn9c102_core.c
> @@ -528,7 +528,7 @@ sn9c102_find_sof_header(struct sn9c102_device* cam,
> void* mem, size_t len)
>
> /* Search for the SOF marker (fixed part) in the header */
> for (j = 0, b=cam->sof.bytesread; j+b < sizeof(marker); j++) {
> - if (unlikely(i+j) == len)
> + if (unlikely(i+j == len))
> return NULL;
> if (*(m+i+j) == marker[cam->sof.bytesread]) {
> cam->sof.header[cam->sof.bytesread] = *(m+i+j);




\
 
 \ /
  Last update: 2008-02-16 19:23    [W:0.029 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site