From patchwork Mon Jan 19 21:48:30 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1662 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768859364; bh=xOg/SZqP28kenMuxUTlbtpJ1HjgIyh9Czuc6MiJJqHc=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=HgiC0qQRcVR61zqhb6tm6UEtT1qFP8AuLnjQ8Ew/A2eGtzQqulUMkNnI+Y4/GoeMx FGTJtCmkXOSW426dpZcrtexoC9ukRM+u1TL4u3tbED5WhB19GxDirDN2gDlicMXLe0 qs3g/tBpy1kDfRT0DzfycfTfHjKPwOr7vJsO++txxXtI7NLm6CpVhGqVYBIyQ8lq5A 1NP2wN30cVCfbp49XmRQkbcGB1toSzRkhCCdlJqgNvNWEIXJh+jd/BpDppve+prb3H M6n1+G7DUcAk3+vbXqhXICj2fL82TrTv5CAf4/D081kT+ZkebmdHgh39CXz4LMfT4s wL/PYPwRY4IzA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 9FF2B69536 for ; Mon, 19 Jan 2026 14:49:24 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id ZSi1mUsKJkH6 for ; Mon, 19 Jan 2026 14:49:24 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768859364; bh=xOg/SZqP28kenMuxUTlbtpJ1HjgIyh9Czuc6MiJJqHc=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=HgiC0qQRcVR61zqhb6tm6UEtT1qFP8AuLnjQ8Ew/A2eGtzQqulUMkNnI+Y4/GoeMx FGTJtCmkXOSW426dpZcrtexoC9ukRM+u1TL4u3tbED5WhB19GxDirDN2gDlicMXLe0 qs3g/tBpy1kDfRT0DzfycfTfHjKPwOr7vJsO++txxXtI7NLm6CpVhGqVYBIyQ8lq5A 1NP2wN30cVCfbp49XmRQkbcGB1toSzRkhCCdlJqgNvNWEIXJh+jd/BpDppve+prb3H M6n1+G7DUcAk3+vbXqhXICj2fL82TrTv5CAf4/D081kT+ZkebmdHgh39CXz4LMfT4s wL/PYPwRY4IzA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 8EFD169533 for ; Mon, 19 Jan 2026 14:49:24 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768859362; bh=7z9+hMiUlDzwwGHWeiX0tlGACSLtZzRo11/2ce2+0LQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YAUxWm1TCXsQoG0UlhuTdZ+xs5E3YevbLailOVHxeBbl7a6wyFxytKdPEgW2t3G33 Tr72Ezar+z8IuX7oobiMlWzyFWTPhzK1VM7I5Jo3kf+w7EpIGlfzEKT5servqju06A 0GDsJNlP9kYyE1+WsngAgIBh9EGgZgB69L0+290kmQ9Xd7rsohmQRnEEeDm5cCCGwj CsbTry9fNrZQHjWMlDp8ucDm5gpcstk3Xa6DHe9xvLxq1YADhRs/1PCnFsf/AjPgWG +WQJanO0y1fOGRSG1+Uix8XJ8lvzgunLTeMspkvDq6+U4iEFLCs508Hu1B/Q1p/gX3 h2w19Nx8nqEIw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id D143F69525; Mon, 19 Jan 2026 14:49:22 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id 3ToQzFy6ARgE; Mon, 19 Jan 2026 14:49:22 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768859358; bh=yzx3B7aIUgbhKB5b8L3t2uCmgsI8/EFWtK4f9t2vB3I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cN+POzi5sOPEXHaxHNSaXKDOuCnpkk5vkZiw4S7TtjtCyYP8LwjLMC2mc445egx/f zhWP7kILJISoMCJDOR2QxHwQadbNYNvYPCWNZ3OkCu5mcr4LD6i5hxXumngt0covHP HRJzT5BU0wZ5VHObOHBSEUmWAEpwp/+AiQz3bbPeQkRvfQ2ViJi6h2CYBuXf1bSIMo yhFjbnZV8t/tThyCGyyIx3dDanAvobJr+x9EXgBvQKnpUQrChK1tjLC0/Frqe2DVp6 DnNyLGQM7AR1Ovjpg7eZKfHUZk0zwcra6S6eMhKw9cxXE/KIusUllxU/y7BAtMPvGF xBW+5GEc9wrcg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 83F846951A; Mon, 19 Jan 2026 14:49:18 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Mon, 19 Jan 2026 14:48:30 -0700 Message-ID: <20260119214846.3087611-6-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260119214846.3087611-1-sjg@u-boot.org> References: <20260119214846.3087611-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: TGWHLLF2FDVWSPL7TNJTV673XTBUXO4H X-Message-ID-Hash: TGWHLLF2FDVWSPL7TNJTV673XTBUXO4H X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Simon Glass , "Claude Opus 4 . 5" X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 05/16] ext4l: Move _RET_IP_, _THIS_IP_, BITS_PER_BYTE to standard headers List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass Move _RET_IP_ and _THIS_IP_ instruction pointer macros to linux/kernel.h where they belong. Remove the redundant BITS_PER_BYTE definition since it is already provided by linux/bitops.h. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- fs/ext4l/ext4_uboot.h | 10 +++------- include/linux/kernel.h | 9 +++++++++ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h index 564e63d6882..4931bd25cea 100644 --- a/fs/ext4l/ext4_uboot.h +++ b/fs/ext4l/ext4_uboot.h @@ -113,7 +113,7 @@ /* lockdep stubs - needed before jbd2.h is included */ #include -#define _THIS_IP_ ((unsigned long)0) +/* _THIS_IP_ is in linux/kernel.h */ /* completion - use Linux header */ #include @@ -318,8 +318,7 @@ void iput(struct inode *inode); /* current task - from linux/sched.h */ #include -/* _RET_IP_ - return instruction pointer */ -#define _RET_IP_ ((unsigned long)__builtin_return_address(0)) +/* _RET_IP_ is in linux/kernel.h */ /* SB_FREEZE_* constants are in linux/fs.h */ @@ -663,10 +662,7 @@ static inline unsigned long memweight(const void *ptr, size_t bytes) return ret; } -/* BITS_PER_BYTE */ -#ifndef BITS_PER_BYTE -#define BITS_PER_BYTE 8 -#endif +/* BITS_PER_BYTE is in linux/bitops.h */ /* extents.c stubs */ diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 0da0d4915ec..1442d620e9e 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -321,4 +321,13 @@ enum system_states { #define might_sleep() do { } while (0) #define might_sleep_if(cond) do { } while (0) +/* + * _RET_IP_ and _THIS_IP_ - instruction pointer macros + * + * _RET_IP_: return address of current function + * _THIS_IP_: current instruction pointer (stub - lockdep not used in U-Boot) + */ +#define _RET_IP_ ((unsigned long)__builtin_return_address(0)) +#define _THIS_IP_ ((unsigned long)0) + #endif