From patchwork Mon Jan 19 06:15:08 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1617 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=1768803394; bh=MsKl1hXQFNGH6dcUNeAA6gdYWq5diK01atbBumljVg0=; 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=tCrZXEdVn6JBcyOeHynkthBi2u/dznVJnP8an3kUG6BSCT9JjTXerfgTQv6viy4sC o3Q3EhvKS3rp8SrE/et7oei/rkkvsAlRBREs70T9zGFUq/3hXnWYWhAJc+gx3UwuGZ ZKMGzNNfqUcf6C+FTJxC1vu531DdQO7wuWZygh9e9lG0fGP2dZYhNZGxqzAcuOskjQ yWpQSZjeFisSAdW/s4ZXs0EcWpkJy/3u7e61D2DdDDGLby5nWqKXXkjI8HopMAKAna /BbpdpXShxZYD7JKQp71HKGdiI7la/uxfQvQHrtWfOUAmBp4TxCId8ez26gF4vxt+0 5pCv+p2aIY08A== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 35001694D3 for ; Sun, 18 Jan 2026 23:16:34 -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 iheU7McXa_H1 for ; Sun, 18 Jan 2026 23:16:34 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768803394; bh=MsKl1hXQFNGH6dcUNeAA6gdYWq5diK01atbBumljVg0=; 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=tCrZXEdVn6JBcyOeHynkthBi2u/dznVJnP8an3kUG6BSCT9JjTXerfgTQv6viy4sC o3Q3EhvKS3rp8SrE/et7oei/rkkvsAlRBREs70T9zGFUq/3hXnWYWhAJc+gx3UwuGZ ZKMGzNNfqUcf6C+FTJxC1vu531DdQO7wuWZygh9e9lG0fGP2dZYhNZGxqzAcuOskjQ yWpQSZjeFisSAdW/s4ZXs0EcWpkJy/3u7e61D2DdDDGLby5nWqKXXkjI8HopMAKAna /BbpdpXShxZYD7JKQp71HKGdiI7la/uxfQvQHrtWfOUAmBp4TxCId8ez26gF4vxt+0 5pCv+p2aIY08A== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 242CC694C0 for ; Sun, 18 Jan 2026 23:16:34 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768803393; bh=Hajwb8UGn2sWuC+Wo+UqDmk8pHTpBVBxdjQyr56ShMA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VOqP5G+uFlb1RCK0I8VB3pvNSllu5fsyxtGax1nwMeFp3cCAcP2XIm7xCTPGAku9M tpGo/Kp0VK8BgbI8+yF2x0nhjJdnl1GKjdDFSWqz5T/DM1UVxxJs2o1PkZSQiRdT3o Qyw2FyjrK0At+pnDSaz5zcGvHyhZDg+7QBcL1mqTyBS5HPY3YCqd20pfcq0ok4Tezg mAuz+X4yVKHMlvupstifK72atwnj7+Ik+q4kkYsTcHz10WawV/yMSZSIWsCeA9mqwB EyIo87CM186jcJmyhWjZSq32TgXhD9kIC80wZHEffg5yxdfWsbfVuMkn6PwJwIT/sL cYxFNu6NDES0w== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 15EFE693AE; Sun, 18 Jan 2026 23:16:33 -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 kE6Gm0ZKzoXs; Sun, 18 Jan 2026 23:16:33 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768803388; bh=5TBcRqJ7WQKu28mnALMfM7NIct+1QrMWViIUeTEtvNs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KdWwP4jFLSEw0yx9bc/no42SHA9yw+k+zVGF6yCPDWk90DCDEKwF7DVitT5azjMgq y5SCaquo25tRBchTxEwta8E4B7QlcsAlzqXDYCIok3qCVCjolJVlf1CZ1xR4Sc0FJG eGDv+wbn2PewZCfvzCVnzD87yknUCfBG8TDhqQovMEmK2HKFev9wBz/UQCLDyqiVZv XEshhwy6ShvkvyioLnv/Xm78zKUXBLk/Wl+cDRGJNEfcEvDzzxd/7exBJveSngmmP3 z6tOueR2+3LQcgXwUGdr6CrewMtix8TgrVnIwYKfgVIBsja18twUqpKKu4D0k/1X1B yLa2Qs3+llGNA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 17921694C0; Sun, 18 Jan 2026 23:16:28 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Sun, 18 Jan 2026 23:15:08 -0700 Message-ID: <20260119061529.3383191-11-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260119061529.3383191-1-sjg@u-boot.org> References: <20260119061529.3383191-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: LQU2OHTLN643WQP7UWG66ZIXXEKWHAGS X-Message-ID-Hash: LQU2OHTLN643WQP7UWG66ZIXXEKWHAGS 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 10/23] ext4l: Move rwsem_is_locked to linux/rwsem.h 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 the rwsem_is_locked() stub macro to linux/rwsem.h where it belongs with other rwsem operations. This reduces duplication in ext4_uboot.h and places the definition with related rwsem functions. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- fs/ext4l/ext4_uboot.h | 3 +-- include/linux/rwsem.h | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h index aae248a6930..58479ccb2fe 100644 --- a/fs/ext4l/ext4_uboot.h +++ b/fs/ext4l/ext4_uboot.h @@ -758,8 +758,7 @@ static inline unsigned long memweight(const void *ptr, size_t bytes) /* extents.c stubs */ -/* rwsem is_locked stub */ -#define rwsem_is_locked(sem) (1) +/* rwsem_is_locked is in linux/rwsem.h */ /* Buffer operations */ #define sb_getblk_gfp(sb, blk, gfp) sb_getblk((sb), (blk)) diff --git a/include/linux/rwsem.h b/include/linux/rwsem.h index ea70829d135..7beaf5062ed 100644 --- a/include/linux/rwsem.h +++ b/include/linux/rwsem.h @@ -24,5 +24,6 @@ struct rw_semaphore { #define down_write_trylock(sem) 1 #define up_write(sem) do { } while (0) #define downgrade_write(sem) do { } while (0) +#define rwsem_is_locked(sem) (1) #endif /* _LINUX_RWSEM_H */