linux-um archives
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@nod.at>
To: Nathan Chancellor <nathan@kernel.org>
Cc: Christian Brauner <brauner@kernel.org>,
	Hongbo Li <lihongbo22@huawei.com>,
	 anton ivanov <anton.ivanov@cambridgegreys.com>,
	 Johannes Berg <johannes@sipsolutions.net>,
	 linux-um <linux-um@lists.infradead.org>,
	 linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] hostfs: Add const qualifier to host_root in hostfs_fill_super()
Date: Tue, 11 Jun 2024 22:19:02 +0200 (CEST)	[thread overview]
Message-ID: <2144113714.220205.1718137142446.JavaMail.zimbra@nod.at> (raw)
In-Reply-To: <20240611-hostfs-fix-mount-api-conversion-v1-1-ef75bbc77f44@kernel.org>

----- Ursprüngliche Mail -----
> Von: "Nathan Chancellor" <nathan@kernel.org>
> An: "Christian Brauner" <brauner@kernel.org>
> CC: "Hongbo Li" <lihongbo22@huawei.com>, "richard" <richard@nod.at>, "anton ivanov" <anton.ivanov@cambridgegreys.com>,
> "Johannes Berg" <johannes@sipsolutions.net>, "linux-um" <linux-um@lists.infradead.org>, "linux-kernel"
> <linux-kernel@vger.kernel.org>, "Nathan Chancellor" <nathan@kernel.org>
> Gesendet: Dienstag, 11. Juni 2024 21:58:41
> Betreff: [PATCH] hostfs: Add const qualifier to host_root in hostfs_fill_super()

> After the recent conversion to the new mount API, there is a warning
> when building hostfs (which may be upgraded to an error via
> CONFIG_WERROR=y):
> 
>  fs/hostfs/hostfs_kern.c: In function 'hostfs_fill_super':
>  fs/hostfs/hostfs_kern.c:942:27: warning: initialization discards 'const'
>  qualifier from pointer target type [-Wdiscarded-qualifiers]
>    942 |         char *host_root = fc->source;
>        |                           ^~
> 
> Add the 'const' qualifier, as host_root will not be modified after its
> assignment. Move the assignment to keep the existing reverse Christmas
> tree order intact.
> 
> Fixes: cd140ce9f611 ("hostfs: convert hostfs to use the new mount API")
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>

Acked-by: Richard Weinberger <richard@nod.at>

Thanks,
//richard


  reply	other threads:[~2024-06-11 20:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-11 19:58 [PATCH] hostfs: Add const qualifier to host_root in hostfs_fill_super() Nathan Chancellor
2024-06-11 20:19 ` Richard Weinberger [this message]
2024-06-13 12:12 ` Christian Brauner

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=2144113714.220205.1718137142446.JavaMail.zimbra@nod.at \
    --to=richard@nod.at \
    --cc=anton.ivanov@cambridgegreys.com \
    --cc=brauner@kernel.org \
    --cc=johannes@sipsolutions.net \
    --cc=lihongbo22@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-um@lists.infradead.org \
    --cc=nathan@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