Skip to contentSkip to conversation

staging: r8188eu: core: Change the length of an array

PATCH In review Fabio M. De Francesco 3 participants 6 messages Aug 2, 2021 – Aug 5, 2021 Staging

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 staging: r8188eu: core: Change the length of an array

IPX_NODE_LEN == 6, while addr.f1 should only have 4 elements. Replace IPX_NODE_LEN with 4. In the while, remove the excess spaces before the fields of the union.

Fixes 56febcc2595e ("staging: r8188eu: Fix different base types in assignments and parameters")

---

Changes in v2:
Add a "Fixes:" tag.

 drivers/staging/r8188eu/core/rtw_br_ext.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/r8188eu/core/rtw_br_ext.c +3 -3
index 8f434768dd15..c585224080c6 100644
@@ -137,9 +137,9 @@ static inline void __nat25_generate_ipx_network_addr_with_node(unsigned char *ne
 				__be32 *ipxNetAddr, unsigned char *ipxNodeAddr)
 {
 	union {
-                unsigned int f0;
-                unsigned char f1[IPX_NODE_LEN];
-        } addr;
+		unsigned int f0;
+		unsigned char f1[4];
+	} addr;
 
 	memset(networkAddr, 0, MAX_NETWORK_ADDR_LEN);
 
Signature · 1 line
2.32.0
#1 lore raw
Quoted 5 lines · Fabio M. De Francesco

IPX_NODE_LEN == 6, while addr.f1 should only have 4 elements. Replace IPX_NODE_LEN with 4. In the while, remove the excess spaces before the fields of the union.

Fixes 56febcc2595e ("staging: r8188eu: Fix different base types in assignments and parameters")

Ugh... I really feel we'd be better off reverting that patch entirely.

regards,
dan carpenter

#2 lore raw
Quoted 8 lines · Dan Carpenter
Quoted 5 lines · Fabio M. De Francesco

IPX_NODE_LEN == 6, while addr.f1 should only have 4 elements. Replace IPX_NODE_LEN with 4. In the while, remove the excess spaces before the fields of the union.

Fixes 56febcc2595e ("staging: r8188eu: Fix different base types in assignments and parameters")

Ugh... I really feel we'd be better off reverting that patch entirely.

I do too, let me go revert that...

#3 lore raw
Quoted 11 lines · Greg Kroah-Hartman
Quoted 8 lines · Dan Carpenter
Quoted 5 lines · Fabio M. De Francesco

IPX_NODE_LEN == 6, while addr.f1 should only have 4 elements. Replace IPX_NODE_LEN with 4. In the while, remove the excess spaces before the fields of the union.

Fixes 56febcc2595e ("staging: r8188eu: Fix different base types in assignments and parameters")

Ugh... I really feel we'd be better off reverting that patch entirely.

I do too, let me go revert that...

Thanks!

regards,
dan carpenter

#4 lore raw
In reply to Greg Kroah-Hartman
Quoted 6 lines · Greg Kroah-Hartman
Quoted 5 lines · Dan Carpenter
Quoted 4 lines · Fabio M. De Francesco

IPX_NODE_LEN == 6, while addr.f1 should only have 4 elements. Replace IPX_NODE_LEN with 4. In the while, remove the excess spaces before the fields of the union.

Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Fixes 56febcc2595e ("staging: r8188eu: Fix different base types in assignments and parameters")

Ugh... I really feel we'd be better off reverting that patch entirely.

I do too, let me go revert that...

Now reverted.

#5 lore raw
In reply to Dan Carpenter
Quoted 8 lines · Dan Carpenter
Quoted 5 lines · Fabio M. De Francesco

IPX_NODE_LEN == 6, while addr.f1 should only have 4 elements. Replace IPX_NODE_LEN with 4. In the while, remove the excess spaces before the fields of the union.

Fixes 56febcc2595e ("staging: r8188eu: Fix different base types in assignments and parameters")

Ugh... I really feel we'd be better off reverting that patch entirely.

Get rid of all the unions and the XORing at least.

regards,
dan carpenter