From: Linus Torvalds <torvalds@linux-foundation.org>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Christian Brauner <brauner@kernel.org>,
Tong Tiangen <tongtiangen@huawei.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: Re: linux-next: build warning after merge of the vfs-brauner tree
Date: Tue, 5 Mar 2024 20:47:40 -0800 [thread overview]
Message-ID: <CAHk-=wiJLeR6tPcEmiRndhVtrPex0WavrFZ0UZHGjABVc=Tq1w@mail.gmail.com> (raw)
In-Reply-To: <20240306153703.499661d2@canb.auug.org.au>
On Tue, 5 Mar 2024 at 20:37, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> +static struct page *dump_page_copy(struct page *src, struct page *dst)
> +{
> + return NULL;
> +}
No, it needs to be "return src;" not NULL.
That
#define dump_page_copy(src, dst) ((dst), (src))
was supposed to be a "use 'dst', return 'src'" macro, and is correct
as that. The problem - as you noticed - is that it causes that "left
side of comma expression has no effect" warning.
(Technically it *does* have an effect - exactly the "argument is used"
one - but the compiler warning does make sense).
Actually, the simplest thing to do is probably just
#define dump_page_free(x) ((void)(x))
#define dump_page_copy(src, dst) (src)
where the "use" of the 'dump_page' argument is that dump_page_free()
void cast, and dump_page_copy() simply doesn't need to use it at all.
Christian?
Linus
next prev parent reply other threads:[~2024-03-06 4:48 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-05 23:51 linux-next: build warning after merge of the vfs-brauner tree Stephen Rothwell
2024-03-06 2:48 ` Linus Torvalds
2024-03-06 4:37 ` Stephen Rothwell
2024-03-06 4:47 ` Linus Torvalds [this message]
2024-03-06 9:55 ` Christian Brauner
2024-03-06 4:58 ` Stephen Rothwell
-- strict thread matches above, loose matches on Subject: below --
2024-01-17 2:39 Stephen Rothwell
2023-12-21 7:48 Stephen Rothwell
2023-12-21 13:19 ` David Howells
2023-11-24 2:13 Stephen Rothwell
2023-11-24 7:58 ` Amir Goldstein
2023-09-25 4:31 Stephen Rothwell
2023-08-15 11:15 Stephen Rothwell
2023-08-07 5:38 Stephen Rothwell
2023-07-31 3:58 Stephen Rothwell
2023-07-04 3:51 Stephen Rothwell
2023-05-24 3:46 Stephen Rothwell
2023-05-24 9:06 ` 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='CAHk-=wiJLeR6tPcEmiRndhVtrPex0WavrFZ0UZHGjABVc=Tq1w@mail.gmail.com' \
--to=torvalds@linux-foundation.org \
--cc=brauner@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
--cc=tongtiangen@huawei.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;
as well as URLs for NNTP newsgroup(s).