[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120119111151.GC2649@redhat.com>
Date: Thu, 19 Jan 2012 06:11:51 -0500
From: Vivek Goyal <vgoyal@...hat.com>
To: Tejun Heo <tj@...nel.org>
Cc: axboe@...nel.dk, ctalbott@...gle.com, rni@...gle.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 04/12] elevator: make elevator_init_fn() return 0/-errno
On Wed, Jan 18, 2012 at 05:11:22PM -0800, Tejun Heo wrote:
> elevator_ops->elevator_init_fn() has a weird return value. It returns
> a void * which the caller should assign to q->elevator->elevator_data
> and %NULL return denotes init failure.
>
> Update such that it returns integer 0/-errno and sets elevator_data
> directly as necessary.
>
kmalloc() does the same thing. returning pointer means success and null
means failure.
Also elevator initialization might not necessarily mean that you are
the active elevator. So cfq_init_queue() assuming that I am the active
elevator and setting up q->elevator->elevator_data sounds odd to me.
Personally, I liked previous interface better. But, let me read rest of
the patches and see how you have made use of it to do more cleanup.
Thanks
Vivek
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists