Re: [PATCH 6/8] IB/hns: Replace counting semaphore event_sem with wait condition

From: Christoph Hellwig
Date: Mon Oct 17 2016 - 12:39:44 EST


On Mon, Oct 17, 2016 at 10:01:00PM +0530, Binoy Jayan wrote:
> Counting semaphores are going away in the future, so replace the semaphore
> hns_roce_cmdq::event_sem with an open-coded implementation.

Sorry, but no. Using a proper semaphore abstraction is always
better than open coding it. While most semaphore users should move
to better primitives, those that actually are counting semaphore
should stick to the existing primitive.