Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 88d32d39 authored by Austin Kim's avatar Austin Kim Committed by Darrick J. Wong
Browse files

xfs: avoid unused to_mp() function warning



to_mp() was first introduced with the following commit:
'commit 801cc4e1 ("xfs: debug mode forced buffered write failure")'

But the user of to_mp() was removed by below commit:
'commit f8c47250 ("xfs: convert drop_writes to use the errortag
mechanism")'

So kernel build with clang throws below warning message:

   fs/xfs/xfs_sysfs.c:72:1: warning: unused function 'to_mp' [-Wunused-function]
   to_mp(struct kobject *kobject)

Hence to_mp() might be removed safely to get rid of warning message.

Signed-off-by: default avatarAustin Kim <austindh.kim@gmail.com>
Reviewed-by: default avatarBrian Foster <bfoster@redhat.com>
Reviewed-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
parent 6f4ff81a
Loading
Loading
Loading
Loading
+0 −13
Original line number Diff line number Diff line
@@ -63,19 +63,6 @@ static const struct sysfs_ops xfs_sysfs_ops = {
	.store = xfs_sysfs_object_store,
};

/*
 * xfs_mount kobject. The mp kobject also serves as the per-mount parent object
 * that is identified by the fsname under sysfs.
 */

static inline struct xfs_mount *
to_mp(struct kobject *kobject)
{
	struct xfs_kobj *kobj = to_kobj(kobject);

	return container_of(kobj, struct xfs_mount, m_kobj);
}

static struct attribute *xfs_mp_attrs[] = {
	NULL,
};