Skip to contentSkip to conversation

qla3xxx: convert byte order of constant instead of variable

PATCH RESEND Superseded Marcin Slusarz 2 participants 2 messages Feb 10, 2008 – Feb 12, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 qla3xxx: convert byte order of constant instead of variable

convert byte order of constant instead of variable which can be done at compile time (vs run time)

---
 drivers/net/qla3xxx.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
drivers/net/qla3xxx.c +2 -4
index a6aeb9d..b7f7b22 100644
@@ -2472,8 +2472,7 @@ static int ql_send_map(struct ql3_adapter *qdev,
 
 	if (seg_cnt == 1) {
 		/* Terminate the last segment. */
-		oal_entry->len =
-		    cpu_to_le32(le32_to_cpu(oal_entry->len) | OAL_LAST_ENTRY);
+		oal_entry->len |= cpu_to_le32(OAL_LAST_ENTRY);
 	} else {
 		oal = tx_cb->oal;
 		for (completed_segs=0; completed_segs<frag_cnt; completed_segs++,seg++) {
@@ -2530,8 +2529,7 @@ static int ql_send_map(struct ql3_adapter *qdev,
 					  frag->size);
 		}
 		/* Terminate the last segment. */
-		oal_entry->len =
-		    cpu_to_le32(le32_to_cpu(oal_entry->len) | OAL_LAST_ENTRY);
+		oal_entry->len |= cpu_to_le32(OAL_LAST_ENTRY);
 	}
 
 	return NETDEV_TX_OK;
Signature · 1 line
1.5.3.7
Acked-by on v1 1/1
#1 lore raw

RE: [PATCH resend] qla3xxx: convert byte order of constant instead ofvariable

Quoted 44 lines

-----Original Message-----
From: Marcin Slusarz [mailto:[email protected]]
Sent: Sunday, February 10, 2008 2:06 AM
To: [email protected]; Linux Driver
Cc: LKML
Subject: [PATCH resend] qla3xxx: convert byte order of constant instead ofvariable

convert byte order of constant instead of variable which can be done at compile time (vs run time)

---
 drivers/net/qla3xxx.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
drivers/net/qla3xxx.c +1 -2
index a6aeb9d..b7f7b22 100644
@@ -2472,8 +2472,7 @@ static int ql_send_map(struct ql3_adapter *qdev,
 
 	if (seg_cnt == 1) {
 		/* Terminate the last segment. */
-		oal_entry->len =
-		    cpu_to_le32(le32_to_cpu(oal_entry->len) | 
 OAL_LAST_ENTRY);
+		oal_entry->len |= cpu_to_le32(OAL_LAST_ENTRY);
 	} else {
 		oal = tx_cb->oal;

for (completed_segs=0; completed_segs<frag_cnt;
completed_segs++,seg++) {

drivers/net/qla3xxx.c +1 -2
@@ -2530,8 +2529,7 @@ static int ql_send_map(struct ql3_adapter *qdev,
 					  frag->size);
 		}
 		/* Terminate the last segment. */
-		oal_entry->len =
-		    cpu_to_le32(le32_to_cpu(oal_entry->len) | 
 OAL_LAST_ENTRY);
+		oal_entry->len |= cpu_to_le32(OAL_LAST_ENTRY);
 	}
 
Quoted 5 lines

return NETDEV_TX_OK;

Signature · 1 line
1.5.3.7

Thanks