From nobody Fri Dec 19 13:29:08 2025 Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) (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 B795D2E401 for ; Mon, 8 Dec 2025 03:50:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765165824; cv=none; b=qn+8jUG3rPlEHWQT7oiThjbgdd+BVxlkVt7mYUqgYU0A7zQvuy/FjTBisCFX7VC0O0djxWVFKJuCDhMrm0jW12QqO+7oJ7eBFm+f3YsqURdxrRS9tWt4NLi5aqIOCTAZICMqUKVtG/P+wD8R6eU+3QJWlVZRF8ZHmqrfZdQ6ZPc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765165824; c=relaxed/simple; bh=dxxUXPsKpc+ktrYr3NX238Ynrv7KxxIKYL2RCz+WmHQ=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=qxplL9kjuQ+iGOlx1T1dt9Mq9QLG6YKNNrtGIlLsLlu7jpI/ZKWbWWBCXfovzEP8sp/hbg674RWO7fLXpEjt2fWy35TG+y5RDrbuslD//ubRgfEw7hR5T60KSeQUmwlvyGD3J2PrHY8iQkNq83fxv0yAHg093LEKeQdrMtalYD4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com; spf=pass smtp.mailfrom=bytedance.com; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b=ZHthHD4D; arc=none smtp.client-ip=209.85.214.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bytedance.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b="ZHthHD4D" Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-297dc3e299bso33571895ad.1 for ; Sun, 07 Dec 2025 19:50:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1765165822; x=1765770622; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=HQt8uoJWMBYj/YlVtM/kz+RuiqvE92xrlYMKIfu5C3o=; b=ZHthHD4DE1td+M3Tx7PdLn+/MTLFkJYU/CPsFFQSvVe2lCKCIR/biM9xk68XvVvBcZ 3B7O7qAlq2fGDnD6c9lwtI7DQgmLC4HDtvI1GVSE0EeTrVaROpCHgJmR1PcS9E/tXMqH vDCZV6g4G+8sHFGP+yFtkqSsa4mDmcsf41/YXwwEXI2K6J+ItAzhV+gi/b659YUqilTT mw+kY5RJQn0M5WQ5BwG3S1+btDnMoRssdbEVT1LfDXp3lEzuJwrQeLU/9Wdx6ho0fpS+ DM6aEcX6TfYpZO1qA4lHl7M1MHf/iod++B/Qcaq+eDCKQVS7kngUFiK90s1sIOr98uUR MiwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765165822; x=1765770622; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=HQt8uoJWMBYj/YlVtM/kz+RuiqvE92xrlYMKIfu5C3o=; b=AEumZULFnRRgyXVHWc0s5wJJ3v+PJhhB+gwzIpEGPxMLEm6uZtgNET8Rhvh0UTVKSs npV1VrrdO6lKgVn6iacHYWrVX8WniCqskCoXYEL8li65/fYtRde/TSlmGXM7A2hc/Q+5 9v2BWdfPm84w1FrZc131Fbl0TD060BQfB3mPl6jslHrfz667tLjfno6pdZNPTlJB7576 DCIpxWnJjpPmHJgH/haQpJ2z7dA76p7m6WDKV7IpqH454+BBkmFvBH/8DB32rhKAEk1N dlmnYiJmCGGkCqhHUAZL1baxcolUYYTPLGHiB/GTjdWe0mb7rzZDKmB1L0vzX7shg02u uhxQ== X-Forwarded-Encrypted: i=1; AJvYcCVFmBHWxz2E0U/roefLcKwUudmb0PgtzprhQ4/5j1rovsgnfI5dhbilcbxax4PjQPj5gUKYH3Qxqqsk2bo=@vger.kernel.org X-Gm-Message-State: AOJu0Yx8ORny2uqhCR0nP8tKke0ZZcUwSDWPu6uq6f1dh3VutPghXmcM lY9s3HDTh8RPPccuxn3GygzDYhlG1ak65Z0oRic7jaHdYwoC2ncEHEfdkVghAFywmrM= X-Gm-Gg: ASbGncurRU+hOFKt9GYBypYlwNZ78xKAkeLA9lbO0KqzfAVLShjyQXqBPYSKoy+zBOg jlcwJiBCvBAUuf62//+Ak1cY6hCrk0HKVoCiJ76UlcPJYe5n1lbDXYN4+qL7/At24+TFcNXD4gE xLB0tt4Ew/ev4WTn2+WpONshD6OCv1Pvh80X2v62mmGNqUUvUJ2IU7LcittCIJjKQwpZWhIqwCq iOCQxAd8NOl4OtqXKp2xLIK7Xvvhm/IHaGzdCF52eEGteZfGtSsmU6OPwDiuKAQf5viV/E2nAcW kD6EXZp6GZbucvAuL4cx225b7pdDBTcPzPmdnnGcYc3CkFPLKsAkX0N6CKtSrqdUHKpM3i4M/0C pFZ/8PuTM4DI2aI3l9oIQlsi5wT+SFBhIpu9/+8utKBbq4Bctz5JjnVUxkfhtJ1Bc1ZzrFFIVW3 REdsTRCm+60GnzXiFzP/GdMGmvg9Ww4Wb91djdzQwrLPjh X-Google-Smtp-Source: AGHT+IG6fRjq+lmQBsuqNIpVk2L76QYaDW/Ee1RxLF8vMbBYaZ5Umod8j+UA/guL3/HnA5D4KRUWHA== X-Received: by 2002:a17:903:2cb:b0:296:3f23:b910 with SMTP id d9443c01a7336-29df579eb0cmr58912355ad.9.1765165821912; Sun, 07 Dec 2025 19:50:21 -0800 (PST) Received: from L6YN4KR4K9.bytedance.net ([139.177.225.240]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-29daeae6d96sm108871275ad.102.2025.12.07.19.50.08 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 07 Dec 2025 19:50:21 -0800 (PST) From: Yunhui Cui To: aou@eecs.berkeley.edu, alex@ghiti.fr, andii@kernel.org, andybnac@gmail.com, apatel@ventanamicro.com, ast@kernel.org, ben.dooks@codethink.co.uk, bjorn@kernel.org, bpf@vger.kernel.org, charlie@rivosinc.com, cl@gentwo.org, conor.dooley@microchip.com, cuiyunhui@bytedance.com, cyrilbur@tenstorrent.com, daniel@iogearbox.net, debug@rivosinc.com, dennis@kernel.org, eddyz87@gmail.com, haoluo@google.com, john.fastabend@gmail.com, jolsa@kernel.org, kpsingh@kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-riscv@lists.infradead.org, linux@rasmusvillemoes.dk, martin.lau@linux.dev, palmer@dabbelt.com, pjw@kernel.org, puranjay@kernel.org, pulehui@huawei.com, ruanjinjie@huawei.com, rkrcmar@ventanamicro.com, samuel.holland@sifive.com, sdf@fomichev.me, song@kernel.org, tglx@linutronix.de, tj@kernel.org, thuth@redhat.com, yonghong.song@linux.dev, yury.norov@gmail.com, zong.li@sifive.com Subject: [PATCH v2 1/3] riscv: remove irqflags.h inclusion in asm/bitops.h Date: Mon, 8 Dec 2025 11:49:42 +0800 Message-Id: <20251208034944.73113-2-cuiyunhui@bytedance.com> X-Mailer: git-send-email 2.39.2 (Apple Git-143) In-Reply-To: <20251208034944.73113-1-cuiyunhui@bytedance.com> References: <20251208034944.73113-1-cuiyunhui@bytedance.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" The arch/riscv/include/asm/bitops.h does not functionally require including /linux/irqflags.h. Additionally, adding arch/riscv/include/asm/percpu.h causes a circular inclusion: kernel/bounds.c ->include/linux/log2.h ->include/linux/bitops.h ->arch/riscv/include/asm/bitops.h ->include/linux/irqflags.h ->include/linux/find.h ->return val ? __ffs(val) : size; ->arch/riscv/include/asm/bitops.h The compilation log is as follows: CC kernel/bounds.s In file included from ./include/linux/bitmap.h:11, from ./include/linux/cpumask.h:12, from ./arch/riscv/include/asm/processor.h:55, from ./arch/riscv/include/asm/thread_info.h:42, from ./include/linux/thread_info.h:60, from ./include/asm-generic/preempt.h:5, from ./arch/riscv/include/generated/asm/preempt.h:1, from ./include/linux/preempt.h:79, from ./arch/riscv/include/asm/percpu.h:8, from ./include/linux/irqflags.h:19, from ./arch/riscv/include/asm/bitops.h:14, from ./include/linux/bitops.h:68, from ./include/linux/log2.h:12, from kernel/bounds.c:13: ./include/linux/find.h: In function 'find_next_bit': ./include/linux/find.h:66:30: error: implicit declaration of function '__ff= s' [-Wimplicit-function-declaration] 66 | return val ? __ffs(val) : size; | ^~~~~ Signed-off-by: Yunhui Cui --- arch/riscv/include/asm/bitops.h | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/riscv/include/asm/bitops.h b/arch/riscv/include/asm/bitop= s.h index 238092125c118..3c1a15be54d80 100644 --- a/arch/riscv/include/asm/bitops.h +++ b/arch/riscv/include/asm/bitops.h @@ -11,7 +11,6 @@ #endif /* _LINUX_BITOPS_H */ =20 #include -#include #include #include =20 --=20 2.39.5