mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH V2] staging: ks7070: removed unused varibales
@ 2019-02-23  7:27 Bo YU
  2019-02-23  7:31 ` YU Bo
  2019-02-23  7:34 ` Sergio Paracuellos
  0 siblings, 2 replies; 3+ messages in thread
From: Bo YU @ 2019-02-23  7:27 UTC (permalink / raw)
  To: gregkh, sergio.paracuellos, quytelda; +Cc: Bo Yu, devel, linux-kernel, yuzibode

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

V2: fix patch format

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);
 
 	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);
 }
-- 
2.11.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH V2] staging: ks7070: removed unused varibales
  2019-02-23  7:27 [PATCH V2] staging: ks7070: removed unused varibales Bo YU
@ 2019-02-23  7:31 ` YU Bo
  2019-02-23  7:34 ` Sergio Paracuellos
  1 sibling, 0 replies; 3+ messages in thread
From: YU Bo @ 2019-02-23  7:31 UTC (permalink / raw)
  To: gregkh, sergio.paracuellos, quytelda; +Cc: devel, linux-kernel, yuzibode

On Sat, Feb 23, 2019 at 02:27:12AM -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
>
>V2: fix patch format
Please drop it, will send V3
Thanks
>
>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);
>
> 	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);
> }
>--
>2.11.0
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH V2] staging: ks7070: removed unused varibales
  2019-02-23  7:27 [PATCH V2] staging: ks7070: removed unused varibales Bo YU
  2019-02-23  7:31 ` YU Bo
@ 2019-02-23  7:34 ` Sergio Paracuellos
  1 sibling, 0 replies; 3+ messages in thread
From: Sergio Paracuellos @ 2019-02-23  7:34 UTC (permalink / raw)
  To: Bo YU; +Cc: Greg KH, quytelda, devel, linux-kernel, yuzibode

Hi Bo,

On Sat, Feb 23, 2019 at 8:27 AM Bo YU <tsu.yubo@gmail.com> 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
> V2: fix patch format

As Dan has just said, this two rebase and v2 stuff is not needed in
the changelog.
Please, put it under the --- cut off line.

>
> 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);
>
>         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);
>  }
> --
> 2.11.0
>

The commit message is still wrong. The driver name is not called
ks7070 is called ks7010, right? and
also the typo with "varibales" is still wrong... Let's do all changes
right at once, please :)

Best regards,
    Sergio Paracuellos

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-02-23  7:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-23  7:27 [PATCH V2] staging: ks7070: removed unused varibales Bo YU
2019-02-23  7:31 ` YU Bo
2019-02-23  7:34 ` Sergio Paracuellos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®