From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 057D8C433EF for ; Thu, 7 Apr 2022 12:51:49 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3EBCE82F70; Thu, 7 Apr 2022 14:51:47 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="t+hyXwHY"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9717383046; Thu, 7 Apr 2022 14:51:45 +0200 (CEST) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id B08E08209C for ; Thu, 7 Apr 2022 14:51:42 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 075696155F; Thu, 7 Apr 2022 12:51:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 19EBBC385A7; Thu, 7 Apr 2022 12:51:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649335900; bh=urIt4dc1P+upXcyrVu6qQHUMUCv0caujC+GwmzDtjCg=; h=From:To:Cc:Subject:Date:From; b=t+hyXwHYOKpffIsTCtzggIwLBrU7md1WkA9A1UXKBXwAZDgp44UUjnXlyTaTqO9Vk 77eezg7G977DGLvb1YvLbvfGYA+YOhJFRmRm4dsWtptEnUnvnbjvxiXmgNTlI54RlK q5y3e3ddR5iay9pwuLjoEzLs8o7UIACyasLNEluJzrxGHVoYZmbFRBORYybQX0RqDY ZmmI4qZXIWk7ZQqARc4+ynt4hXLCGmFhNHYvvzi061QdiaT+ekQHIGCDkYLC/Sf1jE pWvrYiF6+Ndy5u4vBEW7N9np60cYhCCYkB4HiNpK+eXcDELEmxRVy7bTJpEGNLwD8/ JHRyWV+QCZbaA== Received: by pali.im (Postfix) id 8C0AE7E4; Thu, 7 Apr 2022 14:51:37 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Marek Behun , Qu Wenruo Cc: u-boot@lists.denx.de Subject: [PATCH] btrfs: Fix compilation on big endian systems Date: Thu, 7 Apr 2022 14:51:03 +0200 Message-Id: <20220407125103.5074-1-pali@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean Fix following two compile errors on big endian systems: CC fs/btrfs/btrfs.o In file included from include/linux/byteorder/big_endian.h:107, from ./arch/powerpc/include/asm/byteorder.h:82, from ./arch/powerpc/include/asm/bitops.h:8, from include/linux/bitops.h:152, from include/uuid.h:9, from fs/btrfs/btrfs.c:10: fs/btrfs/conv-funcs.h: In function ‘btrfs_key_to_disk’: include/linux/byteorder/generic.h:90:21: error: ‘__cpu_to_le16’ undeclared (first use in this function); did you mean ‘__cpu_to_le16p’? #define cpu_to_le16 __cpu_to_le16 ^~~~~~~~~~~~~ fs/btrfs/conv-funcs.h:79:10: note: in expansion of macro ‘cpu_to_le16’ __u16: cpu_to_le16, \ ^~~~~~~~~~~ CC fs/btrfs/compression.o In file included from ./arch/powerpc/include/asm/unaligned.h:9, from fs/btrfs/compression.c:16: include/linux/unaligned/access_ok.h:6:19: error: redefinition of ‘get_unaligned_le16’ static inline u16 get_unaligned_le16(const void *p) ^~~~~~~~~~~~~~~~~~ In file included from fs/btrfs/ctree.h:16, from fs/btrfs/btrfs.h:12, from fs/btrfs/compression.c:8: include/linux/unaligned/le_byteshift.h:40:19: note: previous definition of ‘get_unaligned_le16’ was here static inline u16 get_unaligned_le16(const void *p) ^~~~~~~~~~~~~~~~~~ Include file asm/unaligned.h contains arch specific macros and functions for unaligned access as opposite to linux/unaligned le_byteshift.h which contains macros and functions specific to little endian systems only. Signed-off-by: Pali Rohár --- fs/btrfs/btrfs.h | 2 +- fs/btrfs/ctree.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/btrfs.h b/fs/btrfs/btrfs.h index 7d8b395b2646..a52587e0637a 100644 --- a/fs/btrfs/btrfs.h +++ b/fs/btrfs/btrfs.h @@ -9,7 +9,7 @@ #define __BTRFS_BTRFS_H__ #include -#include "conv-funcs.h" +#include "ctree.h" extern struct btrfs_info btrfs_info; extern struct btrfs_fs_info *current_fs_info; diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 219c410b189f..55112318a330 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include "kernel-shared/btrfs_tree.h" #include "crypto/hash.h" -- 2.20.1