From nobody Mon Jun 15 20:34:30 2026 Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) (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 C49943E1CF9 for ; Mon, 13 Apr 2026 15:44:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776095083; cv=none; b=RKdXfEHLjgf1NZEL1VNm5nRalr87+SNE1BOOT3NMDTVIn21moWE/a//xOHPB0We5PaGBA+xfxHvC666uL7F63SQoRgxaoxWl/gcPqFBaE1ul14udn+lq0veUmLLWJWLgyEcXSboJyYRU66+RF7RsWBrtL+SMA7xwO54HzswG4JA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776095083; c=relaxed/simple; bh=7SmlITb/H3wwWjp8+HuEYtoxfyxpgp7tpwx4GDER0Jg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=M1aFPtuLunnT5nN4TIURmehh/zyvRrB3Fjp859e4uXpPXi10P5kc0UyuJEpe0i52E76MBPay8MnEVwqknOPTmk4Xy21RhqU6qE+HEJqyoAYG9HYqagNHmYQYOudh9sm9Jx4NpG5LEQG+dL7hpXhlIMFxSV3TBRIEgnu7rwfB4XU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=crimson.net.eu.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.221.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=crimson.net.eu.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-43d7645adbdso790433f8f.1 for ; Mon, 13 Apr 2026 08:44:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776095078; x=1776699878; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=WN1aFDm/BojS9shT6hlQwnmrEc86mL1/vKIl6OoJGHA=; b=Ln0LWAjAMd6Tfkl8fSTRHdMq8Y3AJV7lsK8I/nCD34ni+VhEeKor5iyAlengsz7K8J 0B1f5XMno67JBnIEhYMJOGmucLcdT8gh+VGQY+cfNm8y2BOOHP/PtqL5rgPZP4JyZrjl WBQ+1PUpuee2PobRSexS1UFdL1O8ApV1uJ4RQOSMU5+d+yGB85dRRvWWkNiREylWrlMj C7aEZiNmlJK+qsPYuu4OQl4yWdRolViguTzbrh9AOQNqh8AYrzzcvah/yUXJtDZkmLLo trY8Rfzi/QDthO6ag9GRGRJvaIIVZJBnF7j9sX5G9HYFqMWpaYU76neZwNiTs5IYBYMC 3K/g== X-Forwarded-Encrypted: i=1; AFNElJ/OG3pG6vA+f5U6RJVEHsnFuIKOYK2apAeee+qprUlxIpbYAL+vWAx6RWpEoMEarAnOEDgYFHyvfpD6TMs=@vger.kernel.org X-Gm-Message-State: AOJu0YznWiyzIQH//WfohPxNOL+f8TsqAfW1vaBRaifpTsXtlc1OoIy/ IO+bt+55OqvUbDHII5rUgfQ3ww0IorDaQVJ9OSgmTps3TUOdjCCyySDO X-Gm-Gg: AeBDieuIvoo4iehXCKkujgncuK2KTw9Vvy6rz1O6bInkZn4pPmxJ5uj95gixB14777e qieW03GblhflIrs8M0I6oRAKWBxItt5ehp9YYrh7KBLDwq5WzkYwiLutxbRbqeF5gl+GhJPPOOf FHrQvKrvI6GbMrbRLupe+3FFTyHJ92wPkVHgaQg1Fh8Sfu7vbIWzTcrO/Lj3tskNNA05x0aQ4hX wI+PakGbFX7pJ2RNnbsewQHiFPXmEAGlEL9gFa+zEi51TJsjJ3DA1JrEQg8+OKZ3badOTggHDX2 LtFD4sAbmKyX275ojbdP/+yrBUIKlXQjHdVwjyj036fdm8spsTaktlDM2KDE4IQgrbYPeSxrgNV 2ZEjrvpNOPIFJYSM5f+tSwQA7pllHo9s2U9WsqEGTRfwWINis8Iq9SRLC5SSZ25f15KxXZIpIEJ w6Zo+Ua5ScuNOZlOp0iheAEQGvhVe8zdsbRB7hiHLYcOkrlTrzjEYZJLQ2/sA3GD7whBWd5CLHW weEoBqX X-Received: by 2002:a05:600c:630d:b0:488:79a3:f04c with SMTP id 5b1f17b1804b1-488d687cfd0mr186378475e9.27.1776095077505; Mon, 13 Apr 2026 08:44:37 -0700 (PDT) Received: from localhost.localdomain ([2a09:bac1:3920:50::27:ae]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-488d5380feesm377928475e9.9.2026.04.13.08.44.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Apr 2026 08:44:37 -0700 (PDT) From: deep@crimson.net.eu.org To: Dan Carpenter Cc: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Kenet Jovan Sokoli Subject: [PATCH v2] staging: rtl8723bs: remove unused struct rtw_regulatory Date: Mon, 13 Apr 2026 17:44:32 +0200 Message-ID: <20260413154433.1366476-1-deep@crimson.net.eu.org> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Kenet Jovan Sokoli The struct rtw_regulatory is never used in the rtl8723bs driver. Functions taking it as a parameter are always passed NULL and perform no logic with it. Remove the dead code and the struct. Suggested by: Dan Carpenter dan.carpenter@linaro.org Signed-off-by: Kenet Jovan Sokoli --- v2: Completely refactored the logic to remove the functions and the struct entirely as suggested by Dan Carpenter. I'm still learning the ropes with Git, so I messed up on how to perform a proper cleanup! --- drivers/staging/rtl8723bs/include/wifi.h | 11 ---------- drivers/staging/rtl8723bs/os_dep/wifi_regd.c | 22 +++++++------------- 2 files changed, 7 insertions(+), 26 deletions(-) diff --git a/drivers/staging/rtl8723bs/include/wifi.h b/drivers/staging/rtl= 8723bs/include/wifi.h index 230b2c4ffd3b..592fa66341b4 100644 --- a/drivers/staging/rtl8723bs/include/wifi.h +++ b/drivers/staging/rtl8723bs/include/wifi.h @@ -450,15 +450,4 @@ struct regd_pair_mapping { u16 reg_2ghz_ctl; }; =20 -struct rtw_regulatory { - char alpha2[2]; - u16 country_code; - u16 max_power_level; - u32 tp_scale; - u16 current_rd; - u16 current_rd_ext; - int16_t power_limit; - struct regd_pair_mapping *regpair; -}; - #endif /* _WIFI_H_ */ diff --git a/drivers/staging/rtl8723bs/os_dep/wifi_regd.c b/drivers/staging= /rtl8723bs/os_dep/wifi_regd.c index f9c4d487badf..3a43d0c8b142 100644 --- a/drivers/staging/rtl8723bs/os_dep/wifi_regd.c +++ b/drivers/staging/rtl8723bs/os_dep/wifi_regd.c @@ -83,27 +83,21 @@ static void _rtw_reg_apply_flags(struct wiphy *wiphy) } =20 static int _rtw_reg_notifier_apply(struct wiphy *wiphy, - struct regulatory_request *request, - struct rtw_regulatory *reg) + struct regulatory_request *request) { /* Hard code flags */ _rtw_reg_apply_flags(wiphy); return 0; } =20 -static const struct ieee80211_regdomain *_rtw_regdomain_select(struct - rtw_regulatory - *reg) +static const struct ieee80211_regdomain *_rtw_regdomain_select(void) { return &rtw_regdom_rd; } =20 -static void _rtw_regd_init_wiphy(struct rtw_regulatory *reg, - struct wiphy *wiphy, +static void _rtw_regd_init_wiphy(struct wiphy *wiphy, void (*reg_notifier)(struct wiphy *wiphy, - struct - regulatory_request * - request)) + struct regulatory_request *request)) { const struct ieee80211_regdomain *regd; =20 @@ -113,7 +107,7 @@ static void _rtw_regd_init_wiphy(struct rtw_regulatory = *reg, wiphy->regulatory_flags &=3D ~REGULATORY_STRICT_REG; wiphy->regulatory_flags &=3D ~REGULATORY_DISABLE_BEACON_HINTS; =20 - regd =3D _rtw_regdomain_select(reg); + regd =3D _rtw_regdomain_select(); wiphy_apply_custom_regulatory(wiphy, regd); =20 /* Hard code flags */ @@ -124,12 +118,10 @@ void rtw_regd_init(struct wiphy *wiphy, void (*reg_notifier)(struct wiphy *wiphy, struct regulatory_request *request)) { - _rtw_regd_init_wiphy(NULL, wiphy, reg_notifier); + _rtw_regd_init_wiphy(wiphy, reg_notifier); } =20 void rtw_reg_notifier(struct wiphy *wiphy, struct regulatory_request *requ= est) { - struct rtw_regulatory *reg =3D NULL; - - _rtw_reg_notifier_apply(wiphy, request, reg); + _rtw_reg_notifier_apply(wiphy, request); } --=20 2.43.0