Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp648767rdh; Thu, 23 Nov 2023 14:28:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IFDE8mctLn0FS0RNx3J8MyMxm4pfU7jyg4s0G4E9E8llZlhh5QCgcGrc3be/FVkFWJOD1kh X-Received: by 2002:a05:6808:220b:b0:3a5:a78b:f773 with SMTP id bd11-20020a056808220b00b003a5a78bf773mr1088514oib.6.1700778517717; Thu, 23 Nov 2023 14:28:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700778517; cv=none; d=google.com; s=arc-20160816; b=YGP+NMAJOxNdZHhtLaXpbCp6Gs8Ue1oyIILmKn7CKu5PX0nOToIzzRDEMahfktpGbJ i5t2TWACrjzLA6rfcds3CVMutS9JrKYrXdFkfVoBEWodTDnhQjcy1WiyxPErLX1P2xeq QTxYdpN0TB9ZnaZFdod/x2HMbd7vlt1NkGX+qzMnKzsyjURT7uhklWHItWqGcVD4laDp KX5IR6pvVVQhH3Ne6Y+3UTlVrMpG5zDoZ7hnCGIWspG7skGd9YDgsk8RmCosSlQ8BUoS 7aUPSHmyXGAjzywDQEQvNr7ZNVCzmOIkzXnsEbwejbQZ5ZmqK9vwtzpNMC5e/wgK8kCj l0EA== 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:dkim-signature; bh=Q2KCkqGxx8qJdzfHAlSCBvED4kseHGHCcqLQHBjP2Wk=; fh=QCRMbNmxBrwEohLjUHQ8w4lzVnBUUFoRxUspyxOIxFc=; b=hYRH9SnK5mKmYQbVEt7NwJMqc1xxzc1JPWtPkPZS4FdPHl/GNycbnN2m43xuEff/L4 CXKJdPMBSeULAU/Y3t0hToEPE/Gb5MnQfycza2+tlhwTgmWcZeRf8wQigyQ15o+nolu5 FyMq6eGRKWfga4CgVmsgQuQ7Okc243EBqj3fFH71g1VCLZJWEI2o7FDMZ/VCMX8fqVnZ djJI8MRnawlwzeZzDOzKS3BjIsBcPwhapUw0J8nzRFfXbodSAGNNVPgru4zS+djA9XNx 418PCL/huCFgYmI9O9r57DO7etcGRy76xhtwCX4GjO3nbVDk7xWO74k0RCk5hIGODLry yEkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=fCJPldP3; spf=pass (google.com: domain of linux-wireless+bounces-15-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-15-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id j25-20020a63fc19000000b005b8f5718605si2201887pgi.48.2023.11.23.14.28.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 14:28:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-15-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=fCJPldP3; spf=pass (google.com: domain of linux-wireless+bounces-15-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-15-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net 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 97D65281A8F for ; Thu, 23 Nov 2023 22:28:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 531504D5B5; Thu, 23 Nov 2023 22:28:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="fCJPldP3" X-Original-To: linux-wireless@vger.kernel.org Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:242:246e::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1B68D67 for ; Thu, 23 Nov 2023 14:28:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=Q2KCkqGxx8qJdzfHAlSCBvED4kseHGHCcqLQHBjP2Wk=; t=1700778481; x=1701988081; b=fCJPldP3No5fdHaKXkCC6WulvTQ/mSYChMOGLy02eRywAKy ZHeSyQPvwbeGJqCzZiMIXFEid1L/+3+M8lkycQwcIt/E67KaQILJ4oHFz6QJlG8jn2zCRENCOMDjh G4d4e5Z0ZyLkj2hELabNUu8X6tCEEAL+tglw1LZb0wRoSC0SzA/JpnnkQWPlNO/AF9dJwobfP7Or0 Pz1a5Zk03jJGzkqNv9DKfsmXp5DgSk5n1jJDkx1CnKZYfa39qpzxkhjVIJXcuMmEN/rq2YpdhwUwx pz5PYDNeoCfhuqa6tL0keo5GRik5VagWaszvGmBhRSJn8hursX0+a4vfc/cXPezw==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1r6IAx-00000001Y53-2YCs; Thu, 23 Nov 2023 23:27:59 +0100 From: Johannes Berg To: linux-wireless@vger.kernel.org Cc: Johannes Berg Subject: [RFC PATCH v2 10/13] wifi: mac80211: chan: chandef is non-NULL for reserved Date: Thu, 23 Nov 2023 23:14:47 +0100 Message-ID: <20231123231436.1ffba9763c23.I12287452f42c54baf75821e75491cf6d021af20a@changeid> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231123221436.143254-14-johannes@sipsolutions.net> References: <20231123221436.143254-14-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Johannes Berg The last caller of this with a NULL argument was related to the non-chanctx code, so we can now remove this odd logic. Signed-off-by: Johannes Berg --- net/mac80211/chan.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/mac80211/chan.c b/net/mac80211/chan.c index 2974fe9ddb74..fdcc3d777190 100644 --- a/net/mac80211/chan.c +++ b/net/mac80211/chan.c @@ -90,11 +90,11 @@ ieee80211_chanctx_reserved_chandef(struct ieee80211_local *local, lockdep_assert_wiphy(local->hw.wiphy); + if (WARN_ON(!compat)) + return NULL; + list_for_each_entry(link, &ctx->reserved_links, reserved_chanctx_list) { - if (!compat) - compat = &link->reserved_chandef; - compat = cfg80211_chandef_compatible(&link->reserved_chandef, compat); if (!compat) -- 2.42.0