From: Jens Axboe <axboe@suse.de>
To: Benoit Boissinot <benoit.boissinot@ens-lyon.org>
Cc: Andrew Morton <akpm@osdl.org>, Christoph Hellwig <hch@lst.de>,
linux-kernel@vger.kernel.org
Subject: Re: [patch 2.6.15-mm4] drivers/cdrom/cdrom.c fix incorrect test
Date: Mon, 16 Jan 2006 09:40:27 +0100 [thread overview]
Message-ID: <20060116084026.GM3945@suse.de> (raw)
In-Reply-To: <20060114230453.GC26443@ens-lyon.fr>
On Sun, Jan 15 2006, Benoit Boissinot wrote:
> On Sat, Jan 14, 2006 at 11:49:26PM +0100, Benoit Boissinot wrote:
> > In cleanup-cdrom_ioctl.patch,
> >
> > the test in CDROMREADTOCENTRY ioctl was changed from
> >
> > if (!((requested_format == CDROM_MSF) || (requested_format == CDROM_LBA)))
> > return -EINVAL;
> >
> > to
> >
> > if (requested_format != CDROM_MSF || requested_format != CDROM_LBA)
> > return -EINVAL;
> >
> > which is not equivalent with morgan's law.
> >
>
> sorry, it doesn't apply with -p1 correct patch below:
>
> In cleanup-cdrom_ioctl.patch,
> the test in CDROMREADTOCENTRY ioctl was changed from
>
> if (!((requested_format == CDROM_MSF) || (requested_format == CDROM_LBA)))
> return -EINVAL;
> to
>
> if (requested_format != CDROM_MSF || requested_format != CDROM_LBA)
> return -EINVAL;
>
> which is not equivalent with morgan's law.
>
> Signed-off-by: Benoit Boissinot <benoit.boissinot@ens-lyon.org>
>
> diff -Naurp -X Documentation/dontdiff ../linux/drivers/cdrom/cdrom.c drivers/cdrom/cdrom.c
> --- a/drivers/cdrom/cdrom.c 2006-01-14 16:11:43.000000000 +0100
> +++ b/drivers/cdrom/cdrom.c 2006-01-14 23:44:51.000000000 +0100
> @@ -2585,7 +2585,7 @@ static int cdrom_ioctl_read_tocentry(str
> return -EFAULT;
>
> requested_format = entry.cdte_format;
> - if (requested_format != CDROM_MSF || requested_format != CDROM_LBA)
> + if (requested_format != CDROM_MSF && requested_format != CDROM_LBA)
> return -EINVAL;
> /* make interface to low-level uniform */
> entry.cdte_format = CDROM_MSF;
Good catch, thanks!
--
Jens Axboe
prev parent reply other threads:[~2006-01-16 8:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-14 22:49 [patch 2.6.15-mm4] drivers/cdrom/cdrom.c fix incorrect test Benoit Boissinot
2006-01-14 23:04 ` Benoit Boissinot
2006-01-16 8:40 ` Jens Axboe [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=20060116084026.GM3945@suse.de \
--to=axboe@suse.de \
--cc=akpm@osdl.org \
--cc=benoit.boissinot@ens-lyon.org \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.