All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lin Liu <lin.liu@citrix.com>
To: <xen-devel@lists.xenproject.org>
Cc: Lin Liu <lin.liu@citrix.com>, Wei Liu <wl@xen.org>,
	Anthony PERARD <anthony.perard@citrix.com>,
	Juergen Gross <jgross@suse.com>
Subject: [PATCH v5 5/6] tools: Use new byteswap helper
Date: Mon, 23 May 2022 10:50:50 -0400	[thread overview]
Message-ID: <334994153a7321e733b4234f9d587fc75549c0a0.1653314499.git.lin.liu@citrix.com> (raw)
In-Reply-To: <cover.1653314499.git.lin.liu@citrix.com>

Include new header to use new byteswap helper

No functional change.

Signed-off-by: Lin Liu <lin.liu@citrix.com>
---
Cc: Wei Liu <wl@xen.org>
Cc: Anthony PERARD <anthony.perard@citrix.com>
Cc: Juergen Gross <jgross@suse.com>
---
 tools/libs/guest/xg_dom_decompress_unsafe_xz.c   | 5 +++++
 tools/libs/guest/xg_dom_decompress_unsafe_zstd.c | 3 ++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/tools/libs/guest/xg_dom_decompress_unsafe_xz.c b/tools/libs/guest/xg_dom_decompress_unsafe_xz.c
index fc48198741..493427d517 100644
--- a/tools/libs/guest/xg_dom_decompress_unsafe_xz.c
+++ b/tools/libs/guest/xg_dom_decompress_unsafe_xz.c
@@ -34,6 +34,11 @@ static inline u32 le32_to_cpup(const u32 *p)
 	return cpu_to_le32(*p);
 }
 
+static inline u32 le32_to_cpu(u32 val)
+{
+   return le32_to_cpup((const u32 *)&val);
+}
+
 #define __force
 #define always_inline
 
diff --git a/tools/libs/guest/xg_dom_decompress_unsafe_zstd.c b/tools/libs/guest/xg_dom_decompress_unsafe_zstd.c
index 01eafaaaa6..b06f2e767f 100644
--- a/tools/libs/guest/xg_dom_decompress_unsafe_zstd.c
+++ b/tools/libs/guest/xg_dom_decompress_unsafe_zstd.c
@@ -31,7 +31,8 @@ typedef uint64_t __be64;
 
 #define __BYTEORDER_HAS_U64__
 #define __TYPES_H__ /* xen/types.h guard */
-#include "../../xen/include/xen/byteorder/little_endian.h"
+#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
+#include "../../xen/include/xen/byteorder.h"
 #define __ASM_UNALIGNED_H__ /* asm/unaligned.h guard */
 #include "../../xen/include/xen/unaligned.h"
 #include "../../xen/include/xen/xxhash.h"
-- 
2.27.0



  parent reply	other threads:[~2022-05-23 14:51 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-23 14:50 [PATCH v5 0/6] Implement byteswap and update references Lin Liu
2022-05-23 14:50 ` [PATCH v5 2/6] crypto/vmac: Simplify code with byteswap Lin Liu
2022-05-23 14:50 ` [PATCH v5 3/6] arm64/find_next_bit: Remove ext2_swab() Lin Liu
2022-05-23 14:53   ` Julien Grall
2022-05-24  1:35     ` 回复: " Lin Liu (刘林)
2022-05-25  7:53       ` Julien Grall
2022-05-23 14:50 ` [PATCH v5 4/6] xen: Switch to byteswap Lin Liu
2022-05-23 14:56   ` Julien Grall
2022-05-23 15:38     ` Andrew Cooper
2022-05-23 16:05       ` Julien Grall
2022-05-24  2:42         ` Lin Liu (刘林)
2022-05-23 16:14       ` Jan Beulich
2022-05-23 14:50 ` Lin Liu [this message]
2022-05-23 14:50 ` [PATCH v5 6/6] byteorder: Remove byteorder Lin Liu
2022-05-24  2:48   ` Jiamei Xie
2022-05-24  3:07     ` Lin Liu (刘林)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=334994153a7321e733b4234f9d587fc75549c0a0.1653314499.git.lin.liu@citrix.com \
    --to=lin.liu@citrix.com \
    --cc=anthony.perard@citrix.com \
    --cc=jgross@suse.com \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.