All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] xfs: Fix unused variable 'mp' warning
@ 2021-02-03  8:39 Shaokun Zhang
  2021-02-03  9:30 ` Christian Brauner
  0 siblings, 1 reply; 8+ messages in thread
From: Shaokun Zhang @ 2021-02-03  8:39 UTC (permalink / raw)
  To: linux-xfs, linux-kernel
  Cc: Shaokun Zhang, Darrick J. Wong, Christoph Hellwig, Christian Brauner

There is a warning on arm64 platform:
  CC [M]  fs/xfs/xfs_ioctl32.o
fs/xfs/xfs_ioctl32.c: In function ‘xfs_file_compat_ioctl’:
fs/xfs/xfs_ioctl32.c:441:20: warning: unused variable ‘mp’ [-Wunused-variable]
  441 |  struct xfs_mount *mp = ip->i_mount;
      |                    ^~
  LD [M]  fs/xfs/xfs.o

Fix this warning.

Fixes: f736d93d76d3 ("xfs: support idmapped mounts")
Cc: "Darrick J. Wong" <djwong@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Christian Brauner <christian.brauner@ubuntu.com> 
Signed-off-by: Shaokun Zhang <zhangshaokun@hisilicon.com>
---
 fs/xfs/xfs_ioctl32.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/xfs/xfs_ioctl32.c b/fs/xfs/xfs_ioctl32.c
index 926427b19573..fd590c0b5d3b 100644
--- a/fs/xfs/xfs_ioctl32.c
+++ b/fs/xfs/xfs_ioctl32.c
@@ -438,7 +438,6 @@ xfs_file_compat_ioctl(
 {
 	struct inode		*inode = file_inode(filp);
 	struct xfs_inode	*ip = XFS_I(inode);
-	struct xfs_mount	*mp = ip->i_mount;
 	void			__user *arg = compat_ptr(p);
 	int			error;
 
@@ -446,6 +445,8 @@ xfs_file_compat_ioctl(
 
 	switch (cmd) {
 #if defined(BROKEN_X86_ALIGNMENT)
+	struct xfs_mount	*mp = ip->i_mount;
+
 	case XFS_IOC_ALLOCSP_32:
 	case XFS_IOC_FREESP_32:
 	case XFS_IOC_ALLOCSP64_32:
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-02-03 17:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-03  8:39 [PATCH -next] xfs: Fix unused variable 'mp' warning Shaokun Zhang
2021-02-03  9:30 ` Christian Brauner
2021-02-03 12:41   ` Christoph Hellwig
2021-02-03 13:47     ` Christian Brauner
2021-02-03 14:30       ` Christoph Hellwig
2021-02-03 14:41         ` Christian Brauner
2021-02-03 17:16           ` Darrick J. Wong
2021-02-03 17:33             ` Christian Brauner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.