linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: r8188eu: remove unused macro ROUND
@ 2021-09-09 20:21 Michael Straube
  2021-09-10  7:30 ` Martin Kaiser
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Straube @ 2021-09-09 20:21 UTC (permalink / raw)
  To: gregkh
  Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
	linux-kernel, Michael Straube

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

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_security.c | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_security.c b/drivers/staging/r8188eu/core/rtw_security.c
index 82987255400a..db35f326bbb1 100644
--- a/drivers/staging/r8188eu/core/rtw_security.c
+++ b/drivers/staging/r8188eu/core/rtw_security.c
@@ -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);
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] staging: r8188eu: remove unused macro ROUND
  2021-09-09 20:21 [PATCH] staging: r8188eu: remove unused macro ROUND Michael Straube
@ 2021-09-10  7:30 ` Martin Kaiser
  0 siblings, 0 replies; 2+ messages in thread
From: Martin Kaiser @ 2021-09-10  7:30 UTC (permalink / raw)
  To: Michael Straube
  Cc: gregkh, Larry.Finger, phil, fmdefrancesco, linux-staging, linux-kernel

Thus wrote Michael Straube (straube.linux@gmail.com):

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

> Signed-off-by: Michael Straube <straube.linux@gmail.com>
> ---
>  drivers/staging/r8188eu/core/rtw_security.c | 13 -------------
>  1 file changed, 13 deletions(-)

> diff --git a/drivers/staging/r8188eu/core/rtw_security.c b/drivers/staging/r8188eu/core/rtw_security.c
> index 82987255400a..db35f326bbb1 100644
> --- a/drivers/staging/r8188eu/core/rtw_security.c
> +++ b/drivers/staging/r8188eu/core/rtw_security.c
> @@ -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);
> -- 
> 2.33.0

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

Acked-by: Martin Kaiser <martin@kaiser.cx>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-09-10  7:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-09 20:21 [PATCH] staging: r8188eu: remove unused macro ROUND Michael Straube
2021-09-10  7:30 ` Martin Kaiser

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).