LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Nathan Chancellor <natechancellor@gmail.com>
To: devel@driverdev.osuosl.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/7] staging: ks7010: Remove unused variables
Date: Mon, 7 May 2018 10:59:34 -0700	[thread overview]
Message-ID: <20180507175934.GA14302@localhost> (raw)
In-Reply-To: <20180506220304.13040-2-natechancellor@gmail.com>

On Sun, May 06, 2018 at 03:02:59PM -0700, Nathan Chancellor wrote:
> GCC warns these variables are all set but never used so remove them.
> 
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> ---
>  drivers/staging/ks7010/ks_hostif.c | 12 +-----------
>  1 file changed, 1 insertion(+), 11 deletions(-)
> 
> diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c
> index c0a9a67dc0b4..4c2f8f710c6e 100644
> --- a/drivers/staging/ks7010/ks_hostif.c
> +++ b/drivers/staging/ks7010/ks_hostif.c
> @@ -354,7 +354,6 @@ void hostif_data_indication(struct ks_wlan_private *priv)
>  	unsigned short auth_type;
>  	unsigned char temp[256];
>  	struct ether_hdr *eth_hdr;
> -	unsigned short eth_proto;
>  	struct ieee802_1x_hdr *aa1x_hdr;
>  	size_t size;
>  	int ret;
> @@ -369,7 +368,6 @@ void hostif_data_indication(struct ks_wlan_private *priv)
>  	get_word(priv);	/* Reserve Area */
>  
>  	eth_hdr = (struct ether_hdr *)(priv->rxp);
> -	eth_proto = ntohs(eth_hdr->h_proto);
>  
>  	/* source address check */
>  	if (ether_addr_equal(&priv->eth_addr[0], eth_hdr->h_source)) {
> @@ -464,13 +462,9 @@ void hostif_mib_get_confirm(struct ks_wlan_private *priv)
>  	struct net_device *dev = priv->net_dev;
>  	u32 mib_status;
>  	u32 mib_attribute;
> -	u16 mib_val_size;
> -	u16 mib_val_type;
>  
>  	mib_status = get_dword(priv);	/* MIB status */
>  	mib_attribute = get_dword(priv);	/* MIB atttibute */
> -	mib_val_size = get_word(priv);	/* MIB value size */
> -	mib_val_type = get_word(priv);	/* MIB value type */
>  
>  	if (mib_status) {
>  		netdev_err(priv->net_dev, "attribute=%08X, status=%08X\n",
> @@ -792,9 +786,6 @@ void hostif_ps_adhoc_set_confirm(struct ks_wlan_private *priv)
>  static
>  void hostif_infrastructure_set_confirm(struct ks_wlan_private *priv)
>  {
> -	u16 result_code;
> -
> -	result_code = get_word(priv);
>  	priv->infra_status = 1;	/* infrastructure mode set */
>  	hostif_sme_enqueue(priv, SME_MODE_SET_CONFIRM);
>  }
> @@ -872,14 +863,13 @@ static
>  void hostif_phy_information_confirm(struct ks_wlan_private *priv)
>  {
>  	struct iw_statistics *wstats = &priv->wstats;
> -	unsigned char rssi, signal, noise;
> +	unsigned char rssi, signal;
>  	unsigned char link_speed;
>  	unsigned int transmitted_frame_count, received_fragment_count;
>  	unsigned int failed_count, fcs_error_count;
>  
>  	rssi = get_byte(priv);
>  	signal = get_byte(priv);
> -	noise = get_byte(priv);
>  	link_speed = get_byte(priv);
>  	transmitted_frame_count = get_dword(priv);
>  	received_fragment_count = get_dword(priv);
> -- 
> 2.17.0
> 

On second glance, I did not realize most of these functions involve
pointer semantics. Please do not apply this. I can send a v2 series if
necessary although every other patch is fine.

Thanks,
Nathan
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

  reply	other threads:[~2018-05-07 17:59 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-06 22:02 [PATCH 1/7] staging: ks7010: Replace license boilerplate with SPDX identifiers Nathan Chancellor
2018-05-06 22:02 ` [PATCH 2/7] staging: ks7010: Remove unused variables Nathan Chancellor
2018-05-07 17:59   ` Nathan Chancellor [this message]
2018-05-06 22:03 ` [PATCH 3/7] staging: ks7010: Remove unnecessary limit checks Nathan Chancellor
2018-05-14 13:17   ` Dan Carpenter
2018-05-14 14:06     ` Nathan Chancellor
2018-05-14 14:15       ` Dan Carpenter
2018-05-06 22:03 ` [PATCH 4/7] staging: ks7010: Adjust spacing around functions and declarations Nathan Chancellor
2018-05-08 11:45   ` Greg Kroah-Hartman
2018-05-06 22:03 ` [PATCH 5/7] staging: ks7010: Remove unnecessary parentheses Nathan Chancellor
2018-05-08 11:44   ` Greg Kroah-Hartman
2018-05-06 22:03 ` [PATCH 6/7] staging: ks7010: Adjust alignment to open parenthesis Nathan Chancellor
2018-05-08 11:45   ` Greg Kroah-Hartman
2018-05-06 22:03 ` [PATCH 7/7] staging: ks7010: Move from bool to int in structs Nathan Chancellor
2018-05-08 11:34   ` Greg Kroah-Hartman
2018-05-08 11:42     ` Nathan Chancellor
2018-05-08 11:43 ` [PATCH 1/7] staging: ks7010: Replace license boilerplate with SPDX identifiers Greg Kroah-Hartman
2018-05-08 11:49   ` Nathan Chancellor

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=20180507175934.GA14302@localhost \
    --to=natechancellor@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: [PATCH 2/7] staging: ks7010: Remove unused variables' \
    /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).