From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com [209.85.208.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7CFFE481252 for ; Wed, 15 Jul 2026 12:50:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784119844; cv=none; b=GG17zdokNxMl6o6xLS7kT/C0fU61ANAUeWToGiFjntiJCdjdy2aegfF+3ATfb11iy+9gYQpujWishi9wqIZPgKVWvQXUXrSrOGDSu3jBCBvyzNUBhn5LA5emHlPsFeSn3Qeb+V/AMcAhYwcesU3RJII3O7BGZVz7rmsroy7QJlY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784119844; c=relaxed/simple; bh=2Dgf8HyAsawosrrXRnK2QIVNgW2NN2lADqyUxbdOPos=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Z4eTzw81WbxycLoKZUGPf51hlGgquyaYSrLZpEs1jwGpisfSj+6YzT8ycniDqt3Z83Qv7laWs59ORbN5YO2gAT+05yTx2wLqMGLoYlZGOD4sdw9uJEHNW2ud8wb5EJSOj9RmrI/qY7reFAQvYqKq+gGaSeHG4X/GkGXSxH63BsY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=gnFWJe8h; arc=none smtp.client-ip=209.85.208.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gnFWJe8h" Received: by mail-lj1-f180.google.com with SMTP id 38308e7fff4ca-39669bcaadfso21142511fa.0 for ; Wed, 15 Jul 2026 05:50:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1784119837; x=1784724637; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=nMEuJlfO+SP8MWqJmA/pbwlftlH0vhRr0hh+YpswdiI=; b=gnFWJe8h/JJW+1veK3+HAZjMIoLHZc40lB+JanpOVRPFrkMeHUDJHC+wvdkGhrp52W p1sncUmnBDUrdTNN4LyOrZgKb4I3JYkcsOQ6iX+OzguSDDRjf4uKO0nYB4YQTq1YrbHF knBsRIsXG+oQmKHDNUPvMu+jvX6DnWSO/Cp18Ro+1TkBSzmFdveSsEfmQQt+gyzpVqXv iyPcd9qeHz7+IDRsdSIl4OcwQLBvZvAsK+uDGTNw7XNiG4rllN4x+kOlpMugcQkAwfrr 4kBEvFbdwFU0UFI8iOWzU9ylQPwl5vN+ePIjH64BZxJTYROSbMfTXMNg/0drRLRs5E+h NSsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784119837; x=1784724637; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=nMEuJlfO+SP8MWqJmA/pbwlftlH0vhRr0hh+YpswdiI=; b=KawD9opv9ByXkbFf3TK1EGBp6eZr0dX5Pe5hRON+tDrpkJPL9cU2KgRNBYjA7jwCFg JDXLOjQH2JeVHXVpLc6mwUyfWtsfE7OAKPGWwXeSlUETd/foXyAhvKZVhZ2t1ViBw1Fa 42cOJLruTRcdoYBERVXHT8Udcmr08M2/e4zICxTeoIjK5VpBQxU+L/n7FBSoZjp3k1Wt DaOmVxHSv1UTfnJ6NnN0wo+l0/xeyvAXkXE1jUnS/AAohTSXGPvJsh8rdXpVLgznxZK9 Utiq2unnlT06pCtbhsLin1hP+TbX7LKjX8eAQZk1ZJuOS3izaqpHgFuzORAtOCRM8bqt ZwjA== X-Forwarded-Encrypted: i=1; AHgh+RotVCjBGR3+VMrNx5JTzsqiqISCPKq8d017zKI6YgcwpczpFH2OEyNtEMfguG+sZaznN7Dr4Vwcy3c2cBk=@vger.kernel.org X-Gm-Message-State: AOJu0YymsFgVTdlyQ7k+aCrqkzIQlfCGG1H64yP1mBoqi7VSWJdO7H6t 0MyQoHM0tS8PB4rtgSdq4nfTT17YRgZThRZhFi0d2GX+k7NB0mg0ymco X-Gm-Gg: AfdE7cmrCDj05p1fo57VkGfgifBen0qqvO673HsRnvl5wXiyFfaZT7dRuQOL+bEViV4 aRkKwZK5YNxsj+0rdjyWS05snyuudQEqAZphHmUzckeNCvsJYDe8Hncdc6GMZkYvn0eJrPnrv64 +JU/KoKdi9GIUtfxEsW0TLmWu3h+eO6WtBJzST2z9gEjtPKaSNDv4z4oNxu5jhMds/jBxU/W+87 QnbWAd9Zl4+UJZCrDEQ7PBFmEX2rJJ1lU610/SW7bFtLy+l2wuaJj2Z2Mf84oDR2igtZ8D2frkw t4VbPMZ+OlK2mWX7hqHdmLrvMmld7fTKhy+r49WTaFlvcfpELZMOYUOWMtUXION79Ybc+h4J1+X rBP9YGYvVpgqZR64wHny4VJ7Uj+FS7x1A9H2RRa39F9gyRonAN4ALwVRP3mdiEukEfz455eAwQG mIQ+6hlUPfSkVseJBsXOWTGDF11BxXemhlaBcaIDKTLMYlzP9XZ36JmPuyYcZwXLsAUdCH9qCOl AIvCLuw0TJyjP470vOyFHsR X-Received: by 2002:a05:6512:3409:b0:5b1:5ec2:45b3 with SMTP id 2adb3069b0e04-5b15ec24699mr502501e87.59.1784119836882; Wed, 15 Jul 2026 05:50:36 -0700 (PDT) Received: from archlinux ([94.180.44.28]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5b022fac999sm3404042e87.55.2026.07.15.05.50.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jul 2026 05:50:36 -0700 (PDT) From: Arsenii Pashchenko To: Greg Kroah-Hartman Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, ulijg308@gmail.com Subject: [PATCH 27/61] staging: rtl8723bs: replace rtw_set_oper_bw with direct assignment Date: Wed, 15 Jul 2026 19:47:55 +0700 Message-ID: <20260715124829.90290-28-ulijg308@gmail.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260715124829.90290-1-ulijg308@gmail.com> References: <20260715124829.90290-1-ulijg308@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Remove the redundant rtw_set_oper_bw() wrapper function from rtw_wlan_util.c and replace its call sites with direct structure member assignments. The helper provides no extra logic, locking, or validation, acting solely as a setter for adapter_to_dvobj(adapter)->oper_bwmode. Removing it reduces unnecessary abstraction layers and simplifies the driver interface. Clean up the function definition, remove its prototype from the header file, and update all invocations across the driver. Signed-off-by: Arsenii Pashchenko --- drivers/staging/rtl8723bs/core/rtw_wlan_util.c | 14 ++------------ drivers/staging/rtl8723bs/include/rtw_mlme_ext.h | 2 -- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c index f610fa5b3..053861f29 100644 --- a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c +++ b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c @@ -260,16 +260,6 @@ inline void rtw_set_oper_ch(struct adapter *adapter, u8 ch) dvobj->oper_channel = ch; } -inline void rtw_set_oper_bw(struct adapter *adapter, u8 bw) -{ - adapter_to_dvobj(adapter)->oper_bwmode = bw; -} - -inline void rtw_set_oper_choffset(struct adapter *adapter, u8 offset) -{ - adapter_to_dvobj(adapter)->oper_ch_offset = offset; -} - u8 rtw_get_center_ch(u8 channel, u8 chnl_bw, u8 chnl_offset) { u8 center_ch = channel; @@ -317,8 +307,8 @@ void set_channel_bwmode(struct adapter *padapter, unsigned char channel, unsigne /* saved channel/bw info */ rtw_set_oper_ch(padapter, channel); - rtw_set_oper_bw(padapter, bwmode); - rtw_set_oper_choffset(padapter, channel_offset); + adapter_to_dvobj(padapter)->oper_bwmode = bwmode; + adapter_to_dvobj(padapter)->oper_ch_offset = channel_offset; rtw_hal_set_chnl_bw(padapter, center_ch, bwmode, channel_offset, chnl_offset80); /* set center channel */ diff --git a/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h b/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h index ae4c4586f..4b05779f2 100644 --- a/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h +++ b/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h @@ -439,8 +439,6 @@ void Switch_DM_Func(struct adapter *padapter, u32 mode, u8 enable); void set_msr(struct adapter *padapter, u8 type); void rtw_set_oper_ch(struct adapter *adapter, u8 ch); -void rtw_set_oper_bw(struct adapter *adapter, u8 bw); -void rtw_set_oper_choffset(struct adapter *adapter, u8 offset); u8 rtw_get_center_ch(u8 channel, u8 chnl_bw, u8 chnl_offset); unsigned long rtw_get_on_cur_ch_time(struct adapter *adapter); -- 2.55.0