* [PATCH 10/12] staging: rtl8188eu: reg_macid variable removed in hw_var_set_macaddr
@ 2015-11-08 6:51 Ivan Safonov
2015-11-08 20:16 ` Andy Shevchenko
0 siblings, 1 reply; 2+ messages in thread
From: Ivan Safonov @ 2015-11-08 6:51 UTC (permalink / raw)
To: devel
Cc: Greg Kroah-Hartman, Vaishali Thakkar, Jakub Sitnicki,
Anish Bhatt, Joe Perches, Ivan Safonov, Nicholas Mc Guire,
Alexey Khoroshilov, Rémy Oudompheng, Sudip Mukherjee,
Shraddha Barke, linux-kernel
The reg_macid variable used only once. Also idx renamed to i and Adapter to adapter.
Signed-off-by: Ivan Safonov <insafonov@gmail.com>
---
drivers/staging/rtl8188eu/hal/usb_halinit.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/rtl8188eu/hal/usb_halinit.c b/drivers/staging/rtl8188eu/hal/usb_halinit.c
index 5789e1e..e1d6632 100644
--- a/drivers/staging/rtl8188eu/hal/usb_halinit.c
+++ b/drivers/staging/rtl8188eu/hal/usb_halinit.c
@@ -1253,15 +1253,12 @@ static void hw_var_set_opmode(struct adapter *Adapter, u8 variable, u8 *val)
}
}
-static void hw_var_set_macaddr(struct adapter *Adapter, u8 variable, u8 *val)
+static void hw_var_set_macaddr(struct adapter *adapter, u8 variable, u8 *val)
{
- u8 idx = 0;
- u32 reg_macid;
-
- reg_macid = REG_MACID;
+ int i;
- for (idx = 0; idx < 6; idx++)
- usb_write8(Adapter, (reg_macid+idx), val[idx]);
+ for (i = 0; i < 6; i++)
+ usb_write8(adapter, REG_MACID + i, val[i]);
}
static void hw_var_set_bssid(struct adapter *Adapter, u8 variable, u8 *val)
--
2.4.10
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 10/12] staging: rtl8188eu: reg_macid variable removed in hw_var_set_macaddr
2015-11-08 6:51 [PATCH 10/12] staging: rtl8188eu: reg_macid variable removed in hw_var_set_macaddr Ivan Safonov
@ 2015-11-08 20:16 ` Andy Shevchenko
0 siblings, 0 replies; 2+ messages in thread
From: Andy Shevchenko @ 2015-11-08 20:16 UTC (permalink / raw)
To: Ivan Safonov
Cc: devel, Greg Kroah-Hartman, Vaishali Thakkar, Jakub Sitnicki,
Anish Bhatt, Joe Perches, Nicholas Mc Guire, Alexey Khoroshilov,
Rémy Oudompheng, Sudip Mukherjee, Shraddha Barke,
linux-kernel
On Sun, Nov 8, 2015 at 8:51 AM, Ivan Safonov <insafonov@gmail.com> wrote:
> The reg_macid variable used only once. Also idx renamed to i and Adapter to adapter.
>
> Signed-off-by: Ivan Safonov <insafonov@gmail.com>
> ---
> drivers/staging/rtl8188eu/hal/usb_halinit.c | 11 ++++-------
> 1 file changed, 4 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/staging/rtl8188eu/hal/usb_halinit.c b/drivers/staging/rtl8188eu/hal/usb_halinit.c
> index 5789e1e..e1d6632 100644
> --- a/drivers/staging/rtl8188eu/hal/usb_halinit.c
> +++ b/drivers/staging/rtl8188eu/hal/usb_halinit.c
> @@ -1253,15 +1253,12 @@ static void hw_var_set_opmode(struct adapter *Adapter, u8 variable, u8 *val)
> }
> }
>
> -static void hw_var_set_macaddr(struct adapter *Adapter, u8 variable, u8 *val)
> +static void hw_var_set_macaddr(struct adapter *adapter, u8 variable, u8 *val)
> {
> - u8 idx = 0;
> - u32 reg_macid;
> -
> - reg_macid = REG_MACID;
> + int i;
>
> - for (idx = 0; idx < 6; idx++)
> - usb_write8(Adapter, (reg_macid+idx), val[idx]);
> + for (i = 0; i < 6; i++)
ETH_ALEN?
> + usb_write8(adapter, REG_MACID + i, val[i]);
> }
>
> static void hw_var_set_bssid(struct adapter *Adapter, u8 variable, u8 *val)
> --
> 2.4.10
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-11-08 20:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-08 6:51 [PATCH 10/12] staging: rtl8188eu: reg_macid variable removed in hw_var_set_macaddr Ivan Safonov
2015-11-08 20:16 ` Andy Shevchenko
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.