Received: by 2002:a05:7412:8d09:b0:fa:4c10:6cad with SMTP id bj9csp305931rdb; Tue, 16 Jan 2024 00:10:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IFbeWdfw5TD8ChZOXvuAuk5VBWL5jyF83uq5ChiAItlvO4aCLaK0pi84gYEJFjKrNeyPIsc X-Received: by 2002:a05:6871:8804:b0:203:521f:7611 with SMTP id te4-20020a056871880400b00203521f7611mr9115660oab.4.1705392629988; Tue, 16 Jan 2024 00:10:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705392629; cv=none; d=google.com; s=arc-20160816; b=uc741aHBTf4u0UvbO3R4htuJd2xOZNy0IxjGoDZ9fDWjGp7mdwqzCPETBdFam7ciIh PYoQxn9G9OJ3nKbm8sYfx/Ijo48b6lhlIIvkdauMZ0c+F0B4O+yFQ5tJtcwdkWNBKhOl 7DLNzirgSMGM+Wo0gnkChwGro4AbWlNZvH9olVxGlFh7iuiyOWS2yMLBPKGlx+p/KXAt bOMBXbwL8f8Q2+O3GFF1ldpvE9Gg7lRwmfTx8EzG2jwhNnCIyvo2dq+xWCOhqIKL5j+H RUhb1xcdpCfSgXf3ci3uJuT/4GfTOF4Y0vrHOC4PmgtnTgeOcp0AvYW29m/u3qCWPuYU tpxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=UrRBF4OGmmkxLdn/9pJrhbxDRCvtU+9pibJzjVboEHA=; fh=OVxh8nViFWTZqSloH3WBCtDei5kG8LquIN4j94zrvAA=; b=vrAr3vvT/cyKlug+XKHvzqVLP+yke2KKxv9nwsbe0xGpDPbKQM5eA5Nlc73FzfFxSn sWtpbSW6h3NR6cRbgmdMb9tIfMsYaJp7ju8y1Y9kXB/8dGWHtV56Pns8fKzlJnkF0ubk S92Yy+JUgECzsuuhMAL2PlLfHHZTSM3gWk/7LVb6jIAL3mvmf2sS5DmEadHwB2JtEIdq 1oiL3DNHQ78l9wlDncD/aMi2y5N97ohEDxbVZvXIRPJTEaO2Em58Y1v897iML9k6s2oZ 3w3LpRqNJOLdYfr7P/yxQ5dLcUUEQSDO2yVHTdGhlKjuYBORYczGS1pVdyKs13PjmEOx rIKg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless+bounces-1964-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-1964-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id e4-20020a656884000000b005cd85f59928si10466056pgt.339.2024.01.16.00.10.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jan 2024 00:10:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-1964-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless+bounces-1964-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-1964-linux.lists.archive=gmail.com@vger.kernel.org" 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 53B0C28249A for ; Tue, 16 Jan 2024 08:10:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 89D3011C8B; Tue, 16 Jan 2024 08:10:26 +0000 (UTC) X-Original-To: linux-wireless@vger.kernel.org Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) (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 C96A911C83 for ; Tue, 16 Jan 2024 08:10:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=realtek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=realtek.com X-SpamFilter-By: ArmorX SpamTrap 5.78 with qID 40G8A8420147641, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36506.realtek.com.tw[172.21.6.27]) by rtits2.realtek.com.tw (8.15.2/2.95/5.92) with ESMTPS id 40G8A8420147641 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 16 Jan 2024 16:10:08 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXH36506.realtek.com.tw (172.21.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.17; Tue, 16 Jan 2024 16:10:08 +0800 Received: from [127.0.1.1] (172.21.69.94) by RTEXMBS04.realtek.com.tw (172.21.6.97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Tue, 16 Jan 2024 16:10:08 +0800 From: Ping-Ke Shih To: , CC: , , Subject: [PATCH 2/2] wifi: rtl8xxxu: make instances of iface limit and combination to be static const Date: Tue, 16 Jan 2024 16:09:45 +0800 Message-ID: <20240116080945.20172-2-pkshih@realtek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240116080945.20172-1-pkshih@realtek.com> References: <20240116080945.20172-1-pkshih@realtek.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: RTEXMBS02.realtek.com.tw (172.21.6.95) To RTEXMBS04.realtek.com.tw (172.21.6.97) rtl8xxxu_limits and rtl8xxxu_combinations can be static const, so add modifiers as desire. Otherwise, Sparse reports warnings rtl8xxxu_core.c:7677:30: warning: symbol 'rtl8xxxu_limits' was not declared. Should it be static? rtl8xxxu_core.c:7682:36: warning: symbol 'rtl8xxxu_combinations' was not declared. Should it be static? Signed-off-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c index 98700f3ad6f9..3b954c2fe448 100644 --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c @@ -7674,12 +7674,12 @@ static void rtl8xxxu_deinit_led(struct rtl8xxxu_priv *priv) led_classdev_unregister(led); } -struct ieee80211_iface_limit rtl8xxxu_limits[] = { +static const struct ieee80211_iface_limit rtl8xxxu_limits[] = { { .max = 2, .types = BIT(NL80211_IFTYPE_STATION), }, { .max = 1, .types = BIT(NL80211_IFTYPE_AP), }, }; -struct ieee80211_iface_combination rtl8xxxu_combinations[] = { +static const struct ieee80211_iface_combination rtl8xxxu_combinations[] = { { .limits = rtl8xxxu_limits, .n_limits = ARRAY_SIZE(rtl8xxxu_limits), -- 2.25.1