From: Nathan Chancellor <nathan@kernel.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Phillip Potter <phil@philpotter.co.uk>,
Larry Finger <Larry.Finger@lwfinger.net>
Cc: Nick Desaulniers <ndesaulniers@google.com>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
clang-built-linux@googlegroups.com,
Nathan Chancellor <nathan@kernel.org>
Subject: [PATCH 2/3] staging: r8188eu: Remove uninitialized use of ether_type in portctrl()
Date: Thu, 12 Aug 2021 13:40:26 -0700 [thread overview]
Message-ID: <20210812204027.338872-3-nathan@kernel.org> (raw)
In-Reply-To: <20210812204027.338872-1-nathan@kernel.org>
After commit 987219ad34a6 ("staging: r8188eu: remove lines from Makefile
that silence build warnings"), clang warns:
drivers/staging/r8188eu/core/rtw_recv.c:499:8: warning: variable
'ether_type' is uninitialized when used here [-Wuninitialized]
if (ether_type == eapol_type)
^~~~~~~~~~
drivers/staging/r8188eu/core/rtw_recv.c:458:16: note: initialize the
variable 'ether_type' to silence this warning
u16 ether_type;
^
= 0
1 warning generated.
This if statement sets the exact same assignment as above so just remove
it.
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
drivers/staging/r8188eu/core/rtw_recv.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c
index 9b3637e49052..8df38db9572c 100644
--- a/drivers/staging/r8188eu/core/rtw_recv.c
+++ b/drivers/staging/r8188eu/core/rtw_recv.c
@@ -495,10 +495,6 @@ static struct recv_frame *portctrl(struct adapter *adapter, struct recv_frame *p
/* allowed */
/* check decryption status, and decrypt the frame if needed */
prtnframe = precv_frame;
- /* check is the EAPOL frame or not (Rekey) */
- if (ether_type == eapol_type)
- /* check Rekey */
- prtnframe = precv_frame;
}
} else {
prtnframe = precv_frame;
--
2.33.0.rc2
next prev parent reply other threads:[~2021-08-12 20:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-12 20:40 [PATCH 0/3] staging: r8188eu: Fix -Wuninitialized instances from clang Nathan Chancellor
2021-08-12 20:40 ` [PATCH 1/3] staging: r8188eu: Remove unused static inline functions in rtw_recv.h Nathan Chancellor
2021-08-12 21:08 ` Phillip Potter
2021-08-12 20:40 ` Nathan Chancellor [this message]
2021-08-12 21:09 ` [PATCH 2/3] staging: r8188eu: Remove uninitialized use of ether_type in portctrl() Phillip Potter
2021-08-12 20:40 ` [PATCH 3/3] staging: r8188eu: Reorganize error handling in rtw_drv_init() Nathan Chancellor
2021-08-12 21:15 ` Phillip Potter
2021-08-12 23:11 ` Fabio M. De Francesco
2021-08-12 23:14 ` Nathan Chancellor
2021-08-13 1:51 ` Fabio M. De Francesco
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=20210812204027.338872-3-nathan@kernel.org \
--to=nathan@kernel.org \
--cc=Larry.Finger@lwfinger.net \
--cc=clang-built-linux@googlegroups.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=ndesaulniers@google.com \
--cc=phil@philpotter.co.uk \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.