From patchwork Fri Nov 11 15:36:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?w43DsWlnbyBIdWd1ZXQ=?= X-Patchwork-Id: 624775 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 14634C433FE for ; Fri, 11 Nov 2022 15:37:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233801AbiKKPhd (ORCPT ); Fri, 11 Nov 2022 10:37:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231261AbiKKPhb (ORCPT ); Fri, 11 Nov 2022 10:37:31 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2F9163BA0 for ; Fri, 11 Nov 2022 07:36:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1668180998; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vx+A+dp5QY1/5RtAM81bzSfXWLGWlLhTUYKU5agUg1w=; b=ZcPxE4rT1fEmRwLX/SHhJL/VfhQCnhBZZQCZFv6YnOMPTvw6NXbeASumSHMibUsKwYT6e/ Fnjkssaw8KQV92O1WPEUiBk2qP4hPmvAaCx1XEkA0+v3Zgys6p5mzBz5uMdX72qfU8vJu/ H8QX9jAHMzoBJ1J/hjgSfNAW9W0dDWA= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-665-t0FqZ9woOCi06TZU6a0YBA-1; Fri, 11 Nov 2022 10:36:35 -0500 X-MC-Unique: t0FqZ9woOCi06TZU6a0YBA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C79ED185A7A3; Fri, 11 Nov 2022 15:36:34 +0000 (UTC) Received: from localhost.localdomain (unknown [10.39.192.119]) by smtp.corp.redhat.com (Postfix) with ESMTP id E36E463A78; Fri, 11 Nov 2022 15:36:32 +0000 (UTC) From: =?utf-8?b?w43DsWlnbyBIdWd1ZXQ=?= To: johannes@sipsolutions.net Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, linux-wireless@vger.kernel.org, =?utf-8?b?w43DsWlnbyBI?= =?utf-8?b?dWd1ZXQ=?= Subject: [PATCH wireless] mac80211: fix maybe-unused warning Date: Fri, 11 Nov 2022 16:36:22 +0100 Message-Id: <20221111153622.29016-1-ihuguet@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org In ieee80211_lookup_key, the variable named `local` is unused if compiled without lockdep, getting this warning: net/mac80211/cfg.c: In function ‘ieee80211_lookup_key’: net/mac80211/cfg.c:542:26: error: unused variable ‘local’ [-Werror=unused-variable] struct ieee80211_local *local = sdata->local; ^~~~~ Fix it with __maybe_unused. Fixes: 8cbf0c2ab6df ("wifi: mac80211: refactor some key code") Signed-off-by: Íñigo Huguet --- net/mac80211/cfg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 687b4c878d4a..8c8ef87997a8 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -576,7 +576,7 @@ static struct ieee80211_key * ieee80211_lookup_key(struct ieee80211_sub_if_data *sdata, int link_id, u8 key_idx, bool pairwise, const u8 *mac_addr) { - struct ieee80211_local *local = sdata->local; + struct ieee80211_local *local __maybe_unused = sdata->local; struct ieee80211_link_data *link = &sdata->deflink; struct ieee80211_key *key;