From: Greg KH <gregkh@linuxfoundation.org>
To: Bo YU <tsu.yubo@gmail.com>
Cc: sergio.paracuellos@gmail.com, quytelda@tamalin.org,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
yuzibode@126.com
Subject: Re: [PATCH] staging/ks7070: Removed unused varibale
Date: Sat, 23 Feb 2019 08:43:20 +0100 [thread overview]
Message-ID: <20190223074320.GA921@kroah.com> (raw)
In-Reply-To: <20190223063939.18261-1-tsu.yubo@gmail.com>
On Sat, Feb 23, 2019 at 01:39:39AM -0500, Bo YU wrote:
> From: Bo Yu <tsu.yubo@gmail.com>
>
> Compiling the kernel with W=1 results in the following warning:
>
> drivers/staging/ks7010/ks_hostif.c:465:6: warning: variable ‘mib_val_type’
> set but not used [-Wunused-but-set-variable]
> u16 mib_val_type;
>
> drivers/staging/ks7010/ks_hostif.c:464:6: warning: variable ‘mib_val_size’
> set but not used [-Wunused-but-set-variable]
> u16 mib_val_size;
>
> drivers/staging/ks7010/ks_hostif.c:786:6: warning: variable ‘result_code’
> set but not used [-Wunused-but-set-variable]
> u16 result_code;
>
> Remove these variables.
>
> Rebase on next-20190222
>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Sergio Paracuellos <sergio.paracuellos@gmail.com>
> Cc: Quytelda Kahja <quytelda@tamalin.org>
>
> Signed-off-by: Bo Yu <tsu.yubo@gmail.com>
> ---
> drivers/staging/ks7010/ks_hostif.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c
> index d938b0997a53..913d8996437a 100644
> --- a/drivers/staging/ks7010/ks_hostif.c
> +++ b/drivers/staging/ks7010/ks_hostif.c
> @@ -461,13 +461,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_attribute = get_dword(priv);
> - mib_val_size = get_word(priv);
> - mib_val_type = get_word(priv);
The function get_word() actually does something to the priv structure,
so you just broke the driver :(
>
> if (mib_status) {
> netdev_err(priv->net_dev, "attribute=%08X, status=%08X\n",
> @@ -783,9 +779,7 @@ 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);
Same here, odds are you just broke things :(
Please be more careful.
greg k-h
next prev parent reply other threads:[~2019-02-23 7:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-23 6:39 [PATCH] staging/ks7070: Removed unused varibale Bo YU
2019-02-23 6:46 ` Sergio Paracuellos
2019-02-23 7:18 ` Dan Carpenter
2019-02-23 7:43 ` Greg KH [this message]
2019-02-23 8:09 ` YU Bo
2019-02-23 8:38 ` Greg KH
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=20190223074320.GA921@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=devel@driverdev.osuosl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=quytelda@tamalin.org \
--cc=sergio.paracuellos@gmail.com \
--cc=tsu.yubo@gmail.com \
--cc=yuzibode@126.com \
/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.