Skip to contentSkip to conversation

staging: r8188eu: remove unused macro ROUND

PATCH In review Michael Straube 2 participants 2 messages Sep 9, 2021 – Sep 10, 2021 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: r8188eu: remove unused macro ROUND

The macro ROUND is not used in the driver, remove it. Found with GCC -Wunused-macros.

---
 drivers/staging/r8188eu/core/rtw_security.c | 13 -------------
 1 file changed, 13 deletions(-)
drivers/staging/r8188eu/core/rtw_security.c +0 -13
index 82987255400a..db35f326bbb1 100644
@@ -1555,16 +1555,3 @@ const u8 rcons[] = {
 	0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1B, 0x36
 	/* for 128-bit blocks, Rijndael never uses more than 10 rcon values */
 };
-
-/**
- * Expand the cipher key into the encryption key schedule.
- *
- * @return	the number of rounds for the given cipher key size.
- */
-#define ROUND(i, d, s) \
-do {									\
-	d##0 = TE0(s##0) ^ TE1(s##1) ^ TE2(s##2) ^ TE3(s##3) ^ rk[4 * i]; \
-	d##1 = TE0(s##1) ^ TE1(s##2) ^ TE2(s##3) ^ TE3(s##0) ^ rk[4 * i + 1]; \
-	d##2 = TE0(s##2) ^ TE1(s##3) ^ TE2(s##0) ^ TE3(s##1) ^ rk[4 * i + 2]; \
-	d##3 = TE0(s##3) ^ TE1(s##0) ^ TE2(s##1) ^ TE3(s##2) ^ rk[4 * i + 3]; \
-} while (0);
Signature · 1 line
2.33.0
Acked-by on v1 1/1
#1 lore raw

Thus wrote Michael Straube ([email protected]):

Quoted 31 lines

The macro ROUND is not used in the driver, remove it. Found with GCC -Wunused-macros.

---
 drivers/staging/r8188eu/core/rtw_security.c | 13 -------------
 1 file changed, 13 deletions(-)
drivers/staging/r8188eu/core/rtw_security.c +0 -13
index 82987255400a..db35f326bbb1 100644
@@ -1555,16 +1555,3 @@ const u8 rcons[] = {
 	0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1B, 0x36
 	/* for 128-bit blocks, Rijndael never uses more than 10 rcon values */
 };
-
-/**
- * Expand the cipher key into the encryption key schedule.
- *
- * @return	the number of rounds for the given cipher key size.
- */
-#define ROUND(i, d, s) \
-do {									\
-	d##0 = TE0(s##0) ^ TE1(s##1) ^ TE2(s##2) ^ TE3(s##3) ^ rk[4 * i]; \
-	d##1 = TE0(s##1) ^ TE1(s##2) ^ TE2(s##3) ^ TE3(s##0) ^ rk[4 * i + 1]; \
-	d##2 = TE0(s##2) ^ TE1(s##3) ^ TE2(s##0) ^ TE3(s##1) ^ rk[4 * i + 2]; \
-	d##3 = TE0(s##3) ^ TE1(s##0) ^ TE2(s##1) ^ TE3(s##2) ^ rk[4 * i + 3]; \
-} while (0);
Signature · 1 line
2.33.0

I noticed this as well when a W=1 build brought up a warning about the /** comment.