Content-Type: multipart/mixed; boundary="===============7558857290361781297==" MIME-Version: 1.0 From: John Ogness To: kbuild-all@lists.01.org Subject: Re: [RFC PATCH] printk: _printk_rb_static_dict can be static Date: Fri, 19 Jun 2020 08:49:21 +0200 Message-ID: <871rmbim8e.fsf@vostro.fn.ogness.net> In-Reply-To: <20200618182323.GA72993@4e49555bcca1> List-Id: --===============7558857290361781297== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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 =3D __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_AV= GBITS, > 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 --===============7558857290361781297==--