From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S938854AbcJGQNf (ORCPT ); Fri, 7 Oct 2016 12:13:35 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:60708 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933178AbcJGQN2 (ORCPT ); Fri, 7 Oct 2016 12:13:28 -0400 Date: Fri, 7 Oct 2016 18:13:14 +0200 From: Peter Zijlstra To: Linus Torvalds Cc: Waiman Long , Jason Low , Ding Tianhong , Thomas Gleixner , Will Deacon , Ingo Molnar , Imre Deak , Linux Kernel Mailing List , Davidlohr Bueso , Tim Chen , Terry Rudd , "Paul E. McKenney" , Chris Wilson , Daniel Vetter , Rob Clark Subject: Re: [PATCH -v4 1/8] locking/drm: Kill mutex trickery Message-ID: <20161007161314.GD3142@twins.programming.kicks-ass.net> References: <20161007145243.361481786@infradead.org> <20161007150210.927453282@infradead.org> <20161007154351.GL3117@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 07, 2016 at 08:58:43AM -0700, Linus Torvalds wrote: > Ugh. I think the concept is fine, but can we place make these enum's > be all upper case or something to make them really stand out visually. OK. > The other choice would be to just make the choices be negative (== > recursive), zero (== failed) or positive (== got lock), which allows > for the same value re-use for the non-recursive case, and you could > avoid the enum entirely. I thought about that, but liked the enum better for having to then spell it out. I'll go make the enum shout and add comment as you suggest.