* [PATCH 1/1] mwifiex: remove superfluous condition (2)
@ 2016-07-31 10:49 Heinrich Schuchardt
2016-07-31 12:03 ` Kalle Valo
0 siblings, 1 reply; 5+ messages in thread
From: Heinrich Schuchardt @ 2016-07-31 10:49 UTC (permalink / raw)
To: Amitkumar Karwar, Nishant Sarmukadam, Kalle Valo
Cc: linux-wireless, netdev, linux-kernel, Heinrich Schuchardt
We are using mac as source address in a memcpy.
In the lines below we can assume mac is not NULL.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
drivers/net/wireless/marvell/mwifiex/sta_cmd.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c b/drivers/net/wireless/marvell/mwifiex/sta_cmd.c
index 128add8..0d4f9fe 100644
--- a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c
+++ b/drivers/net/wireless/marvell/mwifiex/sta_cmd.c
@@ -706,15 +706,10 @@ mwifiex_cmd_802_11_key_material_v2(struct mwifiex_private *priv,
(priv->wep_key_curr_index & KEY_INDEX_MASK))
key_info |= KEY_DEFAULT;
} else {
- if (mac) {
- if (is_broadcast_ether_addr(mac))
- key_info |= KEY_MCAST;
- else
- key_info |= KEY_UNICAST |
- KEY_DEFAULT;
- } else {
+ if (is_broadcast_ether_addr(mac))
key_info |= KEY_MCAST;
- }
+ else
+ key_info |= KEY_UNICAST | KEY_DEFAULT;
}
}
km->key_param_set.key_info = cpu_to_le16(key_info);
--
2.8.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] mwifiex: remove superfluous condition (2)
2016-07-31 10:49 [PATCH 1/1] mwifiex: remove superfluous condition (2) Heinrich Schuchardt
@ 2016-07-31 12:03 ` Kalle Valo
2016-07-31 12:11 ` [PATCH 1/1] mwifiex: key_material_v2 remove superfluous condition Heinrich Schuchardt
0 siblings, 1 reply; 5+ messages in thread
From: Kalle Valo @ 2016-07-31 12:03 UTC (permalink / raw)
To: Heinrich Schuchardt
Cc: Amitkumar Karwar, Nishant Sarmukadam, linux-wireless, netdev,
linux-kernel
Heinrich Schuchardt <xypron.glpk@gmx.de> writes:
> We are using mac as source address in a memcpy.
> In the lines below we can assume mac is not NULL.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Please try to make the commit titles unique, for example you can use
function names or something else. Adding "(2)" is not the way to do
that.
--
Kalle Valo
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/1] mwifiex: key_material_v2 remove superfluous condition
2016-07-31 12:03 ` Kalle Valo
@ 2016-07-31 12:11 ` Heinrich Schuchardt
2016-08-01 10:46 ` Amitkumar Karwar
2016-09-03 10:00 ` [1/1] " Kalle Valo
0 siblings, 2 replies; 5+ messages in thread
From: Heinrich Schuchardt @ 2016-07-31 12:11 UTC (permalink / raw)
To: Amitkumar Karwar, Nishant Sarmukadam, Kalle Valo
Cc: linux-wireless, netdev, linux-kernel, Heinrich Schuchardt
We are using mac as source address in a memcpy.
In the lines below we can assume mac is not NULL.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
drivers/net/wireless/marvell/mwifiex/sta_cmd.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c b/drivers/net/wireless/marvell/mwifiex/sta_cmd.c
index 128add8..0d4f9fe 100644
--- a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c
+++ b/drivers/net/wireless/marvell/mwifiex/sta_cmd.c
@@ -706,15 +706,10 @@ mwifiex_cmd_802_11_key_material_v2(struct mwifiex_private *priv,
(priv->wep_key_curr_index & KEY_INDEX_MASK))
key_info |= KEY_DEFAULT;
} else {
- if (mac) {
- if (is_broadcast_ether_addr(mac))
- key_info |= KEY_MCAST;
- else
- key_info |= KEY_UNICAST |
- KEY_DEFAULT;
- } else {
+ if (is_broadcast_ether_addr(mac))
key_info |= KEY_MCAST;
- }
+ else
+ key_info |= KEY_UNICAST | KEY_DEFAULT;
}
}
km->key_param_set.key_info = cpu_to_le16(key_info);
--
2.8.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* RE: [PATCH 1/1] mwifiex: key_material_v2 remove superfluous condition
2016-07-31 12:11 ` [PATCH 1/1] mwifiex: key_material_v2 remove superfluous condition Heinrich Schuchardt
@ 2016-08-01 10:46 ` Amitkumar Karwar
2016-09-03 10:00 ` [1/1] " Kalle Valo
1 sibling, 0 replies; 5+ messages in thread
From: Amitkumar Karwar @ 2016-08-01 10:46 UTC (permalink / raw)
To: Heinrich Schuchardt, Nishant Sarmukadam, Kalle Valo
Cc: linux-wireless, netdev, linux-kernel
> From: Heinrich Schuchardt [mailto:xypron.glpk@gmx.de]
> Sent: Sunday, July 31, 2016 5:41 PM
> To: Amitkumar Karwar; Nishant Sarmukadam; Kalle Valo
> Cc: linux-wireless@vger.kernel.org; netdev@vger.kernel.org; linux-
> kernel@vger.kernel.org; Heinrich Schuchardt
> Subject: [PATCH 1/1] mwifiex: key_material_v2 remove superfluous
> condition
>
> We are using mac as source address in a memcpy.
> In the lines below we can assume mac is not NULL.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
> drivers/net/wireless/marvell/mwifiex/sta_cmd.c | 11 +++--------
> 1 file changed, 3 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c
> b/drivers/net/wireless/marvell/mwifiex/sta_cmd.c
> index 128add8..0d4f9fe 100644
> --- a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c
> +++ b/drivers/net/wireless/marvell/mwifiex/sta_cmd.c
> @@ -706,15 +706,10 @@ mwifiex_cmd_802_11_key_material_v2(struct
> mwifiex_private *priv,
> (priv->wep_key_curr_index & KEY_INDEX_MASK))
> key_info |= KEY_DEFAULT;
> } else {
> - if (mac) {
> - if (is_broadcast_ether_addr(mac))
> - key_info |= KEY_MCAST;
> - else
> - key_info |= KEY_UNICAST |
> - KEY_DEFAULT;
> - } else {
> + if (is_broadcast_ether_addr(mac))
> key_info |= KEY_MCAST;
> - }
> + else
> + key_info |= KEY_UNICAST | KEY_DEFAULT;
> }
> }
> km->key_param_set.key_info = cpu_to_le16(key_info);
> --
> 2.8.1
Looks ok to me.
Acked-by: Amitkumar Karwar <akarwar@marvell.com>
Regards,
Amitkumar
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [1/1] mwifiex: key_material_v2 remove superfluous condition
2016-07-31 12:11 ` [PATCH 1/1] mwifiex: key_material_v2 remove superfluous condition Heinrich Schuchardt
2016-08-01 10:46 ` Amitkumar Karwar
@ 2016-09-03 10:00 ` Kalle Valo
1 sibling, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2016-09-03 10:00 UTC (permalink / raw)
To: Heinrich Schuchardt
Cc: Amitkumar Karwar, Nishant Sarmukadam, linux-wireless, netdev,
linux-kernel, Heinrich Schuchardt
Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
> We are using mac as source address in a memcpy.
> In the lines below we can assume mac is not NULL.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> Acked-by: Amitkumar Karwar <akarwar@marvell.com>
Thanks, 1 patch applied to wireless-drivers-next.git:
b0d80f19c14f mwifiex: key_material_v2 remove superfluous condition
--
Sent by pwcli
https://patchwork.kernel.org/patch/9253367/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-09-03 10:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-31 10:49 [PATCH 1/1] mwifiex: remove superfluous condition (2) Heinrich Schuchardt
2016-07-31 12:03 ` Kalle Valo
2016-07-31 12:11 ` [PATCH 1/1] mwifiex: key_material_v2 remove superfluous condition Heinrich Schuchardt
2016-08-01 10:46 ` Amitkumar Karwar
2016-09-03 10:00 ` [1/1] " Kalle Valo
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).