Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1584039rwb; Fri, 12 Aug 2022 03:35:05 -0700 (PDT) X-Google-Smtp-Source: AA6agR7MlBV8zaNOAad263U8xuKyjJ3mvLE8CyBaJnsudWwETnap1ov+z9v/3wQtsOqospfDrBXl X-Received: by 2002:a05:6402:f02:b0:440:3693:e68d with SMTP id i2-20020a0564020f0200b004403693e68dmr3029999eda.29.1660300505506; Fri, 12 Aug 2022 03:35:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660300505; cv=none; d=google.com; s=arc-20160816; b=gER7VUZ1OtZyuSnFumApBQ9nF/gcNhHRjQ1x2G6gWPptgSEEFzMHxB5FU6d2FVdWg8 jEJGm2FfQflfbyd+6Ea8QjB6KIANgxZPMrrF4z7Pw6okrY3nOz0bUwbfZFU0BbNGpuIb 4IEuISdiUPQpAUOX/TZg5t172TGxjAy+GhhgM3Kih9OaTllgOQnreuHuPjHI5kb5E2vI qxCk2fslO4udcnAKXKHnaqaXbs6YFDKZsxRj7FsUnGdYAi2LqcyQVcWuL6nypl/lrMK7 Kcn2uC+yfw9k0DneDPGs5sAYvXCRMz/QmIEhtNhv0ln6MqG8SZWClAK2JyJKQ96CMO1T DzLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=UxBtbERKRh6ik9gzCjPNzlllpU4KxVBTC6cNbI4+dXA=; b=HvEmPDE5GcFKU5VBxSRow9XABwWpSeMo2PmivoUYQIUvQhhi1mwslXDfLKiVUCPJDJ +Pq7nJfempi8CrTvdt8V60ey+JwcR8zi2EWNIKjNknJ3L6iwuZnDjRpj8TR3j965smm3 Ok4th87o/E/doLdFT3PEl6s8P2duYxKOT4szFBLVpuF1AQmiPK8iXcOEqy4al59ObsUg +iqS1J2ub4IVnh7URzUEcBLdNgFWZEhTn4zkQLSmsfv9BfxUFdM7RnBx2L2wadgg/Lu6 1JT5q8r8BK1rg4SitD+XgFw9iV9ul74beL6UWfRXjr4Mr1ujs5NDyohW5rds7xPUhu0u XU+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=LawWhrTf; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y23-20020a1709064b1700b00733ca35c096si1312725eju.592.2022.08.12.03.34.48; Fri, 12 Aug 2022 03:35:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=LawWhrTf; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238597AbiHLKdp (ORCPT + 65 others); Fri, 12 Aug 2022 06:33:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39018 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238328AbiHLKdo (ORCPT ); Fri, 12 Aug 2022 06:33:44 -0400 Received: from mail-yw1-x1134.google.com (mail-yw1-x1134.google.com [IPv6:2607:f8b0:4864:20::1134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4318AA721D; Fri, 12 Aug 2022 03:33:43 -0700 (PDT) Received: by mail-yw1-x1134.google.com with SMTP id 00721157ae682-31e7ca45091so6010907b3.3; Fri, 12 Aug 2022 03:33:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=UxBtbERKRh6ik9gzCjPNzlllpU4KxVBTC6cNbI4+dXA=; b=LawWhrTfx1q4KHMfhSlSvd/0gmio1DmqKNElQy5yd08bWUdj0hFLVyGRfX8kvjc1Xb 5cDn89Ue5RGBAaSoe6f76D5zoQZxFjIGyUQZLqgB/wdtc8zMPNwIE2AS79QWiC4CK+CP O15bUcPZfzo7q1Dv80ZyxUxl4zbX/iuJUTtAUnYxT67foaDGQ43k1pMjuYp0Y/C7L5QG Bu1fPvdcKkyv6hTb9ti9OM1p0iU1a7hrvJ8YuuJspN+jqwz55rc7UjZmt6YXazYqmCQ+ bGAYjAQmmHc/5IiEd6M0TyrUv54rSiZRkyzdrF9Zwc2O59wpjIyebHvvhAMlZXQBCQeq SQug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=UxBtbERKRh6ik9gzCjPNzlllpU4KxVBTC6cNbI4+dXA=; b=roR15rgo2o/chAYh1Ox+krWzxRdhiJR4sgNHDi4k5iv4j+3G9wF/DI9ewjh/YltAYc 5SnKZArsEwG31OYW2i+tFA+Yw2u6jxDPrsLHmyK0w5XxuztD5HZfkyIXd6ZTpbm2/VuJ S+I2gSzhSpwZ9L5UHNUHyvrttGWVzipsGYUV70yQ9rQWhoU5yj72T3N38WhC5/szwTtl Dr497P8hm+lTjGH074dx+0VXMrrb4t9HMXk/syIW4ziM/y8lXjMcJSwRO8gjNBMNDd67 cQeyb8GvcOI/MzuBa93JR3G8XMUaQgCJkcztiaLjAXuOfoNyCNs8bc9h4W+Ct7l3v8my XQ3Q== X-Gm-Message-State: ACgBeo09+fNbo48WckWt0e4HryjGX3Vr5lEffVlfYyK7EZDFO4Cw3O5r bdBixN09QHA2o9LbzJjsYo9W/EhpcY42H2Vt5hk= X-Received: by 2002:a81:bc8:0:b0:32a:17d3:d189 with SMTP id 191-20020a810bc8000000b0032a17d3d189mr3228899ywl.401.1660300422392; Fri, 12 Aug 2022 03:33:42 -0700 (PDT) MIME-Version: 1.0 References: <20220812094438.18291-1-lukas.bulwahn@gmail.com> <20220812100238.GM3438@kadam> In-Reply-To: <20220812100238.GM3438@kadam> From: Lukas Bulwahn Date: Fri, 12 Aug 2022 12:33:31 +0200 Message-ID: Subject: Re: [PATCH] wifi: mac80211: clean up a needless assignment in ieee80211_sta_activate_link() To: Dan Carpenter Cc: Johannes Berg , linux-wireless , kernel-janitors , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Fri, Aug 12, 2022 at 12:02 PM Dan Carpenter wrote: > > On Fri, Aug 12, 2022 at 11:44:38AM +0200, Lukas Bulwahn wrote: > > Commit 177577dbd223 ("wifi: mac80211: sta_info: fix link_sta insertion") > > makes ieee80211_sta_activate_link() return 0 in the 'hash' label case. > > Hence, setting ret in the !test_sta_flag(...) branch to zero is not needed > > anymore and can be dropped. > > > > Remove a needless assignment. > > > > No functional change. No change in object code. > > > > Signed-off-by: Lukas Bulwahn > > --- > > net/mac80211/sta_info.c | 1 - > > 1 file changed, 1 deletion(-) > > > > diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c > > index cb23da9aff1e..492c7a29d797 100644 > > --- a/net/mac80211/sta_info.c > > +++ b/net/mac80211/sta_info.c > > @@ -2778,7 +2778,6 @@ int ieee80211_sta_activate_link(struct sta_info *sta, unsigned int link_id) > > sta->sta.valid_links = new_links; > > > > if (!test_sta_flag(sta, WLAN_STA_INSERTED)) { > > - ret = 0; > > goto hash; > > } > > Please, remove the {} as well. > Thanks for the pointer, Dan! I need to remember that for the future; I did expect checkpatch to warn me of such a stylistic pattern, but it seems that it does not. So I just need to have an eye on that. Patch v2 sent out: https://lore.kernel.org/lkml/20220812103126.25308-1-lukas.bulwahn@gmail.com/ Lukas