lkml.org 
[lkml]   [2019]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.

\
 
 \ /
  Last update: 2019-12-12 15:55    [W:0.065 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site