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: <168155747391.13678.10634415747614468991.stgit@skinsburskii.localdomain>
Date:   Sat, 15 Apr 2023 04:17:53 -0700
From:   Stanislav Kinsburskii <skinsburskii@...ux.microsoft.com>
To:     unlisted-recipients:; (no To-header on input)
Cc:     Stanislav Kinsburskii <stanislav.kinsburskii@...il.com>,
        Michael Ellerman <mpe@...erman.id.au>,
        Nicholas Piggin <npiggin@...il.com>,
        Christophe Leroy <christophe.leroy@...roup.eu>,
        Geert Uytterhoeven <geert@...ux-m68k.org>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        Stanislav Kinsburskii <stanislav.kinsburskii@...il.com>,
        Arnd Bergmann <arnd@...db.de>, linuxppc-dev@...ts.ozlabs.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH 6/7] powerpc: asm/io.h: Expect immutable pointer in
 virt_to_phys prototype

From: Stanislav Kinsburskii <stanislav.kinsburskii@...il.com>

These helper function - virt_to_phys - doesn't need the address pointer to
be mutable.

In the same time expecting it to be mutable leads to the following build
warning for constant pointers:

  warning: passing argument 1 of ‘virt_to_phys’ discards ‘const’ qualifier from pointer target type

Signed-off-by: Stanislav Kinsburskii <stanislav.kinsburskii@...il.com>
CC: Michael Ellerman <mpe@...erman.id.au>
CC: Nicholas Piggin <npiggin@...il.com>
CC: Christophe Leroy <christophe.leroy@...roup.eu>
CC: Geert Uytterhoeven <geert@...ux-m68k.org>
CC: Bjorn Helgaas <bhelgaas@...gle.com>
CC: Stanislav Kinsburskii <stanislav.kinsburskii@...il.com>
CC: Arnd Bergmann <arnd@...db.de>
CC: linuxppc-dev@...ts.ozlabs.org
CC: linux-kernel@...r.kernel.org
---
 arch/powerpc/include/asm/io.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/include/asm/io.h b/arch/powerpc/include/asm/io.h
index f1e657c9bbe8..c287eeb9536f 100644
--- a/arch/powerpc/include/asm/io.h
+++ b/arch/powerpc/include/asm/io.h
@@ -959,7 +959,7 @@ extern void __iomem *__ioremap_caller(phys_addr_t, unsigned long size,
  *	almost all conceivable cases a device driver should not be using
  *	this function
  */
-static inline unsigned long virt_to_phys(volatile void * address)
+static inline unsigned long virt_to_phys(const volatile void * address)
 {
 	WARN_ON(IS_ENABLED(CONFIG_DEBUG_VIRTUAL) && !virt_addr_valid(address));
 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ