From: Hal Rosenstock <[email-masked]>

Replace be32_to_cpup with be32_to_cpu and fix bug referencing pointer rather
than value in ib_create_ah_from_wc().

Signed-off-by: Tom Duffy <[email-masked]>
Signed-off-by: Sean Hefty <[email-masked]>
Signed-off-by: Hal Rosenstock <[email-masked]>
Cc: Roland Dreier <[email-masked]>
Signed-off-by: Andrew Morton <[email-masked]>
---

 drivers/infiniband/core/agent.c |    8 ++++----
 drivers/infiniband/core/verbs.c |    2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff -puN drivers/infiniband/core/agent.c~ib-a-couple-of-ib-core-bug-fixes drivers/infiniband/core/agent.c
--- 25/drivers/infiniband/core/agent.c~ib-a-couple-of-ib-core-bug-fixes	Mon Jul 11 17:06:45 2005
+++ 25-akpm/drivers/infiniband/core/agent.c	Mon Jul 11 17:06:45 2005
@@ -156,10 +156,10 @@ static int agent_mad_send(struct ib_mad_
 			/* Should sgid be looked up ? */
 			ah_attr.grh.sgid_index = 0;
 			ah_attr.grh.hop_limit = grh->hop_limit;
-			ah_attr.grh.flow_label = be32_to_cpup(
-				&grh->version_tclass_flow)  & 0xfffff;
-			ah_attr.grh.traffic_class = (be32_to_cpup(
-				&grh->version_tclass_flow) >> 20) & 0xff;
+			ah_attr.grh.flow_label = be32_to_cpu(
+				grh->version_tclass_flow)  & 0xfffff;
+			ah_attr.grh.traffic_class = (be32_to_cpu(
+				grh->version_tclass_flow) >> 20) & 0xff;
 			memcpy(ah_attr.grh.dgid.raw,
 			       grh->sgid.raw,
 			       sizeof(ah_attr.grh.dgid));
diff -puN drivers/infiniband/core/verbs.c~ib-a-couple-of-ib-core-bug-fixes drivers/infiniband/core/verbs.c
--- 25/drivers/infiniband/core/verbs.c~ib-a-couple-of-ib-core-bug-fixes	Mon Jul 11 17:06:45 2005
+++ 25-akpm/drivers/infiniband/core/verbs.c	Mon Jul 11 17:06:45 2005
@@ -113,7 +113,7 @@ struct ib_ah *ib_create_ah_from_wc(struc
 			return ERR_PTR(ret);
 
 		ah_attr.grh.sgid_index = (u8) gid_index;
-		flow_class = be32_to_cpu(&grh->version_tclass_flow);
+		flow_class = be32_to_cpu(grh->version_tclass_flow);
 		ah_attr.grh.flow_label = flow_class & 0xFFFFF;
 		ah_attr.grh.traffic_class = (flow_class >> 20) & 0xFF;
 		ah_attr.grh.hop_limit = grh->hop_limit;
_