From: Brian Foster <bfoster@redhat.com>
To: Austin Kim <austindh.kim@gmail.com>
Cc: darrick.wong@oracle.com, linux-xfs@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] xfs: avoid unused to_mp() function warning
Date: Tue, 24 Sep 2019 05:39:32 -0400 [thread overview]
Message-ID: <20190924093932.GB13820@bfoster> (raw)
In-Reply-To: <20190924085350.GA75425@LGEARND20B15>
On Tue, Sep 24, 2019 at 05:53:50PM +0900, Austin Kim wrote:
> to_mp() was first introduced with the following commit:
> 'commit 801cc4e17a34c ("xfs: debug mode forced buffered write failure")'
>
> But the user of to_mp() was removed by below commit:
> 'commit f8c47250ba46e ("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 <austindh.kim@gmail.com>
> ---
Reviewed-by: Brian Foster <bfoster@redhat.com>
> fs/xfs/xfs_sysfs.c | 13 -------------
> 1 file changed, 13 deletions(-)
>
> diff --git a/fs/xfs/xfs_sysfs.c b/fs/xfs/xfs_sysfs.c
> index ddd0bf7..f1bc88f 100644
> --- a/fs/xfs/xfs_sysfs.c
> +++ b/fs/xfs/xfs_sysfs.c
> @@ -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,
> };
> --
> 2.6.2
>
prev parent reply other threads:[~2019-09-24 9:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-24 8:53 [PATCH] xfs: avoid unused to_mp() function warning Austin Kim
2019-09-24 9:39 ` Brian Foster [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190924093932.GB13820@bfoster \
--to=bfoster@redhat.com \
--cc=austindh.kim@gmail.com \
--cc=darrick.wong@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox