From: Tejun Heo <tj@kernel.org>
To: Greg Kroah-Hartman <gregkh@suse.de>,
Milton Miller <miltonm@bga.com>, Jens Axboe <axboe@kernel.dk>
Cc: Kay Sievers <kay.sievers@vrfy.org>,
David Cross <david.cross@cypress.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH] staging: Fix bdops->check_events() misconversion in cyasblkdev_block.c
Date: Fri, 25 Mar 2011 15:38:22 +0100 [thread overview]
Message-ID: <20110325143822.GE1409@htj.dyndns.org> (raw)
In-Reply-To: <check-events-cyasblkdev-block-suspect@mdm.bga.com>
Commit cafb0bfca1 (staging: Convert to bdops->check_events())
incorrectly set bd->user_disk_0->events while initializing
bd->user_disk_1. Fix it.
The problem was spotted by Milton's suspect code pattern detector.
Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Milton Miller <miltonm@bga.com>
---
Nice spotting Milton. Thank you.
drivers/staging/westbridge/astoria/block/cyasblkdev_block.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/westbridge/astoria/block/cyasblkdev_block.c b/drivers/staging/westbridge/astoria/block/cyasblkdev_block.c
index 842cd92..289729d 100644
--- a/drivers/staging/westbridge/astoria/block/cyasblkdev_block.c
+++ b/drivers/staging/westbridge/astoria/block/cyasblkdev_block.c
@@ -1191,7 +1191,7 @@ static int cyasblkdev_add_disks(int bus_num,
bd->user_disk_1->first_minor = (devidx + 1) << CYASBLKDEV_SHIFT;
bd->user_disk_1->minors = 8;
bd->user_disk_1->fops = &cyasblkdev_bdops;
- bd->user_disk_0->events = DISK_EVENT_MEDIA_CHANGE;
+ bd->user_disk_1->events = DISK_EVENT_MEDIA_CHANGE;
bd->user_disk_1->private_data = bd;
bd->user_disk_1->queue = bd->queue.queue;
bd->dbgprn_flags = DBGPRN_RD_RQ;
prev parent reply other threads:[~2011-03-25 14:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-25 10:48 suspect code in cyasblkdev_block conversion to bdops->check_events() Milton Miller
2011-03-25 14:38 ` Tejun Heo [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=20110325143822.GE1409@htj.dyndns.org \
--to=tj@kernel.org \
--cc=axboe@kernel.dk \
--cc=david.cross@cypress.com \
--cc=gregkh@suse.de \
--cc=kay.sievers@vrfy.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miltonm@bga.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
all inboxes | Powered by JetHome®