Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp210813lqr; Wed, 5 Jun 2024 03:58:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU7BRmFtHggu7+WkuAR52cWEyDXNh2Yjq2kLMJqaFDdwBRp6mjAwiaVj72KNUCT2tH5JrdBNVWsdXQJZIs1qKj5mgH+zLGiJFp20xGXdA== X-Google-Smtp-Source: AGHT+IGc65M4zL6Gh8FF0Tq3StgfGjR6k1U5Cj4g1Ex43dMd2RSDtLKliHg0i3p77qVPILKO32Kz X-Received: by 2002:a05:6122:2511:b0:4eb:eb8:a8ee with SMTP id 71dfb90a1353d-4eb3a405e7dmr3138044e0c.6.1717585121986; Wed, 05 Jun 2024 03:58:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717585121; cv=pass; d=google.com; s=arc-20160816; b=QsGwKnVOoQpgW7PK6WMGNf+CrvuB2XUVUTohvWQTlKdhSdC/iGmL3i+rNT+4ayT0RJ BuDO6F/yh+xZ/1j4MOlbr+xZ2PMvwRv8QlWgbNQVhxvncI4l+GP/r1qmbhS80YflPMkX 2y5q0f2qH/1r+Vs7JDdfqJOmcNqE1oB09ytuMpKG50UCVziQYexV7L5zuiLOUzt11dQ0 val+Ntmn1F7fD3+1phRtzFZgOKfoEEy+da6H9UGpU7ps/vB83SXRnOlmpxKmd9Xhg/aM DXKzeApINqbI57I2J2LI0bzSyc+4vFdNlwnBFvldFheTCvuqlKhKVNcKeAmyyVlT6ytU KXaw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:organization:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=JTyOxR9bnpsib7M1nMwX0PJ6R02cVlvc0I6avo9DSak=; fh=TquNsOiV+zNY1csTpltVB6A9QFW5SbuNs6JlqcKCQkw=; b=dSSynLhUj1FUJ3OjanN1NAeXRh/RGDR+Cq70ufgWxqJQCP7bA3Bhj1hteL+3fMyUZH 1azMwa6LjZK/pay6FQekjGvKDSq+Y0ytqLu51v/AfUmhCW3OUspOwFYnQQTqySE/GA6N EYPqtBq610KuUG4GEoO9h+7bGEguEUjkoiRiZ1uRm0kiE/66VifGQ37L2e9XUr49Hjmp i5XZVe7rsmnZuLOsutT03VM/BpD/REnVnhhR7CYxv99MEHuukFNv04OPVlRjpOqKUsoi Dlm7GH3K9qqppTd+k16afwTTpoa1FpiZqsJoIrOGMHWyeFhoG/nvWUhbmRWy7IoRLHXp bPYg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=BEHiHXdo; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-wireless+bounces-8531-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8531-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id af79cd13be357-794f2f17527si44481385a.197.2024.06.05.03.58.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 03:58:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-8531-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=BEHiHXdo; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-wireless+bounces-8531-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8531-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 6FA331C23E7C for ; Wed, 5 Jun 2024 10:58:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8D1B4192B6D; Wed, 5 Jun 2024 10:57:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="BEHiHXdo" X-Original-To: linux-wireless@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 056F71922E7 for ; Wed, 5 Jun 2024 10:57:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717585056; cv=none; b=BFoM7uj9uwP8DNKhhuAsgShaqjGFT+TNVLMcTj3zaxt4bVC8VftwXl7NCLzyAlxcnfi9hil93SXGMFXTq0ozQFX5XSG0iWqXtWFVakvi37ZqxLEhMmdFmmMVsvic2Zuqh6T727G+Zl8QQNxDr5WIC53X/UzAHIU/PhvW93ksY2A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717585056; c=relaxed/simple; bh=KM/m/ZCX4S9OiNRm4UNazr5uMdahk3wtZUHrJlE7pBk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=SOUtWM5BQX8LB4BDBKpDnHhiPEnH4zS7ityXkrOCOaC0D4I31xzKrWFziioKCZU1HRky4urJkJc40uGQ//Y9covsm5saedlhpOJ2mEvc/ruywXa6JJFhiAYU9HEsoZE3SULGcibh1AXIMbVD5g+4U1bDJXH8gc4LhuweQZf+LTI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=BEHiHXdo; arc=none smtp.client-ip=192.198.163.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717585055; x=1749121055; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=KM/m/ZCX4S9OiNRm4UNazr5uMdahk3wtZUHrJlE7pBk=; b=BEHiHXdocePOUdwRLONmB3D9N5mWJ2rUOtB9OykRBRUHn2NJakK67WuA 3S5oX0LIQwhnbVeU1fggRXFvfNypynEOTV1fQtzMRR243hw9rcyQtDEmx EQBb7sihji1oFnGb03d5l5oOR/9AY2xFwt7bKAxrsP55dDUnPCsjZFXrd xLsxjCZNTUVArc2k5Yc0WiO0Ehs3XmCgIkrBLMdmOE9N9Jufkka9laVJv CHFSo4opC9Gu0U8CzH3iomW8ss+cVTDp7meNQpErkQjKdZutcj7VttGIn vLagdqF36uOK9T7oyX5QUr0AcOCbcb4LG7SR3uzvf5nE2WqxFFqhXtB29 A==; X-CSE-ConnectionGUID: +kUdUa8EQZ+NQmKZ+CXRww== X-CSE-MsgGUID: vL1/98PXSd+lAQj3V6eRkg== X-IronPort-AV: E=McAfee;i="6600,9927,11093"; a="11919955" X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="11919955" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by fmvoesa110.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:57:35 -0700 X-CSE-ConnectionGUID: Wtw81o55R0Sz2wJYvlbErg== X-CSE-MsgGUID: 6chxHtBPTr2c4cXvVnPEmQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="37563016" Received: from weis0040.iil.intel.com ([10.12.217.108]) by fmviesa008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:57:34 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg Subject: [PATCH 4/7] wifi: mac80211: clean up 'ret' in sta_link_apply_parameters() Date: Wed, 5 Jun 2024 13:57:19 +0300 Message-Id: <20240605135233.eb7a24632d98.I72d7fe1da89d4b89bcfd0f5fb9057e3e69355cfe@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240605105722.2034610-1-miriam.rachel.korenblit@intel.com> References: <20240605105722.2034610-1-miriam.rachel.korenblit@intel.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organization: Intel Israel (74) Limited Content-Transfer-Encoding: 8bit From: Johannes Berg There's no need to have the always-zero ret variable in the function scope, move it into the inner scope only. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit --- net/mac80211/cfg.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 54b03a86f71e..890590146fa4 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -1825,7 +1825,6 @@ static int sta_link_apply_parameters(struct ieee80211_local *local, enum sta_link_apply_mode mode, struct link_station_parameters *params) { - int ret = 0; struct ieee80211_supported_band *sband; struct ieee80211_sub_if_data *sdata = sta->sdata; u32 link_id = params->link_id < 0 ? 0 : params->link_id; @@ -1876,6 +1875,8 @@ static int sta_link_apply_parameters(struct ieee80211_local *local, } if (params->txpwr_set) { + int ret; + link_sta->pub->txpwr.type = params->txpwr.type; if (params->txpwr.type == NL80211_TX_POWER_LIMITED) link_sta->pub->txpwr.power = params->txpwr.power; @@ -1928,7 +1929,7 @@ static int sta_link_apply_parameters(struct ieee80211_local *local, ieee80211_sta_init_nss(link_sta); - return ret; + return 0; } static int sta_apply_parameters(struct ieee80211_local *local, -- 2.34.1