From: Fabio Aiuto <fabioaiuto83@gmail.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: dan.carpenter@oracle.com, david.laight@aculab.com,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 19/20] staging: rtl8723bs: include macro in a do - while loop in core/rtw_security.c
Date: Sun, 28 Mar 2021 16:23:48 +0200 [thread overview]
Message-ID: <20210328142347.GA1450@agape.jhs> (raw)
In-Reply-To: <YGByG/9r6yoylXJE@kroah.com>
On Sun, Mar 28, 2021 at 02:10:03PM +0200, Greg KH wrote:
> On Sat, Mar 27, 2021 at 03:24:18PM +0100, Fabio Aiuto wrote:
> > fix the following checkpatch warning:
> >
> > ERROR: Macros with multiple statements should be enclosed
> > in a do - while loop
> > 2014: FILE: drivers/staging/rtl8723bs/core/rtw_security.c:2014:
> > +#define ROUND(i, d, s) \
> >
> > Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
> > ---
> > drivers/staging/rtl8723bs/core/rtw_security.c | 10 ++++++----
> > 1 file changed, 6 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/staging/rtl8723bs/core/rtw_security.c b/drivers/staging/rtl8723bs/core/rtw_security.c
> > index 0ddd7667a986..8a447e149438 100644
> > --- a/drivers/staging/rtl8723bs/core/rtw_security.c
> > +++ b/drivers/staging/rtl8723bs/core/rtw_security.c
> > @@ -2012,10 +2012,12 @@ static void rijndaelEncrypt(u32 rk[/*44*/], u8 pt[16], u8 ct[16])
> > s3 = GETU32(pt + 12) ^ rk[3];
> >
> > #define ROUND(i, d, s) \
> > -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]
> > + 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)
>
> Why is this code not using the in-kernel crypto code instead? I'll take
> this but that should be something that is done to this code
> eventually...
>
> thanks,
>
> greg k-h
ok, I will indagate fo the fix.
thank you,
fabio
next prev parent reply other threads:[~2021-03-28 14:23 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-27 14:23 [PATCH v2 00/20] fix checkpatch error on macros Fabio Aiuto
2021-03-27 14:24 ` [PATCH v2 01/20] staging: rtl8723bs: remove unused macros in include/hal_com.h Fabio Aiuto
2021-03-27 14:24 ` [PATCH v2 02/20] staging: rtl8723bs: put parentheses on macro with complex values " Fabio Aiuto
2021-03-27 14:24 ` [PATCH v2 03/20] staging: rtl8723bs: added spaces around operators in a macro " Fabio Aiuto
2021-03-27 14:24 ` [PATCH v2 04/20] staging: rtl8723bs: remove unused macros in include/hal_com_reg.h Fabio Aiuto
2021-03-27 14:24 ` [PATCH v2 05/20] staging: rtl8723bs: remove unused macros in include/hal_data.h Fabio Aiuto
2021-03-27 14:24 ` [PATCH v2 06/20] staging: rtl8723bs: put parentheses on macros with complex values " Fabio Aiuto
2021-03-27 14:24 ` [PATCH v2 07/20] staging: rtl8723bs: add spaces around operators " Fabio Aiuto
2021-03-27 14:24 ` [PATCH v2 08/20] staging: rtl8723bs: remove unused macros in include/hal_phy.h Fabio Aiuto
2021-03-27 14:24 ` [PATCH v2 09/20] staging: rtl8723bs: put parentheses on macros with complex values in include/rtw_debug.h Fabio Aiuto
2021-03-28 8:39 ` Joe Perches
2021-03-28 12:08 ` Greg KH
2021-03-28 14:43 ` Fabio Aiuto
2021-03-28 14:54 ` Greg KH
2021-03-27 14:24 ` [PATCH v2 10/20] staging: rtl8723bs: remove unused macro in include/rtw_pwrctrl.h Fabio Aiuto
2021-03-27 14:24 ` [PATCH v2 11/20] staging: rtl8723bs: remove unused field in rereg_nd_name_data struct Fabio Aiuto
2021-03-27 14:24 ` [PATCH v2 12/20] staging: rtl8723bs: remove commented code line in os_dep/ioctl_linux.c Fabio Aiuto
2021-03-27 14:24 ` [PATCH v2 13/20] staging: rtl8723bs: put parentheses on macros with complex values in include/rtw_pwrctrl.h Fabio Aiuto
2021-03-27 14:24 ` [PATCH v2 14/20] staging: rtl8723bs: add spaces around operator " Fabio Aiuto
2021-03-27 14:24 ` [PATCH v2 15/20] staging: rtl8723bs: remove unused macros in include/wifi.h Fabio Aiuto
2021-03-27 14:24 ` [PATCH v2 16/20] staging: rtl8723bs: put parentheses on macros with complex values " Fabio Aiuto
2021-03-27 14:24 ` [PATCH v2 17/20] staging: rtl8723bs: remove macros updating unused fields in struct security_priv Fabio Aiuto
2021-03-27 14:24 ` [PATCH v2 18/20] staging: rtl8723bs: remove " Fabio Aiuto
2021-03-27 14:24 ` [PATCH v2 19/20] staging: rtl8723bs: include macro in a do - while loop in core/rtw_security.c Fabio Aiuto
2021-03-28 12:10 ` Greg KH
2021-03-28 14:23 ` Fabio Aiuto [this message]
2021-03-27 14:24 ` [PATCH v2 20/20] staging: rtl8723bs: remove unused macros in include/drv_types.c Fabio Aiuto
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210328142347.GA1450@agape.jhs \
--to=fabioaiuto83@gmail.com \
--cc=dan.carpenter@oracle.com \
--cc=david.laight@aculab.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox