Skip to content

NFS: Address build error when built with W=1

Peng Fan (OSS) linux-nfs lkml 1 version New

Get series with b4
b4 am [email protected] change-id 20260227-nfs-ff0f0f96fea3

Versions newest first

  1. v1 Latest3 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3NFS: flexfilelayout: return ERR_PTR from nfs4_ff_alloc_deviceid_node() and fix callerfs/nfs/flexfilelayout/flexfilelayout.c fs/nfs/flexfilelayout/flexfilelayoutdev.c+2 -20 replies
2/3NFS: flexfilelayout: Mark err as __maybe_unused in ff_layout_io_track_ds_errorfs/nfs/flexfilelayout/flexfilelayout.c+1 -10 replies
3/3NFS: nfs4proc: Mark ptr as __maybe_unused in nfs4_proc_create_sessionfs/nfs/nfs4proc.c+1 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] NFS: Address build error when built with W=1

I built x86_64_defconfig with COMPILE_TEST=y and W=1, then saw three build errors from fs/nfs: "error: variable set but not used"

Detailed info could be found in each patch commit log.

With the patchset, kernel build pass.

---
Peng Fan (3):
NFS: flexfilelayout: return ERR_PTR from nfs4_ff_alloc_deviceid_node() and fix caller
NFS: flexfilelayout: Mark err as __maybe_unused in ff_layout_io_track_ds_error
NFS: nfs4proc: Mark ptr as __maybe_unused in nfs4_proc_create_session

 fs/nfs/flexfilelayout/flexfilelayout.c    | 4 ++--
 fs/nfs/flexfilelayout/flexfilelayoutdev.c | 2 +-
 fs/nfs/nfs4proc.c                         | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

---
base-commit: 7d6661873f6b54c75195780a40d66bad3d482d8f
change-id: 20260227-nfs-ff0f0f96fea3

Best regards,

Signature · 1 line
Peng Fan <[email protected]>