Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2148980lqb; Mon, 27 May 2024 09:18:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVcrzOQVG2njPhGWx43P37A+65Wizt/hQMpgwcCKHefiabS57w2nzMsFGYSRSSIKwlrPYj3SdYgXYYvlrWIZtJRCXcHV9r3OZgEQFD2CA== X-Google-Smtp-Source: AGHT+IHAf44Axo1kqiCyT8thjHvgIPZA1ECcAcJeAyFo0A+7ICEmd3jEKqeJcgkoYf54MdKUZSpc X-Received: by 2002:ac2:561c:0:b0:523:88aa:237 with SMTP id 2adb3069b0e04-52964caab7cmr5707878e87.33.1716826691700; Mon, 27 May 2024 09:18:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716826691; cv=pass; d=google.com; s=arc-20160816; b=qy7oinWtzXgj42NL8HN0GX1E1uhqAOxIHSx7oeFw5+X5OJhTE89mJKb5oDdn7SbfBU 3l7j9iMx49BLJ2lX8trRQ+h5oYJ4Vaa0SKVfYrqXghzrcAv/MjW0WbE3UdM0Q6zbQSMH /2Ov+ZNKEkuWOZ0F5M7D/b4SsWywm4noWzHx8XEf9IAODZwJWXFoDXIsR0wmJJrNX/c1 Wx+NJ58vCIyO2caLo0t0IuNCvXu117ceMCePGnHv+ax9zhHH/7xswmP6S7rgWjz+mGXt 6ap4D5m8ZIEWEUFRT71qEGWefZ+fPT+fnL35LV3fQ7QR2r76NloIk6TWZ1hBc7QiLr69 lM7w== 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=+itUDGZB7PRnuBr1z6wrLgEDWxffprxZddPOyE+iKsE=; fh=TquNsOiV+zNY1csTpltVB6A9QFW5SbuNs6JlqcKCQkw=; b=ro97LLb3R+cFSx6K+uLctVA9CxMBO0djBIn3yRk677Qz376X2+ivKsl094HFJNu3nR USWOJdCqJEextRcqvM2BE06ZQ8ZujpR9GHCZYcwKcEaXkNw4eGXLHp5XCulH8itQVpCx XEmgpqTImffpp3LgjKwFSVLSnnwJvPJf5YexcqqKc/M1Xau1QPD7PTSRaalAJIBhg93k m9KTN/ONbUOqe163mhDDzZC/YrBhTjkPKAfKMyO4248RMK84sleeFCGTeP6RjkGGmmjW tSj6fDziFMd4e+ew3VGyk3yGNmCxL60g0+1+ctezfIyhGe7EFvDkpxOxIYnhM2GURkAm SCyw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=XvhfOLJK; 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-8130-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8130-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a626c801849si395733266b.72.2024.05.27.09.18.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 09:18:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-8130-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=XvhfOLJK; 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-8130-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8130-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 6B8051F2135C for ; Mon, 27 May 2024 16:18:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A4B2116ABEB; Mon, 27 May 2024 16:06:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="XvhfOLJK" X-Original-To: linux-wireless@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.19]) (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 3295616A399 for ; Mon, 27 May 2024 16:06:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.19 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716826008; cv=none; b=h7A25UKj2RR8KbSg6YtOB9yMVmXI/v5/BeMDJwIF4jaRcjGULL/nUQMAF597uTWMwsluVNHDIlqkLc7pOmOFDrpOXicSvevCRIyOLeXHD9WxFT/CWF35HjfebySbxtuf4hdT/X9upzYAOhYL6P4aLKAFgJFLPfFZlJb6HLc8s94= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716826008; c=relaxed/simple; bh=znVBTYtF+pt5O46QjnYGcwyoV78Uaec6desSDNbVHdg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=u1rAetOnl8mRA4buZlFbp3Dk+9+7iOqQRqgJhSZD96zOjJuz1/JBZILQe+2pu6HyhBDeU8GMkD1EKiZ1U3cT87yR4Aox/Hw5gT94u45zuMQNoc62tpNhMkj4KlhWN1WzNzoNhzZzfhx4+8ozPATNyTbKKedYnegvmLkLhrdEznA= 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=XvhfOLJK; arc=none smtp.client-ip=198.175.65.19 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=1716826008; x=1748362008; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=znVBTYtF+pt5O46QjnYGcwyoV78Uaec6desSDNbVHdg=; b=XvhfOLJKYgn0qv0L1zanDI2RbrYVbe2ndgVBFV8YsPjQB+rtlxCd1Hh0 QNyESl4U+5ZeWTUAG88x+DNvRy/qt8q/dA3oSH3mn6y95HNRqJyXzrG0g p0gIV7Ps+1q0ybbL90ijv2eJSsYIzMU8kFTIZaQW0BIWwbbOvA54qntpv ER3gcfzYwtlk31I6MZjVH8aU+AmE9FkX6MSpR0SWleD9zG/eJn7ON4NQX LlKzotCw4z/96gkLSfuzacpdavrIQ8nwG09yqve68nrZce1sXDkXjN/2a zLXUuNuItmNJ/Xvo9uSinXRALe6USiqlsAO8n/btGMWifOKDLHdrWGoDB Q==; X-CSE-ConnectionGUID: D5Ejhbp9RUyp7X0OZn850A== X-CSE-MsgGUID: K9QFlmSTRFygLvCufUal+w== X-IronPort-AV: E=McAfee;i="6600,9927,11085"; a="13002115" X-IronPort-AV: E=Sophos;i="6.08,193,1712646000"; d="scan'208";a="13002115" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2024 09:06:47 -0700 X-CSE-ConnectionGUID: sMZ1sT5YSbKR+9K8TiQS5g== X-CSE-MsgGUID: HaOHgFKsTguHOyy0AIQW3Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,193,1712646000"; d="scan'208";a="35407128" Received: from weis0040.iil.intel.com ([10.12.217.108]) by orviesa007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2024 09:06:46 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg Subject: [PATCH 16/20] wifi: iwlwifi: mvm: declare band variable in the scope Date: Mon, 27 May 2024 19:06:11 +0300 Message-Id: <20240527190228.b634d184980a.I9d9e71125f9a77ba4f9a33a7a2ff1e8e78e17767@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240527160615.1549563-1-miriam.rachel.korenblit@intel.com> References: <20240527160615.1549563-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 band is not used outside of the for loop, declare it inside it. Signed-off-by: Miri Korenblit Reviewed-by: Johannes Berg --- drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c index 5132964661c8..712dabb30acc 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c @@ -1730,7 +1730,6 @@ iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg, const u16 *nvm_chan; struct ieee80211_regdomain *regd, *copy_rd; struct ieee80211_reg_rule *rule; - enum nl80211_band band; int center_freq, prev_center_freq = 0; int valid_rules = 0; bool new_rule; @@ -1774,8 +1773,10 @@ iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg, reg_capa = iwl_get_reg_capa(cap, resp_ver); for (ch_idx = 0; ch_idx < num_of_ch; ch_idx++) { + enum nl80211_band band = + iwl_nl80211_band_from_channel_idx(ch_idx); + ch_flags = (u16)__le32_to_cpup(channels + ch_idx); - band = iwl_nl80211_band_from_channel_idx(ch_idx); center_freq = ieee80211_channel_to_frequency(nvm_chan[ch_idx], band); new_rule = false; -- 2.34.1