diff options
author | Darrick J. Wong <djwong@kernel.org> | 2022-11-23 09:09:00 -0800 |
---|---|---|
committer | Carlos Maiolino <cem@kernel.org> | 2022-12-09 10:18:19 +0100 |
commit | 60066f61ce0340cd62338985dc0f24fda23192d9 (patch) | |
tree | fd2fb39872cd482cbff730e4114d0707f17d0dff | |
parent | b827e2318ea2bb3eabca13a965c2535a1d7289e5 (diff) | |
download | xfsprogs-dev-60066f61ce0340cd62338985dc0f24fda23192d9.tar.gz |
libxfs: consume the xfs_warn mountpoint argument
Fix these warnings because xfs_warn doesn't do anything in userspace:
xfs_alloc.c: In function ‘xfs_alloc_get_rec’:
xfs_alloc.c:246:34: warning: unused variable ‘mp’ [-Wunused-variable]
246 | struct xfs_mount *mp = cur->bc_mp;
| ^~
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
-rw-r--r-- | libxfs/libxfs_priv.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libxfs/libxfs_priv.h b/libxfs/libxfs_priv.h index 883b22948b..ad4b947583 100644 --- a/libxfs/libxfs_priv.h +++ b/libxfs/libxfs_priv.h @@ -125,7 +125,7 @@ enum ce { CE_DEBUG, CE_CONT, CE_NOTE, CE_WARN, CE_ALERT, CE_PANIC }; #define xfs_info(mp,fmt,args...) cmn_err(CE_CONT, _(fmt), ## args) #define xfs_notice(mp,fmt,args...) cmn_err(CE_NOTE, _(fmt), ## args) -#define xfs_warn(mp,fmt,args...) cmn_err(CE_WARN, _(fmt), ## args) +#define xfs_warn(mp,fmt,args...) cmn_err((mp) ? CE_WARN : CE_WARN, _(fmt), ## args) #define xfs_err(mp,fmt,args...) cmn_err(CE_ALERT, _(fmt), ## args) #define xfs_alert(mp,fmt,args...) cmn_err(CE_ALERT, _(fmt), ## args) |