Skip to contentSkip to conversation

staging: wimax/i2400m: fix byte-order type issue

PATCH In review karthik alapati 2 participants 2 messages Feb 20, 2021 – Feb 21, 2021 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: wimax/i2400m: fix byte-order type issue

fix sparse type warning by converting le32 types to host byte-order types before comparison

---
 drivers/staging/wimax/i2400m/fw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/wimax/i2400m/fw.c +1 -1
index 92ea5c101..f09de1810 100644
@@ -511,7 +511,7 @@ ssize_t __i2400m_bm_ack_verify(struct i2400m *i2400m, int opcode,
 			opcode, i2400m_brh_get_response(ack));
 		goto error_ack_failed;
 	}
-	if (ack_size < ack->data_size + sizeof(*ack)) {
+	if (ack_size < le32_to_cpu(ack->data_size) + sizeof(*ack)) {
 		dev_err(dev, "boot-mode cmd %d: SW BUG "
 			"driver provided only %zu bytes for %zu bytes "
 			"of data\n", opcode, ack_size,
Signature · 1 line
2.30.1
#1 lore raw
Quoted 13 lines · karthik alapati

fix sparse type warning by converting le32 types to host byte-order types before comparison

---
 drivers/staging/wimax/i2400m/fw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/wimax/i2400m/fw.c +0 -0
index 92ea5c101..f09de1810 100644

drivers/staging/wimax/i2400m/fw.c ssize_t __i2400m_bm_ack_verify(struct i2400m *i2400m, int opcode, · line 517

Quoted 8 lines
drivers/staging/wimax/i2400m/fw.c +1 -1
@@ -511,7 +511,7 @@ ssize_t __i2400m_bm_ack_verify(struct i2400m *i2400m, int opcode,
 			opcode, i2400m_brh_get_response(ack));
 		goto error_ack_failed;
 	}
-	if (ack_size < ack->data_size + sizeof(*ack)) {
+	if (ack_size < le32_to_cpu(ack->data_size) + sizeof(*ack)) {
 		dev_err(dev, "boot-mode cmd %d: SW BUG "
 			"driver provided only %zu bytes for %zu bytes "
 			"of data\n", opcode, ack_size,

You sent 3 patches that seem to do the same thing, yet are a bit different?

Please make your patches a patch series and provide proper subject lines to make them unique. I have now dropped all of your submitted patches from my review queue.

thanks,

greg k-h