lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wiJLeR6tPcEmiRndhVtrPex0WavrFZ0UZHGjABVc=Tq1w@mail.gmail.com>
Date: Tue, 5 Mar 2024 20:47:40 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Stephen Rothwell <sfr@...b.auug.org.au>
Cc: Christian Brauner <brauner@...nel.org>, Tong Tiangen <tongtiangen@...wei.com>, 
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>, 
	Linux Next Mailing List <linux-next@...r.kernel.org>
Subject: Re: linux-next: build warning after merge of the vfs-brauner tree

On Tue, 5 Mar 2024 at 20:37, Stephen Rothwell <sfr@...b.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ