Re: [PATCH 1/1] mwifiex: remove superfluous condition (2)

4 messages, 3 authors, 2016-09-03 · open the first message on its own page

Re: [PATCH 1/1] mwifiex: remove superfluous condition (2)

From: Kalle Valo <hidden>
Date: 2016-07-31 12:04:16

Heinrich Schuchardt [off-list ref] 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 <redacted>
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
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[PATCH 1/1] mwifiex: key_material_v2 remove superfluous condition

From: Heinrich Schuchardt <hidden>
Date: 2016-07-31 12:12:03

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 <redacted>
---
 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

RE: [PATCH 1/1] mwifiex: key_material_v2 remove superfluous condition

From: Amitkumar Karwar <hidden>
Date: 2016-08-01 10:49:52

quoted hunk
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 <redacted>
---
 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 <redacted>

Regards,
Amitkumar

Re: [1/1] mwifiex: key_material_v2 remove superfluous condition

From: Kalle Valo <hidden>
Date: 2016-09-03 10:11:14

Heinrich Schuchardt [off-list ref] 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 <redacted>
Acked-by: Amitkumar Karwar <redacted>
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/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help