Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934447Ab1CYKsE (ORCPT ); Fri, 25 Mar 2011 06:48:04 -0400 Received: from mail4.comsite.net ([205.238.176.238]:61722 "EHLO mail4.comsite.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934195Ab1CYKsD (ORCPT ); Fri, 25 Mar 2011 06:48:03 -0400 X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=71.22.127.106; From: Milton Miller Subject: suspect code in cyasblkdev_block conversion to bdops->check_events() To: Tejun Heo Cc: Greg Kroah-Hartman , Jens Axboe , Kay Sievers , David Cross , linux-kernel@vger.kernel.org Message-Id: Date: Fri, 25 Mar 2011 06:48:03 -0400 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2427 Lines: 57 > commit cafb0bfca1a73efd6d8a4a6a6a716e6134b96c24 > Author: Tejun Heo > Commit: Tejun Heo > > staging: Convert to bdops->check_events() > > Convert two staging drivers - blkvsc_drv and cyasblkdev_block - from > ->media_changed() to ->check_events(). The former always indicated > media changed while the latter always indicated media not changed. > Not sure what the drivers are trying to achieve but keep the original > behavior. > > Signed-off-by: Tejun Heo > Acked-by: Greg Kroah-Hartman > Cc: Jens Axboe > Cc: Kay Sievers > .. > diff --git a/drivers/staging/westbridge/astoria/block/cyasblkdev_block.c b/drivers/staging/westbridge/astoria/block/cyasblkdev_block.c > index e1851f0..842cd92 100644 .. > @@ -1090,6 +1090,7 @@ static int cyasblkdev_add_disks(int bus_num, > bd->user_disk_0->first_minor = devidx << CYASBLKDEV_SHIFT; > bd->user_disk_0->minors = 8; > bd->user_disk_0->fops = &cyasblkdev_bdops; > + bd->user_disk_0->events = DISK_EVENT_MEDIA_CHANGE; > bd->user_disk_0->private_data = bd; > bd->user_disk_0->queue = bd->queue.queue; > bd->dbgprn_flags = DBGPRN_RD_RQ; > @@ -1190,6 +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->private_data = bd; Date: Fri, 25 Mar 2011 04:48:01 -0600 X-Originating-IP: 71.22.127.106 The 0 on the above line triggered my suspect code pattern detector. > bd->user_disk_1->queue = bd->queue.queue; > bd->dbgprn_flags = DBGPRN_RD_RQ; > @@ -1278,6 +1280,7 @@ static int cyasblkdev_add_disks(int bus_num, > (devidx + 2) << CYASBLKDEV_SHIFT; > bd->system_disk->minors = 8; > bd->system_disk->fops = &cyasblkdev_bdops; > + bd->system_disk->events = DISK_EVENT_MEDIA_CHANGE; > bd->system_disk->private_data = bd; > bd->system_disk->queue = bd->queue.queue; > /* don't search for vfat milton -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/