Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935954AbcJQQjm (ORCPT ); Mon, 17 Oct 2016 12:39:42 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:53021 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935598AbcJQQja (ORCPT ); Mon, 17 Oct 2016 12:39:30 -0400 Date: Mon, 17 Oct 2016 09:39:28 -0700 From: Christoph Hellwig To: Binoy Jayan Cc: Doug Ledford , Sean Hefty , Hal Rosenstock , Arnd Bergmann , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 6/8] IB/hns: Replace counting semaphore event_sem with wait condition Message-ID: <20161017163927.GA7207@infradead.org> References: <1476721862-7070-1-git-send-email-binoy.jayan@linaro.org> <1476721862-7070-7-git-send-email-binoy.jayan@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1476721862-7070-7-git-send-email-binoy.jayan@linaro.org> User-Agent: Mutt/1.6.1 (2016-04-27) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 437 Lines: 8 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.