Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp2419612rbb; Wed, 28 Feb 2024 00:49:39 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXoCmAxx3cTocXhdqQDbgWsacuDy7gvUieBQ8kucZK/ZICIsuNkeHt6XJ2MtDhBtGHXOe3bI2hKNpbfOXxizItV9tZPvwXCpXwp04LfYQ== X-Google-Smtp-Source: AGHT+IFmdj8RmnkQ2k/9qYSgAPqg4zGK6RziMfmgUzXTAci6uMbOPbHamJJg1hiRWORRFY4m3oi/ X-Received: by 2002:a1f:ebc2:0:b0:4d3:41e1:e741 with SMTP id j185-20020a1febc2000000b004d341e1e741mr144717vkh.15.1709110179096; Wed, 28 Feb 2024 00:49:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709110179; cv=pass; d=google.com; s=arc-20160816; b=hf93u502IrEh+teQoXwMxBLtmczK9WREueBNz9WI8+nsR3TXi03cdz3kUtJcOO2P8Q HO+EhbpMJp0Owq5PoBWUbIcsK2TBEC1zducWvFUXmDE0Zfd9xiOBFAbEErFYR90Dkpid epx8LTipVOOYWCFDBDijOkx+esY32G3pGn3cFR5Stm8WfUtlCoEGC2zimw4z0jFLBis0 NICip+VezUIIPZNdU1fjOwmQ3EQbh2Ie2XqM7Ap6VWnTGyzu/KRZ6yNQaX+eOkCSmWsT qSppa1E3HYzqAWql7mc7SMVZep1ExkKAw3O+XEPFIS7xND3vqjQKmKQYPyCothwHQmVU C2XQ== ARC-Message-Signature: i=2; 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=L/QMi87Nm5EYaVKhY/t/4j9baOhGOCRe35/W+r2riLU=; fh=GmPc+/BkxnmHG6USZSTnAVlkB4ZJ/ueyiB1NCia4LOI=; b=BevOy8kIaqk32fWZWGW3aREscOdyGNIDb30n3yUVaiKw0yWMIehgtnuOth5oQtVCCE Gj/Pc0LAe3k/Yo2b/j4h5y5EayNjni3P44fG3MqDKCLRR9L//RdA+Yn36cgP2uYRiZeB llrT3y/vqh+swL4OfYBiYGQBcT3mQgW2BaT03N1KqCpTwmncqFXdTIorMgC1eqIdX92K Te2qG+j5GtQB7Sw0RZeS+hCA5dbIbNEICLMr0h67oioGDsU86vV2WhOHSVY235AMaE7j vsjoRFcTaNq0Gm4PBkFhsicnKGDiWcc9F2bviNYh/vibwpKHU8fazlq21Ch0oC6mG7ex 2LbQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=C9MSgolM; arc=pass (i=1 spf=pass spfdomain=sipsolutions.net dkim=pass dkdomain=sipsolutions.net dmarc=pass fromdomain=sipsolutions.net); spf=pass (google.com: domain of linux-wireless+bounces-4151-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4151-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id wm8-20020a05620a580800b007873ff91d47si9163612qkn.463.2024.02.28.00.49.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 00:49:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-4151-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=C9MSgolM; arc=pass (i=1 spf=pass spfdomain=sipsolutions.net dkim=pass dkdomain=sipsolutions.net dmarc=pass fromdomain=sipsolutions.net); spf=pass (google.com: domain of linux-wireless+bounces-4151-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4151-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id D3E1F1C21B36 for ; Wed, 28 Feb 2024 08:49:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4ADD733080; Wed, 28 Feb 2024 08:49:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="C9MSgolM" X-Original-To: linux-wireless@vger.kernel.org Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BBBEF2E852 for ; Wed, 28 Feb 2024 08:49:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709110154; cv=none; b=VAlcbuVnwOJ8/9C9lHjMflCYuwSnuAHisMbrdNJeG3alVL/rbFI0CNdvXb8GULA9sUyK2O48Ll8EtqkhCgLeGAs5dqTR8DRTLhUtx/sEj6UoSGOjOgKn+4k1GBu2iVFuLilEnjeR65Ibm8rWXkE0FIPNT2UZb1yocOtFh5X/ZVY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709110154; c=relaxed/simple; bh=6qsFQwGKR7PDtIFw/0jhbaNki1V6r/CkU0vKb0uBeBo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AMqYBMFguUzVCh8YgnC3+DIIg7c3BPrG30fVjOm2c4yFzZfORcVAn2aZBDnYCnR9rCx6uOZEccatjMIaHS5FuFVkFnM4I6WZInClRQmUT8CUAPIZaFzZE25+/pi/XV5uiikqMScoAu2XsW/MyPqo/pobAiFsDAolOZzW17evhqw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=C9MSgolM; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net 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=L/QMi87Nm5EYaVKhY/t/4j9baOhGOCRe35/W+r2riLU=; t=1709110152; x=1710319752; b=C9MSgolMsS/pFtgFyvgKzyGX6jhQo83taJbOkOuCDt/MdH7 dJeNVjzmIVDa8wJwQTYXo3lODtW/w4huISLHtAqe/KSM27exjAzGZe0KiUrDE2aY1UZu8sDj27fWF xznoqn04wpQdGOblNw3yzrUYnR3daj9Nor/A41pIFJBDvg9MGY7ExijJuI6niyx1kJ8g6BraMZdQu ZwnKhelc0LRluUsto+9+r9Y3D+N3lwrovVLwIFtZMbmLh727OYmSZB+sY/OX0Gel2IPWPKKhy/xyo oDx8if5I2OKyp/geXlal7MRHITLmFtQkLcNT6xQViP/pwTCUjC6y3FWOJkLiCyHQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1rfFcj-0000000C0BC-2jEm; Wed, 28 Feb 2024 09:49:09 +0100 From: Johannes Berg To: linux-wireless@vger.kernel.org Cc: Johannes Berg , Miriam Rachel Korenblit , Ilan Peer Subject: [PATCH 7/8] wifi: mac80211: remove unneeded scratch_len subtraction Date: Wed, 28 Feb 2024 09:48:15 +0100 Message-ID: <20240228094902.44e07cfa9e63.I7a9758fb9bc6b726aac49804f2f05cd521bc4128@changeid> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240228084901.18661-10-johannes@sipsolutions.net> References: <20240228084901.18661-10-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 We're always using "scratch + len - pos", so we don't need to subtract here to calculate the remaining length. Remove the unnecessary subtraction. Reviewed-by: Miriam Rachel Korenblit Reviewed-by: Ilan Peer Signed-off-by: Johannes Berg --- net/mac80211/parse.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/mac80211/parse.c b/net/mac80211/parse.c index 804323858977..73e52504ed97 100644 --- a/net/mac80211/parse.c +++ b/net/mac80211/parse.c @@ -862,7 +862,6 @@ ieee802_11_parse_elems_full(struct ieee80211_elems_parse_params *params) elems, params->bss, nontransmitted_profile); elems->scratch_pos += nontransmitted_profile_len; - elems->scratch_len -= nontransmitted_profile_len; non_inherit = cfg80211_find_ext_elem(WLAN_EID_EXT_NON_INHERITANCE, nontransmitted_profile, nontransmitted_profile_len); -- 2.43.2