Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp287223ybt; Fri, 19 Jun 2020 01:52:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyjUtvXlRLnITLIEiuyl1MPnceygRKtAIdXCfPle4giTfR3gmjBmT2MV3Hu8tqJzO5I4sVy X-Received: by 2002:a05:6402:1ca2:: with SMTP id cz2mr2083807edb.15.1592556760644; Fri, 19 Jun 2020 01:52:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592556760; cv=none; d=google.com; s=arc-20160816; b=BmP8pSLn3innseWEIWTRhUqt8Jp5vtzRwEEul6C65rTJLYLrHdk3ih5/eTeUu5qO71 3y8tc5WbFNnomn1lOEzG/vKFm1t2Ok0+B/giUlathJPNwskeJE7j6EzvqK25hRNCV1+P h114YD+ZmtCfeqBucyZHsqaekd6z7hcvSznWsa2maJ0Kd8jrw4AI5g6XPpobsx6hF66V w6cz/rxK3yElkRDn2Mdx4jBX7gtwJKMiETdp0filrxIm/fi0pfgb7ubl6mtkJXSwLdDz veGgxIoXsdqXf+mLdUwDMmtzftyrtT7vppuDs4/FJ5HvLmOLG7VJyIcVjircxOS9NgzP h0mA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from; bh=wnaWb3TT0k9kUoh5IQGWns3OYyE1uJrS9DpGA6De5tE=; b=irjdiKDqvyM8wYPqw0oXtkEEIgKfa8qh3jNlsMGMudCSli1jacr2J70CbRO3gvRtk4 k7WrNt6w6DQwBOcUw9roXjveVdMGh0GDm0xJlHorQ68cNQXJb++44Yiqs1syzulJ7CRU hJpUPvlajG6/OH4c1Mn4aO3atE1ZGvpPs8qaDwMpfX5vxOyPCtTCEdrOsOnEodZwvW6h 5Ll8+eVJQ1PFrx3gSOAI/JJfhl09z0HIaqnWf6Ynnd4kxJTIb1JmnfFK9DbJuUoJxEmB n6v4C9fdpN0ZB7aNvld4P8Yc349b/lY+NYyqI179KM5e1KnGB1g2Fk+xcYdwS56kr7Rb edew== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u5si3737054edq.596.2020.06.19.01.52.17; Fri, 19 Jun 2020 01:52:40 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726196AbgFSGta (ORCPT + 99 others); Fri, 19 Jun 2020 02:49:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725778AbgFSGta (ORCPT ); Fri, 19 Jun 2020 02:49:30 -0400 Received: from Galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 155DCC06174E for ; Thu, 18 Jun 2020 23:49:30 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=vostro) by Galois.linutronix.de with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1jmAq3-0001tw-6V; Fri, 19 Jun 2020 08:49:23 +0200 From: John Ogness To: kernel test robot Cc: Petr Mladek , kbuild-all@lists.01.org, Peter Zijlstra , Sergey Senozhatsky , Steven Rostedt , Greg Kroah-Hartman , Andrea Parri , Thomas Gleixner , Paul McKenney , kexec@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH] printk: _printk_rb_static_dict can be static References: <20200618144919.9806-4-john.ogness@linutronix.de> <20200618182323.GA72993@4e49555bcca1> Date: Fri, 19 Jun 2020 08:49:21 +0200 In-Reply-To: <20200618182323.GA72993@4e49555bcca1> (kernel test robot's message of "Fri, 19 Jun 2020 02:23:23 +0800") Message-ID: <871rmbim8e.fsf@vostro.fn.ogness.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-06-18, kernel test robot wrote: > Signed-off-by: kernel test robot > --- > printk.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c > index 7642ef634956f..d812ada06735f 100644 > --- a/kernel/printk/printk.c > +++ b/kernel/printk/printk.c > @@ -434,7 +434,7 @@ static u32 log_buf_len = __LOG_BUF_LEN; > */ > #define PRB_AVGBITS 5 /* 32 character average length */ > > -_DECLARE_PRINTKRB(printk_rb_static, CONFIG_LOG_BUF_SHIFT - PRB_AVGBITS, > +static _DECLARE_PRINTKRB(printk_rb_static, CONFIG_LOG_BUF_SHIFT - PRB_AVGBITS, > PRB_AVGBITS, PRB_AVGBITS, &__log_buf[0]); _DECLARE_PRINTKRB declares multiple variables, so this patch will not work as intended. I would like to declare the variables static but am not sure how best to go about it. In the Linux source I see examples of macros just desclaring the variables static. And I see examples of the macros providing a parameter where the "static" keyword can be specified. Since the ringbuffer was created exclusively to serve printk, I would prefer to just have _DECLARE_PRINTKRB (and DECLARE_PRINTKRB) declare all the variables as static. John Ogness