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: <168155747955.13678.5648956145924030241.stgit@skinsburskii.localdomain>
Date:   Sat, 15 Apr 2023 04:17:59 -0700
From:   Stanislav Kinsburskii <skinsburskii@...ux.microsoft.com>
To:     unlisted-recipients:; (no To-header on input)
Cc:     Stanislav Kinsburskii <stanislav.kinsburskii@...il.com>,
        Arnd Bergmann <arnd@...db.de>, linux-arch@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH 7/7] asm-generic/io.h: Expect immutable pointer in
 virt_to_phys

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: Arnd Bergmann <arnd@...db.de>
CC: linux-arch@...r.kernel.org
CC: linux-kernel@...r.kernel.org
---
 include/asm-generic/io.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h
index 587e7e9b9a37..ee9d9584e05b 100644
--- a/include/asm-generic/io.h
+++ b/include/asm-generic/io.h
@@ -1000,7 +1000,7 @@ static inline void iowrite64_rep(volatile void __iomem *addr,
  */
 #ifndef virt_to_phys
 #define virt_to_phys virt_to_phys
-static inline unsigned long virt_to_phys(volatile void *address)
+static inline unsigned long virt_to_phys(const volatile void *address)
 {
 	return __pa((unsigned long)address);
 }


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ