All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve French <smfrench@gmail.com>
To: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Cc: CIFS <linux-cifs@vger.kernel.org>,
	samba-technical <samba-technical@lists.samba.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Samuel Cabrero <scabrero@suse.de>
Subject: Re: [PATCH] cifs: Constify static struct genl_ops
Date: Sat, 5 Jun 2021 15:47:07 -0500	[thread overview]
Message-ID: <CAH2r5muYv=tMkkX2bV0W3OU7Z8GLPwiekh_6D0pPQp+ybhmuMQ@mail.gmail.com> (raw)
In-Reply-To: <20210526203545.13160-1-rikard.falkeborn@gmail.com>

merged into cifs-2.6.git for-next

On Wed, May 26, 2021 at 4:06 PM Rikard Falkeborn
<rikard.falkeborn@gmail.com> wrote:
>
> The only usage of cifs_genl_ops[] is to assign its address to the ops
> field in the genl_family struct, which is a pointer to const. Make it
> const to allow the compiler to put it in read-only memory.
>
> Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
> ---
>  fs/cifs/netlink.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/cifs/netlink.c b/fs/cifs/netlink.c
> index 5aaabe4cc0a7..291cb606f149 100644
> --- a/fs/cifs/netlink.c
> +++ b/fs/cifs/netlink.c
> @@ -30,7 +30,7 @@ static const struct nla_policy cifs_genl_policy[CIFS_GENL_ATTR_MAX + 1] = {
>         [CIFS_GENL_ATTR_SWN_RESOURCE_NAME]      = { .type = NLA_STRING},
>  };
>
> -static struct genl_ops cifs_genl_ops[] = {
> +static const struct genl_ops cifs_genl_ops[] = {
>         {
>                 .cmd = CIFS_GENL_CMD_SWN_NOTIFY,
>                 .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
> --
> 2.31.1
>


-- 
Thanks,

Steve

      reply	other threads:[~2021-06-05 20:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-26 20:35 [PATCH] cifs: Constify static struct genl_ops Rikard Falkeborn
2021-06-05 20:47 ` Steve French [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='CAH2r5muYv=tMkkX2bV0W3OU7Z8GLPwiekh_6D0pPQp+ybhmuMQ@mail.gmail.com' \
    --to=smfrench@gmail.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rikard.falkeborn@gmail.com \
    --cc=samba-technical@lists.samba.org \
    --cc=scabrero@suse.de \
    /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 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.