[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200310144618.GC58231@mit.edu>
Date: Tue, 10 Mar 2020 10:46:18 -0400
From: "Theodore Y. Ts'o" <tytso@....edu>
To: Mark Rutland <mark.rutland@....com>
Cc: Stephen Rothwell <sfr@...b.auug.org.au>,
Linux Next Mailing List <linux-next@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: linux-next: build warning after merge of the random tree
On Tue, Mar 10, 2020 at 12:17:47PM +0000, Mark Rutland wrote:
> On Fri, Mar 06, 2020 at 03:53:48PM +1100, Stephen Rothwell wrote:
> > Hi all,
> >
> > On Mon, 2 Mar 2020 14:44:52 +1100 Stephen Rothwell <sfr@...b.auug.org.au> wrote:
> > >
> > > After merging the random tree, today's linux-next build (x86_64
> > > allnoconfig) produced this warning:
> > >
> > > drivers/char/random.c:820:13: warning: 'crng_initialize_secondary' defined but not used [-Wunused-function]
> > > 820 | static void crng_initialize_secondary(struct crng_state *crng)
> > > | ^~~~~~~~~~~~~~~~~~~~~~~~~
> > >
> > > Introduced by commit
> > >
> > > 5cbe0f13b51a ("random: split primary/secondary crng init paths")
> >
> > I am still getting this warning.
>
> Sorry, this is my bad.
>
> We only call crng_initialize_secondary() in do_numa_crng_init(), which
> is only built for CONFIG_NUMA. We can either drop both
> crng_initialize_secondary() and crng_init_try_arch() under the
> CONFIG_NUMA ifdef, or add __maybe_unused to crng_initialize_secondary().
>
> Ted, does the below look ok to you? Or would you prefer moving things
> under the ifdeffery?
Yes, that looks fine. Reordering the functions to move them under the
#ifdefs will make the code less readable, and adding extra
#ifdef/#endif would also make things less readable.
Thanks for the patch, will apply.
- Ted
Powered by blists - more mailing lists