Skip to contentSkip to conversation

qla3xxx: convert byte order of constant instead of variable

PATCH Applied [email protected] 2 participants 2 messages Mar 4, 2008 – Mar 26, 2008

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

PATCH 2/17 qla3xxx: convert byte order of constant instead of variable

From: Marcin Slusarz <[email protected]>

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

---

 drivers/net/qla3xxx.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/net/qla3xxx.c renamed from drivers/net/qla3xxx.c~qla3xxx-convert-byte-order-of-constant-instead-of-variable +2 -4
diff -puN drivers/net/qla3xxx.c~qla3xxx-convert-byte-order-of-constant-instead-of-variable drivers/net/qla3xxx.c
@@ -2472,8 +2472,7 @@ static int ql_send_map(struct ql3_adapte
 
 	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_adapte
 					  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;

_

Applied
#1 lore raw
Quoted 27 lines · [email protected] wrote:

From: Marcin Slusarz <[email protected]>

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

---

 drivers/net/qla3xxx.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff -puN drivers/net/qla3xxx.c~qla3xxx-convert-byte-order-of-constant-instead-of-variable drivers/net/qla3xxx.c

drivers/net/qla3xxx.c renamed from drivers/net/qla3xxx.c~qla3xxx-convert-byte-order-of-constant-instead-of-variable +1 -2
@@ -2472,8 +2472,7 @@ static int ql_send_map(struct ql3_adapte
 
 	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 static int ql_send_map(struct ql3_adapte · line 2534

Quoted 8 lines
drivers/net/qla3xxx.c renamed from drivers/net/qla3xxx.c~qla3xxx-convert-byte-order-of-constant-instead-of-variable +1 -2
@@ -2530,8 +2529,7 @@ static int ql_send_map(struct ql3_adapte
 					  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);
 	}
 

applied