From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2C19EC4332F for ; Wed, 23 Nov 2022 13:40:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235908AbiKWNkJ (ORCPT ); Wed, 23 Nov 2022 08:40:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238286AbiKWNju (ORCPT ); Wed, 23 Nov 2022 08:39:50 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1869B9A27D for ; Wed, 23 Nov 2022 05:26:52 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id BF65FB81FEA for ; Wed, 23 Nov 2022 13:26:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CA220C43151; Wed, 23 Nov 2022 13:26:48 +0000 (UTC) Date: Wed, 23 Nov 2022 08:26:47 -0500 From: Steven Rostedt To: Peter Zijlstra Cc: Uros Bizjak , linux-kernel@vger.kernel.org, Josh Poimboeuf , Jason Baron , Ard Biesheuvel Subject: Re: [PATCH] jump_label: use atomic_try_cmpxchg in static_key_slow_inc_cpuslocked Message-ID: <20221123082647.4531eabf@gandalf.local.home> In-Reply-To: References: <20221019140850.3395-1-ubizjak@gmail.com> <20221122161446.28907755@gandalf.local.home> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 23 Nov 2022 10:08:59 +0100 Peter Zijlstra wrote: > On Tue, Nov 22, 2022 at 04:14:46PM -0500, Steven Rostedt wrote: > > > > + for (int v = atomic_read(&key->enabled); v > 0; ) > > > > Although it's permitted by the compiler, the kernel style is to not add > > declarations in conditionals. > > I'm thinking the whole motivation for upping to C99 was exactly so that > we could start using this pattern. OK, if you are fine with it then sure. I personally like seeing all variables declared in one place. Maybe because I've been trained that way, and I can easily be confused when I see a variable somewhere and don't see it in the beginning declarations. -- Steve