All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jaegeuk Kim via Linux-f2fs-devel <linux-f2fs-devel@lists.sourceforge.net>
To: Matthew Wilcox <willy@infradead.org>
Cc: llvm@lists.linux.dev, linux-f2fs-devel@lists.sourceforge.net,
	kernel test robot <lkp@intel.com>,
	oe-kbuild-all@lists.linux.dev
Subject: Re: [f2fs-dev] [jaegeuk-f2fs:dev-test 65/93] fs/f2fs/data.c:58:56: error: passing 'const struct folio *' to parameter of type 'struct folio *' discards qualifiers
Date: Thu, 10 Jul 2025 14:26:38 +0000	[thread overview]
Message-ID: <aG_NntbzliX0WUGB@google.com> (raw)
In-Reply-To: <aG_Gr8NvCiXC4SyU@casper.infradead.org>

On 07/10, Matthew Wilcox wrote:
> On Thu, Jul 10, 2025 at 03:17:28PM +0800, kernel test robot wrote:
> > >> fs/f2fs/data.c:58:56: error: passing 'const struct folio *' to parameter of type 'struct folio *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
> >       58 |                 return folio_test_f2fs_gcing(fscrypt_pagecache_folio(folio));
> >          |                                                                      ^~~~~
> >    include/linux/fscrypt.h:527:67: note: passing argument to parameter 'bounce_folio' here
> >      527 | static inline struct folio *fscrypt_pagecache_folio(struct folio *bounce_folio)
> 
> Ah; I changed only one of the definitions of fscrypt_pagecache_folio.
> 
> Jaegeuk, can you fold in this fix?

Will this break ext4?

In ext4,
		struct folio *folio = fi.folio;
		...

		if (fscrypt_is_bounce_folio(folio)) {
			io_folio = folio;
			folio = fscrypt_pagecache_folio(folio);
		}

> 
> diff --git a/include/linux/fscrypt.h b/include/linux/fscrypt.h
> index b334c0538864..8d9127a0fdb3 100644
> --- a/include/linux/fscrypt.h
> +++ b/include/linux/fscrypt.h
> @@ -524,7 +524,8 @@ static inline bool fscrypt_is_bounce_folio(const struct folio *folio)
>  	return false;
>  }
>  
> -static inline struct folio *fscrypt_pagecache_folio(struct folio *bounce_folio)
> +static inline
> +struct folio *fscrypt_pagecache_folio(const struct folio *bounce_folio)
>  {
>  	WARN_ON_ONCE(1);
>  	return ERR_PTR(-EINVAL);


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

WARNING: multiple messages have this Message-ID (diff)
From: Jaegeuk Kim <jaegeuk@kernel.org>
To: Matthew Wilcox <willy@infradead.org>
Cc: kernel test robot <lkp@intel.com>,
	llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [jaegeuk-f2fs:dev-test 65/93] fs/f2fs/data.c:58:56: error: passing 'const struct folio *' to parameter of type 'struct folio *' discards qualifiers
Date: Thu, 10 Jul 2025 14:26:38 +0000	[thread overview]
Message-ID: <aG_NntbzliX0WUGB@google.com> (raw)
In-Reply-To: <aG_Gr8NvCiXC4SyU@casper.infradead.org>

On 07/10, Matthew Wilcox wrote:
> On Thu, Jul 10, 2025 at 03:17:28PM +0800, kernel test robot wrote:
> > >> fs/f2fs/data.c:58:56: error: passing 'const struct folio *' to parameter of type 'struct folio *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
> >       58 |                 return folio_test_f2fs_gcing(fscrypt_pagecache_folio(folio));
> >          |                                                                      ^~~~~
> >    include/linux/fscrypt.h:527:67: note: passing argument to parameter 'bounce_folio' here
> >      527 | static inline struct folio *fscrypt_pagecache_folio(struct folio *bounce_folio)
> 
> Ah; I changed only one of the definitions of fscrypt_pagecache_folio.
> 
> Jaegeuk, can you fold in this fix?

Will this break ext4?

In ext4,
		struct folio *folio = fi.folio;
		...

		if (fscrypt_is_bounce_folio(folio)) {
			io_folio = folio;
			folio = fscrypt_pagecache_folio(folio);
		}

> 
> diff --git a/include/linux/fscrypt.h b/include/linux/fscrypt.h
> index b334c0538864..8d9127a0fdb3 100644
> --- a/include/linux/fscrypt.h
> +++ b/include/linux/fscrypt.h
> @@ -524,7 +524,8 @@ static inline bool fscrypt_is_bounce_folio(const struct folio *folio)
>  	return false;
>  }
>  
> -static inline struct folio *fscrypt_pagecache_folio(struct folio *bounce_folio)
> +static inline
> +struct folio *fscrypt_pagecache_folio(const struct folio *bounce_folio)
>  {
>  	WARN_ON_ONCE(1);
>  	return ERR_PTR(-EINVAL);

  reply	other threads:[~2025-07-10 14:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-10  7:17 [f2fs-dev] [jaegeuk-f2fs:dev-test 65/93] fs/f2fs/data.c:58:56: error: passing 'const struct folio *' to parameter of type 'struct folio *' discards qualifiers kernel test robot
2025-07-10  7:17 ` kernel test robot
2025-07-10 13:57 ` [f2fs-dev] " Matthew Wilcox
2025-07-10 13:57   ` Matthew Wilcox
2025-07-10 14:26   ` Jaegeuk Kim via Linux-f2fs-devel [this message]
2025-07-10 14:26     ` Jaegeuk Kim
2025-07-10 15:16     ` [f2fs-dev] " Matthew Wilcox
2025-07-10 15:16       ` Matthew Wilcox
2025-07-10 16:49       ` [f2fs-dev] " Jaegeuk Kim via Linux-f2fs-devel
2025-07-10 16:49         ` Jaegeuk Kim

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=aG_NntbzliX0WUGB@google.com \
    --to=linux-f2fs-devel@lists.sourceforge.net \
    --cc=jaegeuk@kernel.org \
    --cc=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=willy@infradead.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 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.