mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Imre Kaloz <kaloz@openwrt.org>, Krzysztof Halasa <khalasa@piap.pl>
Cc: linux-arm-kernel@lists.infradead.org,
	Arnd Bergmann <arnd@arndb.de>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 2/3] ARM: ixp4xx: avoid warning about ioport_map() macro argument processing
Date: Fri,  5 Feb 2016 17:20:49 +0100	[thread overview]
Message-ID: <1454689262-613421-2-git-send-email-arnd@arndb.de> (raw)
In-Reply-To: <1454689262-613421-1-git-send-email-arnd@arndb.de>

We get a harmless compiler warning when building the cs89x0 driver
for ixp4xx:

drivers/net/ethernet/cirrus/cs89x0.c: In function 'cs89x0_ioport_probe':
drivers/net/ethernet/cirrus/cs89x0.c:1602:28: warning: suggest parentheses around '+' in operand of '&' [-Wparentheses]
  io_mem = ioport_map(ioport & ~3, NETCARD_IO_EXTENT);

Simply adding parentheses in the macro avoids the warning

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-ixp4xx/include/mach/io.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-ixp4xx/include/mach/io.h b/arch/arm/mach-ixp4xx/include/mach/io.h
index d04d3ec97ac0..d8c2a4dc54d7 100644
--- a/arch/arm/mach-ixp4xx/include/mach/io.h
+++ b/arch/arm/mach-ixp4xx/include/mach/io.h
@@ -534,7 +534,7 @@ static inline void iowrite32_rep(void __iomem *addr, const void *vaddr,
 #endif
 }
 
-#define	ioport_map(port, nr)		((void __iomem*)(port + PIO_OFFSET))
+#define	ioport_map(port, nr)		((void __iomem*)((port) + PIO_OFFSET))
 #define	ioport_unmap(addr)
 #endif /* CONFIG_PCI */
 
-- 
2.7.0

  reply	other threads:[~2016-02-05 16:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-05 16:20 [PATCH 1/3] ARM: ixp4xx: use normal prototype for {read,write}s{b,w,l} Arnd Bergmann
2016-02-05 16:20 ` Arnd Bergmann [this message]
2016-02-15  7:07   ` [PATCH 2/3] ARM: ixp4xx: avoid warning about ioport_map() macro argument processing Krzysztof Hałasa
2016-02-05 16:20 ` [PATCH 3/3] ARM: ixp4xx: move indirect I/O into common-pci.c Arnd Bergmann
2016-02-15  7:07   ` Krzysztof Hałasa
2016-02-15  7:05 ` [PATCH 1/3] ARM: ixp4xx: use normal prototype for {read,write}s{b,w,l} Krzysztof Hałasa

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=1454689262-613421-2-git-send-email-arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=kaloz@openwrt.org \
    --cc=khalasa@piap.pl \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®