Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4413000rwl; Tue, 28 Mar 2023 06:53:21 -0700 (PDT) X-Google-Smtp-Source: AKy350bUTn8N30Iu8eC6TBBFeZ6uSqt4Egt+pPS/cM2ptpb/mlMQ5yA5W+U77zyVJcmRYE06UjCa X-Received: by 2002:a05:6402:716:b0:502:2494:b8fc with SMTP id w22-20020a056402071600b005022494b8fcmr14185722edx.7.1680011601202; Tue, 28 Mar 2023 06:53:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680011601; cv=none; d=google.com; s=arc-20160816; b=xBstMYCN/zV8JrVwL2pRmG8h/VOf4U+BuF4VQzXhCmdSFzH/GWNxSaPI/5ndWa6FId F/nB05Z+EyKYWWKK2cscve8FOpCs4yNyOkOW8qA6mEqQBwFSyxDDVk6Sk/BAQdw9Oqee 8R84UwMIdjbPBuDfeIgzdXp70LwWP4eM1Sa178ECOkyRA8eS+gK4zm7e472KwNTgM6IK n4RaIWKVPTGNdjSUyRnic/CrNgNLymUBjPEmqGDSTolxuhuRhdfJ+5j/guanJz0Rdg5i 04zzxRK0OKMtepV1JA6hgYqOtzNcfFDFU/WA1K1h5CIsi3aTPJNtYdUj1CqxqGtBJRtE yG/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=Q0HF1a50X5mUn9JEg22E9B4jublo+OP4TVJ5KjQLMNo=; b=xloWe2sWdE8p/AVLlK/i2h+RPVpPZq5eIrnwj5kF9Q3hlUpJl2DQKIxI6SqpHRYAC7 q54UmsSKBYPy/XAdgjEwESczMlAC9CuaELN/IdAdeHOytWd2/hlO+KdVtrqycE6ckVyf udMFoPWOhbVAkj3jqmZg241p8e0p89knILwDb2p61gk6PW66joReI8BV5+E6JGYVettv +NiFVsP5fX+CXWCEEnCVq4/YmRDu5NMO96lZr9bqhzk0p/n1BHQ+qgbUMq7E/rnvcko2 21tQs8AsI+39esimKx3zqJlFB1ScWceu81gW+jkigdcloJa5ciZHYoHcO5c4Mh2Ya65H Hhqw== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j16-20020aa7c0d0000000b004c0c33b95c1si22187368edp.324.2023.03.28.06.52.55; Tue, 28 Mar 2023 06:53:21 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230054AbjC1Nrb (ORCPT + 99 others); Tue, 28 Mar 2023 09:47:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232134AbjC1NrS (ORCPT ); Tue, 28 Mar 2023 09:47:18 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB505A26B; Tue, 28 Mar 2023 06:47:14 -0700 (PDT) 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 489DCB81CFB; Tue, 28 Mar 2023 13:47:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4F71EC4339B; Tue, 28 Mar 2023 13:47:11 +0000 (UTC) Date: Tue, 28 Mar 2023 09:47:09 -0400 From: Steven Rostedt To: John Ogness Cc: Petr Mladek , Sergey Senozhatsky , 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 Message-ID: <20230328094709.5feb741d@gandalf.local.home> In-Reply-To: <87cz4tus9d.fsf@jogness.linutronix.de> References: <20230302195618.156940-1-john.ogness@linutronix.de> <20230302195618.156940-6-john.ogness@linutronix.de> <87y1nip3a1.fsf@jogness.linutronix.de> <87cz4tus9d.fsf@jogness.linutronix.de> 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 X-Spam-Status: No, score=-4.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_HI,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 Tue, 28 Mar 2023 11:48:06 +0206 John Ogness wrote: > > static_assert(sizeof(struct cons_state) == sizeof(atomic_long_t)); > > I never realized the kernel code was allowed to have that. But it is > everywhere! :-) Thanks. I've added and tested the following: I didn't know about static_assert(), as I always used BUILD_BUG_ON(). The difference being that BUILD_BUG_ON() has to be used within a function, where as static_assert() can be done outside of functions. Hmm, maybe I can convert some of my BUILD_BUG_ON()s to static_assert()s. Learn something new every day. -- Steve