diff options
| author | Arnd Bergmann <[email protected]> | 2025-02-25 14:52:21 +0000 |
|---|---|---|
| committer | Anna Schumaker <[email protected]> | 2025-02-25 20:04:25 +0000 |
| commit | 1f7a4f98c11fbeb18ed21f3b3a497e90a50ad2e0 (patch) | |
| tree | 55a082dea84282b3178ad0a63ecc96def6668d66 /net/unix/af_unix.c | |
| parent | SUNRPC: Handle -ETIMEDOUT return from tlshd (diff) | |
| download | kernel-1f7a4f98c11fbeb18ed21f3b3a497e90a50ad2e0.tar.gz kernel-1f7a4f98c11fbeb18ed21f3b3a497e90a50ad2e0.zip | |
sunrpc: suppress warnings for unused procfs functions
There is a warning about unused variables when building with W=1 and no procfs:
net/sunrpc/cache.c:1660:30: error: 'cache_flush_proc_ops' defined but not used [-Werror=unused-const-variable=]
1660 | static const struct proc_ops cache_flush_proc_ops = {
| ^~~~~~~~~~~~~~~~~~~~
net/sunrpc/cache.c:1622:30: error: 'content_proc_ops' defined but not used [-Werror=unused-const-variable=]
1622 | static const struct proc_ops content_proc_ops = {
| ^~~~~~~~~~~~~~~~
net/sunrpc/cache.c:1598:30: error: 'cache_channel_proc_ops' defined but not used [-Werror=unused-const-variable=]
1598 | static const struct proc_ops cache_channel_proc_ops = {
| ^~~~~~~~~~~~~~~~~~~~~~
These are used inside of an #ifdef, so replacing that with an
IS_ENABLED() check lets the compiler see how they are used while
still dropping them during dead code elimination.
Fixes: dbf847ecb631 ("knfsd: allow cache_register to return error on failure")
Reviewed-by: Jeff Layton <[email protected]>
Acked-by: Chuck Lever <[email protected]>
Signed-off-by: Arnd Bergmann <[email protected]>
Signed-off-by: Anna Schumaker <[email protected]>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions
