mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <ahmad@a3f.at>
To: barebox@lists.infradead.org
Cc: Adrian Negreanu <adrian.negreanu@nxp.com>, Ahmad Fatoum <ahmad@a3f.at>
Subject: [PATCH v2 2/4] asm-generic: avoid compiler warnings due to PCI_IOBASE
Date: Mon, 30 Jan 2023 08:27:05 +0100	[thread overview]
Message-ID: <20230130072707.2423294-3-ahmad@a3f.at> (raw)
In-Reply-To: <20230130072707.2423294-1-ahmad@a3f.at>

Some GCC versions take offence at PCI_IOBASE's default value of 0.
Hide warnings about this.

Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
---
 include/asm-generic/io.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h
index acb70509d168..6e91c0aea68f 100644
--- a/include/asm-generic/io.h
+++ b/include/asm-generic/io.h
@@ -12,6 +12,7 @@
 #define __ASM_GENERIC_IO_H
 
 #include <linux/string.h> /* for memset() and memcpy() */
+#include <linux/compiler.h>
 #include <linux/types.h>
 #include <asm/byteorder.h>
 
@@ -86,7 +87,7 @@ static inline void __raw_writeq(u64 b, volatile void __iomem *addr)
 #endif
 
 #ifndef PCI_IOBASE
-#define PCI_IOBASE ((void __iomem *)0)
+#define PCI_IOBASE ((void __iomem *)RELOC_HIDE((void *)0, 0))
 #endif
 
 #ifndef IO_SPACE_LIMIT
-- 
2.38.1




  parent reply	other threads:[~2023-01-30 17:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-30  7:27 [PATCH v2 0/4] video: add support for QEMU ramfb Ahmad Fatoum
2023-01-30  7:27 ` [PATCH v2 1/4] fs: devfs: implement cdev_fdopen Ahmad Fatoum
2023-01-30  7:27 ` Ahmad Fatoum [this message]
2023-01-30  7:27 ` [PATCH v2 3/4] firmware: add QEMU FW CFG driver Ahmad Fatoum
2023-01-30  7:27 ` [PATCH v2 4/4] video: add support for QEMU ramfb Ahmad Fatoum
2023-01-31  8:19 ` [PATCH v2 0/4] " Sascha Hauer

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=20230130072707.2423294-3-ahmad@a3f.at \
    --to=ahmad@a3f.at \
    --cc=adrian.negreanu@nxp.com \
    --cc=barebox@lists.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox