* [PATCH 2/3] drivers/media/video/sn9c102/sn9c102_core.c Fix Unlikely(x) == y
@ 2008-02-16 16:12 Roel Kluin
2008-02-16 18:09 ` Luca Risolia
0 siblings, 1 reply; 2+ messages in thread
From: Roel Kluin @ 2008-02-16 16:12 UTC (permalink / raw)
To: luca.risolia; +Cc: linux-usb, video4linux-list, lkml
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);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 2/3] drivers/media/video/sn9c102/sn9c102_core.c Fix Unlikely(x) == y
2008-02-16 16:12 [PATCH 2/3] drivers/media/video/sn9c102/sn9c102_core.c Fix Unlikely(x) == y Roel Kluin
@ 2008-02-16 18:09 ` Luca Risolia
0 siblings, 0 replies; 2+ messages in thread
From: Luca Risolia @ 2008-02-16 18:09 UTC (permalink / raw)
To: Roel Kluin; +Cc: linux-usb, video4linux-list, lkml
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);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-02-16 18:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-16 16:12 [PATCH 2/3] drivers/media/video/sn9c102/sn9c102_core.c Fix Unlikely(x) == y Roel Kluin
2008-02-16 18:09 ` Luca Risolia
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox