linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benoit Boissinot <benoit.boissinot@ens-lyon.org>
To: Andrew Morton <akpm@osdl.org>
Cc: Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@suse.de>,
	linux-kernel@vger.kernel.org
Subject: Re: [patch 2.6.15-mm4] drivers/cdrom/cdrom.c fix incorrect test
Date: Sun, 15 Jan 2006 00:04:53 +0100	[thread overview]
Message-ID: <20060114230453.GC26443@ens-lyon.fr> (raw)
In-Reply-To: <20060114224926.GB26443@ens-lyon.fr>

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;

  reply	other threads:[~2006-01-14 23:08 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 [this message]
2006-01-16  8:40   ` Jens Axboe

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=20060114230453.GC26443@ens-lyon.fr \
    --to=benoit.boissinot@ens-lyon.org \
    --cc=akpm@osdl.org \
    --cc=axboe@suse.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).