From: Kalle Valo <kvalo@codeaurora.org>
To: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Cc: Jussi Kivilinna <jussi.kivilinna@iki.fi>,
"David S. Miller" <davem@davemloft.net>,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org,
"Gustavo A. R. Silva" <gustavo@embeddedor.com>
Subject: Re: [PATCH][next] rndis_wlan: Remove logically dead code
Date: Tue, 12 May 2020 08:53:36 +0000 (UTC) [thread overview]
Message-ID: <20200512085336.B8DE4C433CB@smtp.codeaurora.org> (raw)
In-Reply-To: <20200505235205.GA18539@embeddedor>
"Gustavo A. R. Silva" <gustavo@embeddedor.com> wrote:
> caps_buf is always of size sizeof(*caps) because
> sizeof(caps->auth_encr_pair) * 16 is always zero. Notice
> that when using zero-length arrays, sizeof evaluates to zero[1].
>
> So, the code introduced by
> commit 0308383f9591 ("rndis_wlan: get max_num_pmkids from device")
> is logically dead, hence is never executed and can be removed. As a
> consequence, the rest of the related code can be refactored a bit.
>
> Notice that this code has been out there since March 2010.
>
> [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Patch applied to wireless-drivers-next.git, thanks.
485c64be7152 rndis_wlan: Remove logically dead code
--
https://patchwork.kernel.org/patch/11530089/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
prev parent reply other threads:[~2020-05-12 8:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-05 23:52 [PATCH][next] rndis_wlan: Remove logically dead code Gustavo A. R. Silva
2020-05-12 8:53 ` Kalle Valo [this message]
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=20200512085336.B8DE4C433CB@smtp.codeaurora.org \
--to=kvalo@codeaurora.org \
--cc=davem@davemloft.net \
--cc=gustavo@embeddedor.com \
--cc=jussi.kivilinna@iki.fi \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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.