Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932373AbbGJQ1y (ORCPT ); Fri, 10 Jul 2015 12:27:54 -0400 Received: from casper.infradead.org ([85.118.1.10]:41464 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932155AbbGJQ1o (ORCPT ); Fri, 10 Jul 2015 12:27:44 -0400 Date: Fri, 10 Jul 2015 18:27:39 +0200 From: Peter Zijlstra To: Russell King - ARM Linux Cc: Chris Metcalf , Geert Uytterhoeven , "linux-kernel@vger.kernel.org" , Linux-Arch , Richard Henderson , Vineet Gupta , Will Deacon , =?iso-8859-1?Q?H=E5vard?= Skinnemoen , Miao Steven , David Howells , Richard Kuo , Tony Luck , James Hogan , Ralf Baechle , "James E.J. Bottomley" , Benjamin Herrenschmidt , Heiko Carstens , "David S. Miller" , Ingo Molnar Subject: Re: [RFC][PATCH 23/24] atomic: Collapse all atomic_{set,clear}_mask definitions Message-ID: <20150710162739.GN19282@twins.programming.kicks-ass.net> References: <20150709172855.564686637@infradead.org> <20150709175310.229218215@infradead.org> <20150710103945.GH19282@twins.programming.kicks-ass.net> <559FC9CC.6000400@ezchip.com> <20150710134256.GS7557@n2100.arm.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150710134256.GS7557@n2100.arm.linux.org.uk> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1078 Lines: 26 On Fri, Jul 10, 2015 at 02:42:56PM +0100, Russell King - ARM Linux wrote: > The obvious question though is whether we have an established name for this > operation elsewhere in the kernel, and whether we should have consistency. Consistency is good. > In include/linux, we already have (grepping for 'and_*not'): > > include/linux/nodemask.h:#define nodes_andnot(dst, src1, src2) \ > include/linux/bitmap.h:extern int __bitmap_andnot(unsigned long *dst, const unsigned long *bitmap1, > include/linux/cpumask.h:static inline int cpumask_andnot(struct cpumask *dstp, > > We also have: > > include/linux/signal.h:#define _sig_andn(x,y) ((x) & ~(y)) > > which seems to be the only instance of "andn" in include/. How about I rename the _sig_andn one to _sig_andnot, and go with atomic_andnot, to match the *mask functions. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/