From nobody Mon Feb 9 15:08:22 2026 Received: from mail-yb1-f173.google.com (mail-yb1-f173.google.com [209.85.219.173]) (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 A27F81F55FD for ; Tue, 28 Jan 2025 16:47:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738082833; cv=none; b=Y26u12RSXsK/A6Aq72kAG1QiHOYVmihgpTsgjczikjlxqkOuoAdJbEqPTV3RCM5+CkDcMMxbcYIpSLaVHLvKr2iyKHqzM2wJ+yevtEH37Qo9kjE3BJLFFZlFdXibt93v6JnlpAyh9SBqVgdkMhZOd1N/74stuEcAVLNBAw3N0h4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738082833; c=relaxed/simple; bh=vquPrhsxPSOpQRaTNqE0J3pv0MrwcZCreVdzuQDI1YE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tAIQn0M5X+SogvCYsOlx87oXWW2U8FBr2tzTv+aQJxCNxIQAA+YLNcc+8sEyOZRywbCZ58iBrzSAkNAxzErqv9hPZFihd4ZlgCfenB1UMNnBQbl5/bn7NPYKlRgxI4hoOUNG/+x4vJZmKxNqB5IHJLNHT77XcP/IriMASAofF/o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=XNIwwGaO; arc=none smtp.client-ip=209.85.219.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="XNIwwGaO" Received: by mail-yb1-f173.google.com with SMTP id 3f1490d57ef6-e549b0f8d57so9888778276.3 for ; Tue, 28 Jan 2025 08:47:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1738082830; x=1738687630; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xMgnxXP1n3FqmdASISG4bEtHyjdxGXTdLAdHsYNG7JY=; b=XNIwwGaOFTH04g8PGecHlhVcPP0IvI/VJtj7ftqLafsaAdNHneJaJ5OuKjku3XAO+c u2EsJLnUJCAtOC0oTzDDjE325PJ/BMTv9fJVf24IaFLI8dqK7fugeyAfMpCx8Ht/6omN X4lzlfz+ragFW3y6h5X7U98hlUGdZiPUslejrZaZcTT2Mm8WBBWuBy7QydeAfK/wXG81 qq74vlEVC56JhTVkQrbdq7q6DjJtAgRiaJ5bSx8Pqov4fTsWuu8E6nifqug2SVKM9lRI TUcwaPve2aNu60CShaUlHzrNwSgKvprQ81aIe9jjN1LOaOvwqDWWFfARs4tuxpfS3WGr itsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738082830; x=1738687630; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xMgnxXP1n3FqmdASISG4bEtHyjdxGXTdLAdHsYNG7JY=; b=vqR1Fc8wTyk4/12Wj3jPoLvNTblL0ppN+Z7GzRZ13LsXNXJ+fR10ehpzDL1wEJC3fC TAbE09uQLXKusCwTAG3FkAT6QDTTzyVV/srmoxIgH3lT8L3yutNDfRnXOk78/rQj8crl 9HfimQn732XLHGuMgJZbxvkDwyk/9DWqRVy6JgzAH8chb9qB6KHzQrVy3jZZfdARsAPg xhvBvaWUfUVUP9ZNborbWIbDN5Xu0m8W1N8KKVtCMfUpjmCuGDWKE3JNQDr4ozmc+IXe P48Fz8aJdIT/4lyStZZcnuMRlg1BRC6z2CKyZ7vHBQ2vxeoD/QnoaPFFiORMuJTA3xWB Qwyw== X-Gm-Message-State: AOJu0YzYngE3wAh753prmYLcvLxF4OYTFITig6SBwcILTAFYfuAsZgEa gN0rofZUj2unGcNhLLmTEhMSZD2aUNytqkO/2Y36n3EHboXfsTGdFYVygRSr X-Gm-Gg: ASbGncsPPsQtQ1mh8keftnW65okf00gl/2ZbCeeaFnXTPnnPhi0f2OjGVmyqtRwG3E9 QBcY76bThHIObv2gSoMhD5fgF7YJ1etMsZnAcbNMKmxaqCtvXQDhynT62QwJcQk8ZjdNegzSXqW K0QZFvihO/n08ofKeaJC8ZNgcAcg3Ypn4F3TP7pRoWVJCuFraAGbB5vnpl9Cs1jHiBZCR+C55Uo DJ9q+fLlSmPDPSz7cGurU0lAIiUBVYYqltTAekwBJwbSeb/+MXFKg0rAGMvLelYo/laIiXoWSnx bPN7PuszC1d/ybJavVKvox+oL8OJUJLH3jr1J55hUn9FgWy/XwU= X-Google-Smtp-Source: AGHT+IGoS1yW5uX6uHYlKCCs9k8BHcJDdZDgqB5rUGjX5Fi/HQ8xi+JkfwmYm1slz4yUWgVLVhVplA== X-Received: by 2002:a05:690c:9688:b0:6ef:5848:2a82 with SMTP id 00721157ae682-6f6eb929489mr335846937b3.25.1738082830429; Tue, 28 Jan 2025 08:47:10 -0800 (PST) Received: from localhost (c-73-224-175-84.hsd1.fl.comcast.net. [73.224.175.84]) by smtp.gmail.com with ESMTPSA id 3f1490d57ef6-e583b865822sm2038605276.42.2025.01.28.08.47.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jan 2025 08:47:09 -0800 (PST) From: Yury Norov To: linux-kernel@vger.kernel.org, Yury Norov , Rasmus Villemoes , Andrew Morton Cc: Christoph Hellwig Subject: [PATCH v2 13/13] cpumask: drop cpumask_next_wrap_old() Date: Tue, 28 Jan 2025 11:46:42 -0500 Message-ID: <20250128164646.4009-14-yury.norov@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250128164646.4009-1-yury.norov@gmail.com> References: <20250128164646.4009-1-yury.norov@gmail.com> 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" Now that we have cpumask_next_wrap() wired to generic find_next_bit_wrap(), the old implementation is not needed. Signed-off-by: Yury Norov --- include/linux/cpumask.h | 21 --------------------- lib/cpumask.c | 32 -------------------------------- 2 files changed, 53 deletions(-) diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index 4f3d8d66e86e..7496b1db8d0d 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h @@ -332,27 +332,6 @@ unsigned int cpumask_next_wrap(int n, const struct cpu= mask *src) #define for_each_cpu(cpu, mask) \ for_each_set_bit(cpu, cpumask_bits(mask), small_cpumask_bits) =20 -#if NR_CPUS =3D=3D 1 -static __always_inline -unsigned int cpumask_next_wrap_old(int n, const struct cpumask *mask, int = start, bool wrap) -{ - cpumask_check(start); - if (n !=3D -1) - cpumask_check(n); - - /* - * Return the first available CPU when wrapping, or when starting before = cpu0, - * since there is only one valid option. - */ - if (wrap && n >=3D 0) - return nr_cpumask_bits; - - return cpumask_first(mask); -} -#else -unsigned int __pure cpumask_next_wrap_old(int n, const struct cpumask *mas= k, int start, bool wrap); -#endif - /** * for_each_cpu_wrap - iterate over every cpu in a mask, starting at a spe= cified location * @cpu: the (optionally unsigned) integer iterator diff --git a/lib/cpumask.c b/lib/cpumask.c index d7cce2aaebc2..fbf7630f2ac9 100644 --- a/lib/cpumask.c +++ b/lib/cpumask.c @@ -7,38 +7,6 @@ #include #include =20 -/** - * cpumask_next_wrap_old - helper to implement for_each_cpu_wrap - * @n: the cpu prior to the place to search - * @mask: the cpumask pointer - * @start: the start point of the iteration - * @wrap: assume @n crossing @start terminates the iteration - * - * Return: >=3D nr_cpu_ids on completion - * - * Note: the @wrap argument is required for the start condition when - * we cannot assume @start is set in @mask. - */ -unsigned int cpumask_next_wrap_old(int n, const struct cpumask *mask, int = start, bool wrap) -{ - unsigned int next; - -again: - next =3D cpumask_next(n, mask); - - if (wrap && n < start && next >=3D start) { - return nr_cpumask_bits; - - } else if (next >=3D nr_cpumask_bits) { - wrap =3D true; - n =3D -1; - goto again; - } - - return next; -} -EXPORT_SYMBOL(cpumask_next_wrap_old); - /* These are not inline because of header tangles. */ #ifdef CONFIG_CPUMASK_OFFSTACK /** --=20 2.43.0