From: Brian Foster <bfoster@redhat.com>
To: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
xfs@oss.sgi.com
Subject: Re: [PATCH] xfs: constify sysfs_ops structures
Date: Mon, 12 Oct 2015 08:49:10 -0400 [thread overview]
Message-ID: <20151012124910.GB25023@bfoster.bfoster> (raw)
In-Reply-To: <1444560146-22737-1-git-send-email-Julia.Lawall@lip6.fr>
On Sun, Oct 11, 2015 at 12:42:26PM +0200, Julia Lawall wrote:
> These sysfs_ops structures are never modified. All other sysfs_ops
> structures in the kernel are declared as const.
>
> Done with the help of Coccinelle.
>
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
>
The fix looks correct, but these data structures just happened to be
removed and condensed into a more generic xfs_sysfs_ops definition as
part of the recent per-mount stats series. See commit a27c2640 ("xfs:
consolidate sysfs ops") for reference.
Brian
> ---
> fs/xfs/xfs_sysfs.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/xfs/xfs_sysfs.c b/fs/xfs/xfs_sysfs.c
> index aa03670..192c865 100644
> --- a/fs/xfs/xfs_sysfs.c
> +++ b/fs/xfs/xfs_sysfs.c
> @@ -112,7 +112,7 @@ xfs_dbg_store(
> return xfs_attr->store ? xfs_attr->store(buf, count, NULL) : 0;
> }
>
> -static struct sysfs_ops xfs_dbg_ops = {
> +static const struct sysfs_ops xfs_dbg_ops = {
> .show = xfs_dbg_show,
> .store = xfs_dbg_store,
> };
> @@ -227,7 +227,7 @@ xfs_log_store(
> return xfs_attr->store ? xfs_attr->store(buf, count, log) : 0;
> }
>
> -static struct sysfs_ops xfs_log_ops = {
> +static const struct sysfs_ops xfs_log_ops = {
> .show = xfs_log_show,
> .store = xfs_log_store,
> };
>
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
prev parent reply other threads:[~2015-10-12 12:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-11 10:42 [PATCH] xfs: constify sysfs_ops structures Julia Lawall
2015-10-12 12:49 ` 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=20151012124910.GB25023@bfoster.bfoster \
--to=bfoster@redhat.com \
--cc=Julia.Lawall@lip6.fr \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=xfs@oss.sgi.com \
/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