All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Colin Ian King <colin.king@canonical.com>
Cc: Jerry Chuang <jerry-chuang@realtek.com>,
	John Whitmore <johnfwhitmore@gmail.com>,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: Added Realtek rtl8192u driver to staging - static analysis report.
Date: Wed, 21 Aug 2019 13:55:31 -0700	[thread overview]
Message-ID: <20190821205531.GC17415@kroah.com> (raw)
In-Reply-To: <cb1222a8-4c67-8fac-f1d9-755e97699caa@canonical.com>

On Wed, Aug 21, 2019 at 07:18:39PM +0100, Colin Ian King wrote:
> Hi,
> 
> Static analysis of linux-next picked up an issue with the following commit:
> 
> commit 8fc8598e61f6f384f3eaf1d9b09500c12af47b37
> Author: Jerry Chuang <jerry-chuang@realtek.com>
> Date:   Tue Nov 3 07:17:11 2009 -0200
> 
>     Staging: Added Realtek rtl8192u driver to staging
> 
> In drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c we have:
> 
> CID 48331 (#1 of 1): Unused value (UNUSED_VALUE) assigned_pointer
> 
> Assigning value from ieee->crypt[ieee->tx_keyidx] to crypt here, but
> that stored value is not used.
> 
> 746        crypt = ieee->crypt[ieee->tx_keyidx];
> 747        if (encrypt)
> 748                beacon_buf->capability |=
> cpu_to_le16(WLAN_CAPABILITY_PRIVACY);
> 
> Pointer crypt is being assigned but is never used afterwards.  Now
> either this is a redundant assignment and can be removed OR maybe crypt
> should be checked and there is a typo, e.g.:
> 
> 	crypt = ieee->crypt[ieee->tx_keyidx];
> 	if (crypt)
> 		...
> 
> Either way, it's not clear to me and I think the code needs cleaning up.
> Any ideas?

10+ year old code, yeah!!!

Just guess, who knows, no one seems to care :(

greg k-h

  reply	other threads:[~2019-08-21 20:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-21 18:18 Added Realtek rtl8192u driver to staging - static analysis report Colin Ian King
2019-08-21 20:55 ` Greg Kroah-Hartman [this message]
2019-08-21 21:56   ` stephen
2019-08-22  8:08 ` Dan Carpenter

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=20190821205531.GC17415@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=colin.king@canonical.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=jerry-chuang@realtek.com \
    --cc=johnfwhitmore@gmail.com \
    --cc=linux-kernel@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.