From nobody Mon Jun 15 20:35:03 2026 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (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 4F977390C92 for ; Tue, 14 Apr 2026 08:14:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776154446; cv=none; b=JSzcwhV6OY4+q6zhS/GW4VXsguEqsyKDPjF0pgGCRn43sGJKFbdgpYYvHbAD/JAZy3piKjusaC0FaC98u+mbLhFFW9POYGNKf5xl7nptC3ZxdfBDbkSO95868aYl3/aHx4NbbNalCU3ZLb3zdyknMxmw9yMAjlSeEPqmIRSUSeE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776154446; c=relaxed/simple; bh=9NB9HpCZfmReuMYP/Y0q5CEUae/aAMgFOQAOeaSoRQ4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=NBceIx9KJinGtoGJZv+921GRFX90rapHfKzqpmvievWDk8n3NOTBxoqa95LBrmATRARBs99rXt5Oe8Zvi7hhAZKhf5w8Ks8k6qmRmephHWVafxXBULLDwQewba85a1ztmOvUr288ZxcgNIJm71b3o9xn/V17/g/OTvYpg5C1CCk= 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.128.53 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-wm1-f53.google.com with SMTP id 5b1f17b1804b1-4888375f735so51600665e9.3 for ; Tue, 14 Apr 2026 01:14:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776154442; x=1776759242; 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=M57UvzsyA8JO5Dg8/Uas36rcEuuBBfC/SWXx5zYE4s8=; b=bpdP5rvwSeoyHKTLQTgjnONSPQGHARnqFSpkaHjOM60G0wup40P3YLbD6HKKF6cL/W opjprTl4iRhWmVWlU1lmCQqIj7knmbIax/IrjUmh3Rp2zHb6nrqzLXbaPCJI2/esJnmd ii4caabzFrw2gy5JNC8wRqRGszyJhN0g7miNRB4XeN/p+V7HdwvfI5yQqawXNTyMku8p XGu0XC2Cm8531rRpO/rylAM0mJYt1LAe7I6RHx1DdQDTdofd31cGk58Vtg7MMythQi+s FGgoJjkbsGM50v+j9L3i2nF3QQcTggnJ/2pkt57quazVrrF1FPvZ3v/5uXd9FmLDhc5N CkBw== X-Forwarded-Encrypted: i=1; AFNElJ+rA/cS5BSePIBtgtSvhvzklFMbk6Gtf4prdmRhNTIuuaTj5kZXf86cUD1mTGrHvfjVCQUUwQDLRdIOi5E=@vger.kernel.org X-Gm-Message-State: AOJu0Yxz9qCXBwEO2i1JvJzzj+qAydOZ7qP5DjalSUhcVuLFxDjb23PC 8BZzAgKYNHmObxq7nnalI3sbiz5l3IMu+GggheXqWavoRLHtdEemWUB4E8J+BMN4 X-Gm-Gg: AeBDieuSxNrAd1Ti1KQZzwA2prUmXwVz3q4A1OvFFvdni4N+rfQ0pr+WH7m2+ATkaCs 38RzOYI2ssc3iPpLDkkbZvjLICl3X53Kbsoto03oPSiPxLYhcI9yxvrZrQ+Zfd+7RaXMEeXXOjG XqFRmCVNO4kO5q94CdMedzvh0BzUtDJ+g7iLj/v0qU7H4LtSTchYk4Oxlwvm6/42NzK6wQD+MDD 6UJWdCfltFcJOspt9upk+B3k9elfVf3Lup/gHOEmBE2jx7fLOAgIgKde2vFXNC6dO8vU6mXr+nJ pgei1XOskkZNsFRcolQmyFxY56oORhe9jGqJCsz3ja9ylneUawbKQ+n59qLypS0/AV6QWnkorIa fGHVJxYnuQHgqpyXDPYVzT4yvR75L9fzPw8YIy74kgeCJP+WP9OI1aCGhQFpqbNbylcF6NM9FEl XzMlNjw5kyGYxqiewTSJuprGlu9nEvv/9w6f+6AmbeBUTKVZmZaTo0xmBUffHNa8uQ4lK2gv18J s1uchY1lTHN3ly1I5icmQHCNKcOUqO+/Vx+lPFPzNATakhQpj3DXk4rFbcT12X2KJbyud4= X-Received: by 2002:a05:600c:6994:b0:485:3eba:ab96 with SMTP id 5b1f17b1804b1-488d67bbcbamr228618795e9.3.1776154441498; Tue, 14 Apr 2026 01:14:01 -0700 (PDT) Received: from localhost.localdomain (host-79-18-131-221.retail.telecomitalia.it. [79.18.131.221]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-488ede1e826sm69040145e9.6.2026.04.14.01.14.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Apr 2026 01:14:01 -0700 (PDT) From: deep@crimson.net.eu.org To: error27@gmail.com Cc: gregkh@linuxfoundation.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Kenet Jovan Sokoli Subject: [PATCH v3] staging: rtl8723bs: remove unused struct rtw_regulatory Date: Tue, 14 Apr 2026 10:13:25 +0200 Message-ID: <20260414081325.142313-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 Signed-off-by: Kenet Jovan Sokoli Reviewed-by: Dan Carpenter --- v3: Rewrote the whitespace as it was, my bad for changing it to begin with. v2: Completely refactored the logic to remove the functions and the struct entirely as suggested by Dan Carpenter. I am 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 | 18 ++++++------------ 2 files changed, 6 insertions(+), 23 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..c48a1e3ba4ac 100644 --- a/drivers/staging/rtl8723bs/os_dep/wifi_regd.c +++ b/drivers/staging/rtl8723bs/os_dep/wifi_regd.c @@ -83,23 +83,19 @@ 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 * @@ -113,7 +109,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 +120,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