Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1656149 > unrolled thread

[PATCH] netxen: remove writeq/readq function definitions

Started byCorentin Labbe <clabbe.montjoie@gmail.com>
First post2017-06-02 13:40 +0200
Last post2017-06-05 02:00 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] netxen: remove writeq/readq function definitions Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-06-02 13:40 +0200
    Re: [PATCH] netxen: remove writeq/readq function definitions David Miller <davem@davemloft.net> - 2017-06-05 02:00 +0200

#1656149 — [PATCH] netxen: remove writeq/readq function definitions

FromCorentin Labbe <clabbe.montjoie@gmail.com>
Date2017-06-02 13:40 +0200
Subject[PATCH] netxen: remove writeq/readq function definitions
Message-ID<tNT5T-rX-17@gated-at.bofh.it>
Instead of rewriting write/readq, use linux/io-64-nonatomic-lo-hi.h which
already have them.

Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
---
 drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c
index a996801d442d..66ff15d08bad 100644
--- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c
+++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c
@@ -21,6 +21,7 @@
  *
  */
 
+#include <linux/io-64-nonatomic-lo-hi.h>
 #include <linux/slab.h>
 #include "netxen_nic.h"
 #include "netxen_nic_hw.h"
@@ -44,20 +45,6 @@ static void netxen_nic_io_write_128M(struct netxen_adapter *adapter,
 		void __iomem *addr, u32 data);
 static u32 netxen_nic_io_read_128M(struct netxen_adapter *adapter,
 		void __iomem *addr);
-#ifndef readq
-static inline u64 readq(void __iomem *addr)
-{
-	return readl(addr) | (((u64) readl(addr + 4)) << 32LL);
-}
-#endif
-
-#ifndef writeq
-static inline void writeq(u64 val, void __iomem *addr)
-{
-	writel(((u32) (val)), (addr));
-	writel(((u32) (val >> 32)), (addr + 4));
-}
-#endif
 
 #define PCI_OFFSET_FIRST_RANGE(adapter, off)    \
 	((adapter)->ahw.pci_base0 + (off))
-- 
2.13.0

[toc] | [next] | [standalone]


#1657189

FromDavid Miller <davem@davemloft.net>
Date2017-06-05 02:00 +0200
Message-ID<tONB7-3oN-1@gated-at.bofh.it>
In reply to#1656149
From: Corentin Labbe <clabbe.montjoie@gmail.com>
Date: Fri,  2 Jun 2017 13:36:27 +0200

> Instead of rewriting write/readq, use linux/io-64-nonatomic-lo-hi.h which
> already have them.
> 
> Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>

Applied to net-next.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web