[ofa-general] [PATCH 01/10] IB/ipath - fix a byte order compile check warning

Ralph Campbell ralph.campbell at qlogic.com
Thu Mar 20 17:17:40 PDT 2008


This patch fixes a compiler warning when the driver is compiled with:
make M=drivers/infiniband/hw/ipath C=2 CF=-D__CHECK_ENDIAN__

Signed-off-by: Ralph Campbell <ralph.campbell at qlogic.com>
---

 drivers/infiniband/hw/ipath/ipath_intr.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/infiniband/hw/ipath/ipath_intr.c b/drivers/infiniband/hw/ipath/ipath_intr.c
index 3b89952..d12dfad 100644
--- a/drivers/infiniband/hw/ipath/ipath_intr.c
+++ b/drivers/infiniband/hw/ipath/ipath_intr.c
@@ -798,7 +798,7 @@ static int handle_errors(struct ipath_devdata *dd, ipath_err_t errs)
 void ipath_clear_freeze(struct ipath_devdata *dd)
 {
 	int i, im;
-	__le64 val;
+	u64 val;
 	unsigned long flags;
 
 	/* disable error interrupts, to avoid confusion */
@@ -835,8 +835,8 @@ void ipath_clear_freeze(struct ipath_devdata *dd)
 		/* deal with 6110 chip bug */
 		im = i > 3 ? i ^ 1 : i;
 		val = ipath_read_kreg64(dd, (0x1000 / sizeof(u64)) + im);
-		dd->ipath_pioavailregs_dma[i] = dd->ipath_pioavailshadow[i]
-			= le64_to_cpu(val);
+		dd->ipath_pioavailregs_dma[i] = cpu_to_le64(val);
+		dd->ipath_pioavailshadow[i] = val;
 	}
 
 	/*




More information about the general mailing list