mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: barebox@lists.infradead.org
Cc: sha@pengutronix.de
Subject: [PATCH 10/11] io.h: update definitions of __raw_{read,write}*
Date: Tue, 16 Feb 2010 15:46:25 +0100	[thread overview]
Message-ID: <1266331586-11253-11-git-send-email-mkl@pengutronix.de> (raw)
In-Reply-To: <1266331586-11253-10-git-send-email-mkl@pengutronix.de>

This patch updates the definitions of the __raw_read and __raw_write
functions so that "sparse" doesn't complain.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 arch/arm/include/asm/io.h |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h
index c7f4b62..e8e82f6 100644
--- a/arch/arm/include/asm/io.h
+++ b/arch/arm/include/asm/io.h
@@ -26,13 +26,13 @@
 #ifndef __ASM_ARM_IO_H
 #define __ASM_ARM_IO_H
 
-#define __raw_writeb(v,a)	(*(volatile unsigned char *)(a) = (v))
-#define __raw_writew(v,a)	(*(volatile unsigned short *)(a) = (v))
-#define __raw_writel(v,a)	(*(volatile unsigned int *)(a) = (v))
+#define __raw_writeb(v,a)	(__chk_io_ptr(a), *(volatile unsigned char __force  *)(a) = (v))
+#define __raw_writew(v,a)	(__chk_io_ptr(a), *(volatile unsigned short __force *)(a) = (v))
+#define __raw_writel(v,a)	(__chk_io_ptr(a), *(volatile unsigned int __force   *)(a) = (v))
 
-#define __raw_readb(a)		(*(volatile unsigned char *)(a))
-#define __raw_readw(a)		(*(volatile unsigned short *)(a))
-#define __raw_readl(a)		(*(volatile unsigned int *)(a))
+#define __raw_readb(a)		(__chk_io_ptr(a), *(volatile unsigned char __force  *)(a))
+#define __raw_readw(a)		(__chk_io_ptr(a), *(volatile unsigned short __force *)(a))
+#define __raw_readl(a)		(__chk_io_ptr(a), *(volatile unsigned int __force   *)(a))
 
 #define writeb(v,a) __raw_writeb(v,a)
 #define writew(v,a) __raw_writew(v,a)
-- 
1.6.6.2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2010-02-16 14:47 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-16 14:46 [PATCH 00/11] arch/arm and other random cleanups Marc Kleine-Budde
2010-02-16 14:46 ` [PATCH 01/11] arm/Kconfig: delete trailing whitespace Marc Kleine-Budde
2010-02-16 14:46   ` [PATCH 02/11] arm/Kconfig: removed unused TAG options Marc Kleine-Budde
2010-02-16 14:46     ` [PATCH 03/11] arm/Makefile: keep list of boards sorted Marc Kleine-Budde
2010-02-16 14:46       ` [PATCH 04/11] arm/cpu/Makefile: cleanup: propper indention Marc Kleine-Budde
2010-02-16 14:46         ` [PATCH 05/11] drivers/video/Makefile: cleanup " Marc Kleine-Budde
2010-02-16 14:46           ` [PATCH 06/11] start-arm: cleanup: " Marc Kleine-Budde
2010-02-16 14:46             ` [PATCH 07/11] i2c.h: fix typo in copyright Marc Kleine-Budde
2010-02-16 14:46               ` [PATCH 08/11] ioreadsb: put the whole ioreadsb function into the .text.readsb section Marc Kleine-Budde
2010-02-16 14:46                 ` [PATCH 09/11] import recent include/linux/compiler*.h Marc Kleine-Budde
2010-02-16 14:46                   ` Marc Kleine-Budde [this message]
2010-02-16 14:46                     ` [PATCH 11/11] common.h: add compile time check helper functions Marc Kleine-Budde
2010-02-16 15:01             ` [PATCH 06/11] start-arm: cleanup: propper indention Uwe Kleine-König
2010-02-16 20:35           ` [PATCH 05/11] drivers/video/Makefile: cleanup " Marc Kleine-Budde
2010-02-16 14:54 ` [PATCH 00/11] arch/arm and other random cleanups Marc Kleine-Budde
2010-02-17  9:46   ` Sascha Hauer
2010-02-17 22:20     ` Marc Kleine-Budde

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=1266331586-11253-11-git-send-email-mkl@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=sha@pengutronix.de \
    /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