[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 12 Dec 2019 06:54:32 -0800
From: Christoph Hellwig <hch@...radead.org>
To: Arnd Bergmann <arnd@...db.de>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...nel.org>, Borislav Petkov <bp@...en8.de>,
x86@...nel.org, Mike Travis <mike.travis@....com>,
Steve Wahl <steve.wahl@....com>,
Dimitri Sivanich <dimitri.sivanich@....com>,
Andrew Morton <akpm@...ux-foundation.org>,
Christoph Hellwig <hch@...radead.org>,
"H. Peter Anvin" <hpa@...or.com>,
Hedi Berriche <hedi.berriche@....com>,
Justin Ernst <justin.ernst@....com>,
Peter Zijlstra <peterz@...radead.org>,
Russ Anderson <russ.anderson@....com>,
Anshuman Khandual <anshuman.khandual@....com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86/platform/uv: avoid unused variable warning
Instead of that maybe_unused mess please just use good old ifdefs.
> if (hubless)
> - proc_version_fops.open = proc_hubless_open;
> + proc_create_single("hubless", 0, pde, proc_hubless_show);
> else
> - proc_version_fops.open = proc_hubbed_open;
> + proc_create_single("hubbed", 0, pde, proc_hubbed_show);
> }
Or someone could figure out what happens if we turn the
proc_create_single stub into an inline function instead of the
define. That makes it used at a syntactic level, the big question is
if the compiler is smart enough to optimize away the unused callback
still.
Powered by blists - more mailing lists