Skip to content

Commit 88d32d3

Browse files
austindhkimdjwong
authored andcommitted
xfs: avoid unused to_mp() function warning
to_mp() was first introduced with the following commit: 'commit 801cc4e ("xfs: debug mode forced buffered write failure")' But the user of to_mp() was removed by below commit: 'commit f8c4725 ("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: Austin Kim <[email protected]> Reviewed-by: Brian Foster <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Signed-off-by: Darrick J. Wong <[email protected]>
1 parent 6f4ff81 commit 88d32d3

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

fs/xfs/xfs_sysfs.c

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -63,19 +63,6 @@ static const struct sysfs_ops xfs_sysfs_ops = {
6363
.store = xfs_sysfs_object_store,
6464
};
6565

66-
/*
67-
* xfs_mount kobject. The mp kobject also serves as the per-mount parent object
68-
* that is identified by the fsname under sysfs.
69-
*/
70-
71-
static inline struct xfs_mount *
72-
to_mp(struct kobject *kobject)
73-
{
74-
struct xfs_kobj *kobj = to_kobj(kobject);
75-
76-
return container_of(kobj, struct xfs_mount, m_kobj);
77-
}
78-
7966
static struct attribute *xfs_mp_attrs[] = {
8067
NULL,
8168
};

0 commit comments

Comments
 (0)