From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp-190c.mail.infomaniak.ch (smtp-190c.mail.infomaniak.ch [185.125.25.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 91A46433E93 for ; Thu, 2 Jul 2026 15:51:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.125.25.12 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783007474; cv=none; b=YWJhPCtbaiHTI8jYJzE8qTbfzDwATIrJ+e+rZi85muPX5QDQ8tXEQB5j1lkGhjK13belzGUsaCqiaKDoKPMm7RuOdO7q2YGTIhHy6o/hC6JvZ76owMpUMey1vMGmL8rudssFbg+b3Qb+gUczfb8IR9pBOVkllkbheCPlcsWnP1g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783007474; c=relaxed/simple; bh=832qnxuOC0bmbF+8+mN3WieghJzCWJTJ2Ub+D9EU3/Q=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=A00LYakpVd1kl1Qtv3nRoobHoiuGfZjUHJTY3ZFXZHv6UqGLYzqteIaHJX3wf3V0wK4pagdabPwAgXYcBo5Wgu0+1dP5f3BDvZqhBm7yxg/tI8sjiMHC6HRR5Oe9+FLqvqYkBy/Sj+Wv93zUUbAy8hovV/PNlmptUAHLEpGlFFM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=digikod.net; spf=pass smtp.mailfrom=digikod.net; dkim=pass (1024-bit key) header.d=digikod.net header.i=@digikod.net header.b=wMIAGaW0; arc=none smtp.client-ip=185.125.25.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=digikod.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=digikod.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=digikod.net header.i=@digikod.net header.b="wMIAGaW0" Received: from smtp-4-0000.mail.infomaniak.ch (smtp-4-0000.mail.infomaniak.ch [10.7.10.107]) by smtp-3-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4grhDy0mssz8SW; Thu, 2 Jul 2026 17:50:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=digikod.net; s=20191114; t=1783007457; bh=s7UjGetJwKhyp7zzR184WNNNx2kMwgFgGCpkqNqm9FQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=wMIAGaW0nqLRjk5o2D3SvWJWn7MDJzyLijojnSJ8TfI6/WXwFCaHNppwC9fNptgPd RhmkkJ9ZkePqHgT2AfovFRRfnmhgLtHXIwmNiuYvyX3FD0kO/zdqduTJ0lEueWtuqB XZ3IOMH4YvYNuCdDBMuXh4emIRPWzQrmdx6a0v+4= Received: from unknown by smtp-4-0000.mail.infomaniak.ch (Postfix) with ESMTPA id 4grhDx1GXBz6Dj; Thu, 2 Jul 2026 17:50:57 +0200 (CEST) Date: Thu, 2 Jul 2026 17:50:51 +0200 From: =?utf-8?Q?Micka=C3=ABl_Sala=C3=BCn?= To: Bart Van Assche Cc: Miguel Ojeda , linux-kernel@vger.kernel.org, Peter Zijlstra , Ingo Molnar , Andrew Morton , Nathan Chancellor , =?utf-8?Q?G=C3=BCnther?= Noack Subject: Re: [PATCH] clang-format: Fix formatting of guard() and scoped_guard() statements Message-ID: <20260702.Eibibi4the9j@digikod.net> References: <20260413182348.1865138-1-bvanassche@acm.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20260413182348.1865138-1-bvanassche@acm.org> X-Infomaniak-Routing: alpha Hi, I just noticed this patch with v7.2-rc1 . This looks good for scoped_guard()(){}, but not for guard(rcu)() (see security/landlock/*.[ch]): - guard(rcu)(); + guard(rcu) + (); Should we revert the "guard" entry? Mickaƫl On Mon, Apr 13, 2026 at 11:23:48AM -0700, Bart Van Assche wrote: > Without this patch clang-format formats guard() and scoped_guard() > statements as follows: > > guard(...)(...) This should be scoped_guard(...)(...) > { > ... > } > > With this patch clang-format formats guard() and scoped_guard() > statements as follows: > > guard(...)(...) { > ... > } > > Cc: Peter Zijlstra > Cc: Ingo Molnar > Cc: Andrew Morton > Signed-off-by: Bart Van Assche > --- > .clang-format | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/.clang-format b/.clang-format > index 1cc151e2adcc..6a3de86ab27a 100644 > --- a/.clang-format > +++ b/.clang-format > @@ -481,6 +481,7 @@ ForEachMacros: > - 'genradix_for_each' > - 'genradix_for_each_from' > - 'genradix_for_each_reverse' > + - 'guard' > - 'hash_for_each' > - 'hash_for_each_possible' > - 'hash_for_each_possible_rcu' > @@ -674,6 +675,7 @@ ForEachMacros: > - 'rq_list_for_each' > - 'rq_list_for_each_safe' > - 'sample_read_group__for_each' > + - 'scoped_guard' > - 'scsi_for_each_prot_sg' > - 'scsi_for_each_sg' > - 'sctp_for_each_hentry'