Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp1045091pxa; Fri, 28 Aug 2020 02:00:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwzqn9ejkrS3nhzJs3hrPDBzpiPHOzchF1DqEY6gYNIvHVesuc4lCW6Lfm7YFrab39AWrRO X-Received: by 2002:a50:fc18:: with SMTP id i24mr787533edr.176.1598605203469; Fri, 28 Aug 2020 02:00:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598605203; cv=none; d=google.com; s=arc-20160816; b=DOSHan9qA7TzyS5bxZokhsCjpTc6ltnPKU7MhX1ljpfi0eViMYiBwd3ggLE+xAwyf3 EsTkCwugTvTVjOYNE8YdJEnOhpyoYFY8q8/KVnKR3J00VGhVFH3ICvxhfkOxU1eJr0AX pqkmX5Yh5Zifk9DdSXqOQ7lRJUU/ASUDClYsqY3TI5L337qKmSyPwVLKdZcJUQ/r0FJO LcvKG72jhCcniN+Tvv+6KyzF2/CRhf6YiV5smKxfdGPwpzgwwhkBnJdYHIaGezcU9I3B Zaexgum3dnZ1zVKxjv1S+iDeuvTABPZ22rkb5iiqJW4b6ZXadNHeo9eyZiMFfn8h7W6P WQWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from :dkim-signature:dkim-signature:date; bh=GmU8AAPW1+rQRjQVKnNtyU0wtD0uH65CO+M6xximNpg=; b=PLzqqPiyNcQbDwPksrnPAIHITi2KszbddKR6OVm1i/OW+A5FU52kFjdF5k7OUZH7Cc VaLTcCOJ9yD+5JTqviJQrLBx7M2xFunavUMQns5zpGp57OmQ/X/lH+/7CCuTFnYlLYXC npYHP8lf9lSPtsZjOIx3qf/pTCwek5prhvulKj1nRGZ32IgDROBgWtEamqPKL+UmcVwx RxLmzc0he6FDEMf0PfEs+1z/ujTGL1ZbQYlZs3NVznpL+SAXMstCvMB5omyczl1PLIjt gfTy2rAJdqOvjDjGuEOGpmFEtjC5K04ptjuq9SYG4I+eGOH2f6p0pfLeKKrBFmK4pNL9 UDnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="YnzhO/UF"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=VYP2gybb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t17si157598edv.436.2020.08.28.01.59.41; Fri, 28 Aug 2020 02:00:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="YnzhO/UF"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=VYP2gybb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728760AbgH1I7B (ORCPT + 99 others); Fri, 28 Aug 2020 04:59:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728555AbgH1I67 (ORCPT ); Fri, 28 Aug 2020 04:58:59 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D122C061264 for ; Fri, 28 Aug 2020 01:58:59 -0700 (PDT) Date: Fri, 28 Aug 2020 10:59:17 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1598605137; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=GmU8AAPW1+rQRjQVKnNtyU0wtD0uH65CO+M6xximNpg=; b=YnzhO/UFbdwlJThK+sAKvpR7v6mpKuuYB/R1lewMQeeDO8xS+jwz/k9xhSf890jW9e5Zkl iRtPT3ULag2INy3HOFTiUbMRqtt7TDSMv13TqWdPjnKtKIuO9Hy4GSo1vX5dVaaqdZJ35J eX3qjqtlcVZE6IQbUpqIQEoiLsITBHxMsp2hbN1LVST2IDlInkYQrz80+9zY9XElSRF5Gr LN4013/wx8Fd5T7i5vkZdnorzmMNDWTHKScoEUwlWcewl8x8X7dkogsZhSdu4JlOA2UNfX e7+h98NalzfOLoLXzTAx2gakKPm3O+8q0M7eyOiRWOAkT7gDlC5jwkFFz5EseQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1598605137; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=GmU8AAPW1+rQRjQVKnNtyU0wtD0uH65CO+M6xximNpg=; b=VYP2gybb44CwkG7K2QMc2nCuVFcU+n9/xiQ5cIOb+wrJ6lTqge83XyZA5xwC0Xh/ipkZyf qOHaqhZQNskSDqBQ== From: "Ahmed S. Darwish" To: peterz@infradead.org Cc: Ingo Molnar , Will Deacon , Thomas Gleixner , "Sebastian A. Siewior" , "Paul E. McKenney" , Steven Rostedt , LKML Subject: Re: [PATCH v1 2/5] seqlock: Use unique prefix for seqcount_t property accessors Message-ID: <20200828085917.GA7205@lx-t490> References: <20200519214547.352050-1-a.darwish@linutronix.de> <20200828010710.5407-1-a.darwish@linutronix.de> <20200828010710.5407-3-a.darwish@linutronix.de> <20200828082754.GN1362448@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200828082754.GN1362448@hirez.programming.kicks-ass.net> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 28, 2020 at 10:27:54AM +0200, peterz@infradead.org wrote: > On Fri, Aug 28, 2020 at 03:07:07AM +0200, Ahmed S. Darwish wrote: > > Differentiate the first group by using "__seqcount_t_" as prefix. This > > also conforms with the rest of seqlock.h naming conventions. > > > #define __seqprop_case(s, locktype, prop) \ > > seqcount_##locktype##_t: __seqcount_##locktype##_##prop((void *)(s)) > > > > #define __seqprop(s, prop) _Generic(*(s), \ > > - seqcount_t: __seqcount_##prop((void *)(s)), \ > > + seqcount_t: __seqcount_t_##prop((void *)(s)), \ > > __seqprop_case((s), raw_spinlock, prop), \ > > __seqprop_case((s), spinlock, prop), \ > > __seqprop_case((s), rwlock, prop), \ > > If instead you do: > > #define __seqprop_case(s, _lockname, prop) \ > seqcount##_lockname##_t: __seqcount##_lockname##_##prop((void *)(s)) > > You can have: > > __seqprop_case((s), , prop), > __seqprop_case((s), _raw_spinlock, prop), > __seqprop_case((s), _spinlock, prop), > __seqprop_case((s), _rwlock, prop), > __seqprop_case((s), _mutex, prop), > __seqprop_case((s), _ww_mutex, prop), > > And it's all good again. > > Although arguably we should do something like s/__seqcount/__seqprop/ > over this lot. > ACK.