Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp3129545rwl; Mon, 27 Mar 2023 09:34:53 -0700 (PDT) X-Google-Smtp-Source: AK7set8bn8eRcdJNPsXvFdtW6FZ1eAeiHMyXisoZ6OBNTsLddQ7V1zI0URDEQRp91ClZvq/YAfnV X-Received: by 2002:a05:6a20:4903:b0:d8:a1c9:c9bc with SMTP id ft3-20020a056a20490300b000d8a1c9c9bcmr10381984pzb.25.1679934893439; Mon, 27 Mar 2023 09:34:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679934893; cv=none; d=google.com; s=arc-20160816; b=AtYFb+A0s68S7bHo7EWF2GT5bMJCeSSwnwBWsvsm9mZPBf4/02ImELBiAnecW7Ufk+ Ke9kvVWRKmUPFnnNrhXQLBEG9caDVB5/OuaUwKEJU7foUF3qKhR9DaHYFO//MvC1Q8u5 /L8T2O+rofzWlqIfMb4eZtehlL3Zc2XsjdDFWuYt/60gEy/omUP0h+w+wW7myBD4wW/W V4jTFAmZ3Nkdn1rgOBO/2bIPjC93JShCuPDvNJclTsio7p5vet3U+3g8b/93Raiw8ENl BioIUh/6E0gxE6psSU+J1zyGDCdyhexlC0Rb9ZuUGlkhOL9omBKONovqrpphnbTlkYRZ t3iA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=VyqB3wrZqFlFld9RbfDWTT11IJPITUDR5qvT0cnykYs=; b=YSzSKrAmdzAmJUg7c+lUHFCqppPUg33AxCtrjc2MvFoa6nN0KOG4+Qysl1hXR2Igv8 Xg1JQNUIsaVa2KxMxINsxfEAWnP8AViqN/aCQQwhgNYt4/lf2kDtqp0BFOsMn6xtv3ap IKGHJCwrygSUVViqVwYUhifVax15/9l9sH/21LNi8rtDOFqzs50OuLTEdPLzpDQit35B P1L8QEiZL/TxbxFUP8py5UNUC5ECdWvEBQhyOXko7/KrIefy+XewPOT+zqXoFO9FN+Q2 l4OsBdpJc8yDl5x3nEv8Qi+cIO2/AjX7Y7F6//RtDjzJos0x76V5Jo9MZCXmzmkfWvB0 NMVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=TP9hM5Rk; dkim=neutral (no key) header.i=@linutronix.de; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f19-20020a056a00239300b005e06c0a9852si28859036pfc.179.2023.03.27.09.34.41; Mon, 27 Mar 2023 09:34:53 -0700 (PDT) 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; dkim=pass header.i=@linutronix.de header.s=2020 header.b=TP9hM5Rk; dkim=neutral (no key) header.i=@linutronix.de; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232334AbjC0QaI (ORCPT + 99 others); Mon, 27 Mar 2023 12:30:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232252AbjC0QaG (ORCPT ); Mon, 27 Mar 2023 12:30:06 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0916E1BF8; Mon, 27 Mar 2023 09:30:04 -0700 (PDT) From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1679934603; 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=VyqB3wrZqFlFld9RbfDWTT11IJPITUDR5qvT0cnykYs=; b=TP9hM5Rk04UufjUfoZTutu+arAapZmjAu5FmP7S5tErBzE2R6ghjfdGCwS106VMbgtD9q9 K8OnmvTRcvJm1Q/0wbHo+sIQYNDxsFB4biyYlrUqYG2LWMnPltOcoKC3ynSj8GhWLAv9yx DtLbiqGmciTywf29Gb1+ovA2itjVYXS9ot7IHsJ3njmsF9XHu0UP4h5FRHT1TadZxfFxpQ YlPlKXLRc/3EmlElSgQju6f+L1sCBryw6KEaEug7UQFFHhFuo4IZJK6L2P8iDOUNmK+XfP IDp8z+qF7s0/GEQx4z2Fya+mNZGXLEOYfiMuMAlzzeMs30R1a/mJTkAE5aPoQA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1679934603; 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=VyqB3wrZqFlFld9RbfDWTT11IJPITUDR5qvT0cnykYs=; b=jh1h+9aAhlNU4Vxf2LDuHH7K9fGCUAw/ulJdS5CkSIir690atArOJjnvmb6LIhThfQ1xty FJtuVdcOX8+AlNCQ== To: Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org, Greg Kroah-Hartman , linux-fsdevel@vger.kernel.org Subject: Re: union: was: Re: [PATCH printk v1 05/18] printk: Add non-BKL console basic infrastructure In-Reply-To: References: <20230302195618.156940-1-john.ogness@linutronix.de> <20230302195618.156940-6-john.ogness@linutronix.de> Date: Mon, 27 Mar 2023 18:34:22 +0206 Message-ID: <87y1nip3a1.fsf@jogness.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-1.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,INVALID_DATE_TZ_ABSURD,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 2023-03-21, Petr Mladek wrote: > It is not completely clear that that this struct is stored > as atomic_long_t atomic_state[2] in struct console. > > What about adding? > > atomic_long_t atomic; The struct is used to simplify interpretting and creating values to be stored in the atomic state variable. I do not think it makes sense that the atomic variable type itself is part of it. > Anyway, we should at least add a comment into struct console > about that atomic_state[2] is used to store and access > struct cons_state an atomic way. Also add a compilation > check that the size is the same. A compilation check would be nice. Is that possible? I am renaming the struct to nbcon_state. Also the variable will be called nbcon_state. With the description updated, I think it makes it clearer that "struct nbcon_state" is used to interpret/create values of console->nbcon_state. John Ogness