Re: [PATCH 10/16] ub: Convert to bdops->check_events()
From: Pete Zaitcev
Date: Wed Mar 09 2011 - 11:47:36 EST
On Wed, 9 Mar 2011 10:13:30 +0100
Tejun Heo <tj@xxxxxxxxxx> wrote:
> +++ b/drivers/block/ub.c
> @@ -1788,7 +1788,8 @@ static int ub_bd_revalidate(struct gendisk *disk)
> *
> * The return code is bool!
> */
> -static int ub_bd_media_changed(struct gendisk *disk)
> +static unsigned int ub_bd_check_events(struct gendisk *disk,
> + unsigned int clearing)
> - return lun->changed;
> + return lun->changed ? DISK_EVENT_MEDIA_CHANGE : 0;
> }
Return code is not so bool anymore. The comment meant that usually
"int" means "return 0 on success, -1 on failure, maybe some integer
for a tricky condition" but not here. I'll have the comment fixed up,
or if you want you do it.
-- Pete
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/