Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp1084934rwl; Thu, 5 Jan 2023 08:28:57 -0800 (PST) X-Google-Smtp-Source: AMrXdXuWMdAcMQGd5ELNGW+c4t9Y7/zzgnvzgAZyCqcMZisseH5c2GzLTQLnUuNEEtHLnJfSoVwT X-Received: by 2002:a62:6d07:0:b0:581:b3f4:21f8 with SMTP id i7-20020a626d07000000b00581b3f421f8mr25726373pfc.31.1672936136810; Thu, 05 Jan 2023 08:28:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672936136; cv=none; d=google.com; s=arc-20160816; b=kLOFIiucu9FHvYnFpdRyCLUXy7wkgMGJHGAbpEcPA60aTPa5+j+s4AZJQ9ZPI/KaaU DEVAMYojHGDa+1przAyGXT0MXHO5cEwMyBRhgx2W4q80YwFgwd+fmHuazs/XjsfVUVIF vOFy6hRJSeA+MsXMm0BL1SWF+wtOWs+igFm3zIlmLdc9kFHvzXj/QYmJGGWqWPRNg4lP EXcFMakhUy2c6d60dE/+Tl6i5/etPUGg8RtUoVxXGkXoSCJtA6UWsuIo+08CD3Ni365d 63zFGYgs58IWnLrqwSs/FyE5ZSRAVCmGJNFhW4CAdxyHIs6cOaVYmVclno7fWQMh1+Bb 9FyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:to:from:date; bh=1Na6+0QSq2bylpcJUJSDoctp49l2WxhoP72Y/vPF6A0=; b=Td9EZtyKOChIqdJffDJJhKyBjhryRexyJ5MiLOjH6uMfhq/pnoAdj5qkSak1c1fVid 63b9AN8k9Wo8CU2oZE1yJBUjb1xDDPp+HzBAoFyup1tFsXOBg6hJxfvEA6b17uOm6wxC hXwANdObP2e8r6AOUMi33SBy7mA0QLDg/dExli338qwJwOAPNRveC/b4mxBTXaTpX+Bq gjEXQj8K5A+gZaDDFOXau2ca8BQDJvhG3Tfe3ALkCDV7kZ7bRBOsgHpgdCYAEtl7PImI Gw/tBNXlX4FSmAvVFFyMJKrG6LbEkKewXCGoW2SYCN8sJ4pXyWITHon0qIckxq/k/H0O 0DlQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c15-20020a056a00248f00b005814490890bsi13718232pfv.127.2023.01.05.08.28.50; Thu, 05 Jan 2023 08:28:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234294AbjAEQQ6 (ORCPT + 55 others); Thu, 5 Jan 2023 11:16:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229828AbjAEQQ4 (ORCPT ); Thu, 5 Jan 2023 11:16:56 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2132A32E81 for ; Thu, 5 Jan 2023 08:16:55 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A35271063; Thu, 5 Jan 2023 08:17:36 -0800 (PST) Received: from FVFF77S0Q05N (unknown [10.57.45.56]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 3CAE13F71A; Thu, 5 Jan 2023 08:16:53 -0800 (PST) Date: Thu, 5 Jan 2023 16:16:50 +0000 From: Mark Rutland To: David Laight , 'Jani Nikula' , Arnd Bergmann , "intel-gfx@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , 'Andrzej Hajda' , Rodrigo Vivi , Andrew Morton , Andy Shevchenko Subject: Re: [Intel-gfx] [PATCH 1/5] linux/minmax.h: add non-atomic version of xchg Message-ID: References: <20221209154843.4162814-1-andrzej.hajda@intel.com> <875ydlw1p4.fsf@intel.com> <733cd0037bd14a269b54d701e1b80323@AcuMS.aculab.com> <6617dfb150f94cbb9654a585843e3287@AcuMS.aculab.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 05, 2023 at 03:57:25PM +0100, Daniel Vetter wrote: > It's more fun, for the atomic functions which don't have the atomic_ > prefix in their names, the __ prefixed versions provide the non-atomic > implementation. This pattern was started with the long * bitops stuff for > managing really big bitmasks. > > And I really don't think it's a great function name scheme that we should > proliferate. FWIW I agree it's not great, but we're stuck between a rock and a bikeshed w.r.t. better naming -- it's quite hard to clean that up becuase the atomic_*() namespace is reserved for atomic_t (and mirrors atomic64_*() and atomic_long_*()). We could consider renaming atomic_t to atomic32_t and atomic_*() to atomic32_*(), which'd free up the atomic_*() namespace for more genral usage (e.g. allowing us to have atomic_xchg() and xhcg(), with the latter not being atomic). Thanks, Mark.