* [PATCH 3/3] drivers/s390/block/dcssblk.c: Fix Unlikely(x) != y
@ 2008-02-16 16:16 Roel Kluin
2008-02-17 9:12 ` Heiko Carstens
0 siblings, 1 reply; 2+ messages in thread
From: Roel Kluin @ 2008-02-16 16:16 UTC (permalink / raw)
To: schwidefsky, Heiko Carstens, linux390; +Cc: linux-s390, lkml
The patch below was not yet tested. If it's correct as it is, please comment.
---
Fix Unlikely(x) != y
Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
---
diff --git a/drivers/s390/block/dcssblk.c b/drivers/s390/block/dcssblk.c
index 3faf053..e6c94db 100644
--- a/drivers/s390/block/dcssblk.c
+++ b/drivers/s390/block/dcssblk.c
@@ -666,7 +666,7 @@ dcssblk_make_request(struct request_queue *q, struct bio *bio)
page_addr = (unsigned long)
page_address(bvec->bv_page) + bvec->bv_offset;
source_addr = dev_info->start + (index<<12) + bytes_done;
- if (unlikely(page_addr & 4095) != 0 || (bvec->bv_len & 4095) != 0)
+ if (unlikely((page_addr & 4095) != 0) || (bvec->bv_len & 4095) != 0)
// More paranoia.
goto fail;
if (bio_data_dir(bio) == READ) {
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 3/3] drivers/s390/block/dcssblk.c: Fix Unlikely(x) != y
2008-02-16 16:16 [PATCH 3/3] drivers/s390/block/dcssblk.c: Fix Unlikely(x) != y Roel Kluin
@ 2008-02-17 9:12 ` Heiko Carstens
0 siblings, 0 replies; 2+ messages in thread
From: Heiko Carstens @ 2008-02-17 9:12 UTC (permalink / raw)
To: Roel Kluin; +Cc: schwidefsky, linux390, linux-s390, lkml
On Sat, Feb 16, 2008 at 05:16:26PM +0100, Roel Kluin wrote:
> The patch below was not yet tested. If it's correct as it is, please comment.
> ---
> Fix Unlikely(x) != y
>
> Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
> ---
> diff --git a/drivers/s390/block/dcssblk.c b/drivers/s390/block/dcssblk.c
> index 3faf053..e6c94db 100644
> --- a/drivers/s390/block/dcssblk.c
> +++ b/drivers/s390/block/dcssblk.c
> @@ -666,7 +666,7 @@ dcssblk_make_request(struct request_queue *q, struct bio *bio)
> page_addr = (unsigned long)
> page_address(bvec->bv_page) + bvec->bv_offset;
> source_addr = dev_info->start + (index<<12) + bytes_done;
> - if (unlikely(page_addr & 4095) != 0 || (bvec->bv_len & 4095) != 0)
> + if (unlikely((page_addr & 4095) != 0) || (bvec->bv_len & 4095) != 0)
> // More paranoia.
> goto fail;
> if (bio_data_dir(bio) == READ) {
Your patch is correct, thank you! At least it wasn't a real bug. Will be applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-02-17 9:12 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:16 [PATCH 3/3] drivers/s390/block/dcssblk.c: Fix Unlikely(x) != y Roel Kluin
2008-02-17 9:12 ` Heiko Carstens
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox