From: Aakash Hemadri <aakashhemadri123@gmail.com> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Shuah Khan <skhan@linuxfoundation.org>, Bjorn Helgaas <bjorn@helgaas.com>, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] staging: rtl8723bs: fix cast to restricted __le32 Date: Mon, 16 Aug 2021 23:05:07 +0530 [thread overview] Message-ID: <1be80f0196bed681bf55bfe3155f564b4ebf3b76.1629135143.git.aakashhemadri123@gmail.com> (raw) In-Reply-To: <cover.1629135143.git.aakashhemadri123@gmail.com> Fix sparse warning: warning: cast to restricted __le32 Signed-off-by: Aakash Hemadri <aakashhemadri123@gmail.com> --- drivers/staging/rtl8723bs/core/rtw_security.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_security.c b/drivers/staging/rtl8723bs/core/rtw_security.c index 381deeea99d0..5320b1a46dfb 100644 --- a/drivers/staging/rtl8723bs/core/rtw_security.c +++ b/drivers/staging/rtl8723bs/core/rtw_security.c @@ -122,7 +122,7 @@ void rtw_wep_decrypt(struct adapter *padapter, u8 *precvframe) arc4_crypt(ctx, payload, payload, length); /* calculate icv and compare the icv */ - *((u32 *)crc) = le32_to_cpu(~crc32_le(~0, payload, length - 4)); + *((u32 *)crc) = ~crc32_le(~0, payload, length - 4); } } @@ -621,7 +621,7 @@ u32 rtw_tkip_decrypt(struct adapter *padapter, u8 *precvframe) arc4_setkey(ctx, rc4key, 16); arc4_crypt(ctx, payload, payload, length); - *((u32 *)crc) = le32_to_cpu(~crc32_le(~0, payload, length - 4)); + *((u32 *)crc) = ~crc32_le(~0, payload, length - 4); if (crc[3] != payload[length - 1] || crc[2] != payload[length - 2] || crc[1] != payload[length - 3] || crc[0] != payload[length - 4]) -- 2.32.0
next prev parent reply other threads:[~2021-08-16 17:35 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-08-16 17:35 [PATCH 0/2] staging: rtl8732bs: Fix sparse warnings Aakash Hemadri 2021-08-16 17:35 ` [PATCH 1/2] staging: rtl8732bs: incorrect type in assignment Aakash Hemadri 2021-08-16 22:43 ` kernel test robot 2021-08-16 17:35 ` Aakash Hemadri [this message] 2021-08-19 9:43 ` [PATCH 2/2] staging: rtl8723bs: fix cast to restricted __le32 David Laight 2021-08-16 18:48 ` [PATCH 0/2] staging: rtl8732bs: Fix sparse warnings Fabio M. De Francesco 2021-08-18 5:58 ` Fabio M. De Francesco -- strict thread matches above, loose matches on Subject: below -- 2021-08-16 17:30 Aakash Hemadri 2021-08-16 17:30 ` [PATCH 2/2] staging: rtl8723bs: fix cast to restricted __le32 Aakash Hemadri
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=1be80f0196bed681bf55bfe3155f564b4ebf3b76.1629135143.git.aakashhemadri123@gmail.com \ --to=aakashhemadri123@gmail.com \ --cc=bjorn@helgaas.com \ --cc=gregkh@linuxfoundation.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-staging@lists.linux.dev \ --cc=skhan@linuxfoundation.org \ --subject='Re: [PATCH 2/2] staging: rtl8723bs: fix cast to restricted __le32' \ /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
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).