Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp560933pxt; Fri, 6 Aug 2021 08:24:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwdrU/GgfuS3KSeqqqimRbmgEbKkcfZMmmKqr0y8rqiXUR9KCftrXPeyqGQrYoChaVDLP+E X-Received: by 2002:a92:cacd:: with SMTP id m13mr57394ilq.256.1628263447216; Fri, 06 Aug 2021 08:24:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628263447; cv=none; d=google.com; s=arc-20160816; b=yY8Hba9tfNXFV+jQZUmvvzBtAIbYj8jshBMR4rpKt+EihZ7zGxC7xz05d2vRAQUL6H wGirrdUVy255Puua5o2Ugf13H7JTlwfuAlDfy7X7v+Cesy329NgpMbLtF4kN0OPAl0po 07MVMS7zKe0qTNLADgV1H6TKRr/Dc5z63qr6ZC8dvyGdpGnTn54AIOvudhUaUiGPUYvT hTZduePemyK5QdGbjPBBWD/g1Ydvu7JM6ELFVY9Vnv3ynxiyfXdhMPaXDscwsFJy3zAd cqEy6Q55xMLpa4bL3wIXvGOTBKHoGIYCBnp/eFuE84SyZAtVxAecnZtWXHto8trCE69Q flDA== 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=C03BkgqLQ9ruY//c0rzNTOJoKiptzTsTimQnhDnEo40=; b=AHsQlwVKPELsimeH5lYHg3y2A1z1Gn4p+NERdLB29LOb0TSxIRQOzJmou94pmpgHdc UNsIRECiy60mYRpnhQOzv1i/fvV6EpJhsOLCxS8pgQsxc0mjHvTOo4s6F5S6R7iJmmaa sbwK71E1i1+tIGSTKFJ8hVgnercLE76QIB4HJXnH9vZk/7w4vOmM6jPnvJPCD9DO/Y5r D7SYlElHKUQ1goDed84hIbH8ZfDdMIzDnOnsVuNU6bRdu0/PdNfqXUKe+93PoWOUG1Lu LLsCdxm2YD4dbbazSmlO7jWezbo+tXiEwICBt6EXGmmmynqTCCEghlYTukI/pRI8cHfJ SuEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=FMiU0j+Y; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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 u5si8176915jai.92.2021.08.06.08.23.54; Fri, 06 Aug 2021 08:24:07 -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=FMiU0j+Y; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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 S244908AbhHFK5A (ORCPT + 99 others); Fri, 6 Aug 2021 06:57:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231700AbhHFK47 (ORCPT ); Fri, 6 Aug 2021 06:56: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 C037CC061798 for ; Fri, 6 Aug 2021 03:56:43 -0700 (PDT) From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1628247401; 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=C03BkgqLQ9ruY//c0rzNTOJoKiptzTsTimQnhDnEo40=; b=FMiU0j+YGqYaWcVDgoHhfo024/sOltzqJh7K+3Hl81SoE8wMQv7b3fQjoq+bRweQdbpJ3C vI5dx41nxFhchrq9yDnpR3cnd6YPhmAMSuIPAbEc6GwdimUxj5lnFgbToUT5mWBEH+CJhv qhPQ3faEWEDr9ThE0MlEboBuI2om7jJ/cmg/Z4b9izqjVxMTI0SukOmpa2RfHtrpWlzTlY 1tc7ZZa/4tT4liKj/4sgIcmq2DzCK3TVUX+p3reI/GayF0EUbo+mc9DhIVO+AWPkswFrvm YL9Avwj82Mq4iPXkS3HJogm5bjrMziaLZ3u/b4hSxvmvlDFV4Ob+cS0eww1s2Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1628247401; 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=C03BkgqLQ9ruY//c0rzNTOJoKiptzTsTimQnhDnEo40=; b=FyGc/FkcK9Xej8O9sJISb/NRjecamjdh5SRFVWyE/ewQb6+PmhVX6093fIf0dYmZnRpXSx 9z+NR4J/8pM8eBCg== To: Andy Shevchenko Cc: Petr Mladek , Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Andrew Morton , Masahiro Yamada , Peter Zijlstra , Nick Desaulniers , "Paul E. McKenney" , Tetsuo Handa , Vitor Massaru Iha , Sedat Dilek , Changbin Du Subject: Re: [PATCH printk v1 07/10] console: add write_atomic interface In-Reply-To: References: <20210803131301.5588-1-john.ogness@linutronix.de> <20210803131301.5588-8-john.ogness@linutronix.de> Date: Fri, 06 Aug 2021 13:02:40 +0206 Message-ID: <87tuk2j0yf.fsf@jogness.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-08-03, Andy Shevchenko wrote: >> #include >> #include >> +#include > > Ordered? Agreed. v2 will include printk.h first. >> + if (!(con->flags & CON_ENABLED)) \ >> + continue; \ > > What about > > #define console_is_enabled(con) (!!(con->flags & CON_ENABLED)) > > or inliner equivalent > > static inline bool console_is_enabled(struct console *con) > { > return !!(con->flags & CON_ENABLED); > } Generally kernel code uses the console flags directly. A quick check for CON_ENABLED shows direct flag queries all over: $ git grep -l -e 'flags.*& .*CON_ENABLED' | wc -c 16 Are you suggesting I replace this usage in all of these files? Or just the one macro in console.h for now? And since there are 6 more console flags, they should probably also have equivalent wrappers? Thanks. John Ogness