diff mbox

[v2,07/10] nl80211: Avoid multiple assignments on same line

Message ID 637c25b980379d1a98d7c57cc247d49ef295cbc5.1464576022.git.kirtika.ruchandani@gmail.com (mailing list archive)
State Rejected
Delegated to: Johannes Berg
Headers show

Commit Message

Kirtika Ruchandani May 30, 2016, 2:53 a.m. UTC
This patch fixes the checkpatch.pl warning "multiple assignments
should be avoided."

Signed-off-by: Kirtika Ruchandani <kirtika.ruchandani@gmail.com>
---
 net/wireless/nl80211.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--
2.8.0.rc3.226.g39d4020

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Julian Calaby May 30, 2016, 5:30 a.m. UTC | #1
Hi All,

On Mon, May 30, 2016 at 12:53 PM, Kirtika Ruchandani
<kirtika.ruchandani@gmail.com> wrote:
> This patch fixes the checkpatch.pl warning "multiple assignments
> should be avoided."
>
> Signed-off-by: Kirtika Ruchandani <kirtika.ruchandani@gmail.com>

I'm not sure I agree with checkpatch here, but this looks right to me.

Reviewed-by: Julian Calaby <julian.calaby@gmail.com>

Thanks,

Julian Calaby


> ---
>  net/wireless/nl80211.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
> index ad7cdce..6f8e2a7 100644
> --- a/net/wireless/nl80211.c
> +++ b/net/wireless/nl80211.c
> @@ -2603,7 +2603,8 @@ static int nl80211_set_interface(struct sk_buff *skb, struct genl_info *info)
>
>         memset(&params, 0, sizeof(params));
>
> -       otype = ntype = dev->ieee80211_ptr->iftype;
> +       otype = dev->ieee80211_ptr->iftype;
> +       ntype = dev->ieee80211_ptr->iftype;
>
>         if (info->attrs[NL80211_ATTR_IFTYPE]) {
>                 ntype = nla_get_u32(info->attrs[NL80211_ATTR_IFTYPE]);
> --
> 2.8.0.rc3.226.g39d4020
>
diff mbox

Patch

diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index ad7cdce..6f8e2a7 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -2603,7 +2603,8 @@  static int nl80211_set_interface(struct sk_buff *skb, struct genl_info *info)

 	memset(&params, 0, sizeof(params));

-	otype = ntype = dev->ieee80211_ptr->iftype;
+	otype = dev->ieee80211_ptr->iftype;
+	ntype = dev->ieee80211_ptr->iftype;

 	if (info->attrs[NL80211_ATTR_IFTYPE]) {
 		ntype = nla_get_u32(info->attrs[NL80211_ATTR_IFTYPE]);