public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Heiko Carstens <heiko.carstens@de.ibm.com>
To: Roel Kluin <12o3l@tiscali.nl>
Cc: schwidefsky@de.ibm.com, linux390@de.ibm.com,
	linux-s390@vger.kernel.org, lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/3] drivers/s390/block/dcssblk.c: Fix Unlikely(x) != y
Date: Sun, 17 Feb 2008 10:12:33 +0100	[thread overview]
Message-ID: <20080217091233.GB8030@osiris.ibm.com> (raw)
In-Reply-To: <47B70C5A.8070202@tiscali.nl>

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.

      reply	other threads:[~2008-02-17  9:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

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=20080217091233.GB8030@osiris.ibm.com \
    --to=heiko.carstens@de.ibm.com \
    --cc=12o3l@tiscali.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linux390@de.ibm.com \
    --cc=schwidefsky@de.ibm.com \
    /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