All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Lin Liu <lin.liu@citrix.com>
Cc: "Andrew Cooper" <andrew.cooper3@citrix.com>,
	"George Dunlap" <george.dunlap@citrix.com>,
	"Ian Jackson" <iwj@xenproject.org>,
	"Julien Grall" <julien@xen.org>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Wei Liu" <wl@xen.org>, "Roger Pau Monné" <roger.pau@citrix.com>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH v2 6/7] xen: Switch to byteswap.h
Date: Tue, 2 Nov 2021 16:23:15 +0100	[thread overview]
Message-ID: <deff112e-2546-43cb-0869-964336d27f8b@suse.com> (raw)
In-Reply-To: <f5a79881bfdcef06aa950632250f551e0ec26458.1634897942.git.lin.liu@citrix.com>

On 22.10.2021 12:47, Lin Liu wrote:
> @@ -28,7 +28,7 @@ static inline void put_unaligned_le32(u32 val, void *p)
>  
>  #endif
>  
> -#define get_le32(p) le32_to_cpup((const uint32_t *)(p))
> +#define get_le32(p) le32_to_cpu(*(const uint32_t *)(p))

While here the adjustment may be okay as there is already an
open-coded cast, ...

> @@ -20,7 +20,7 @@
>  
>  static inline uint16_t get_unaligned_be16(const void *p)
>  {
> -	return be16_to_cpup(p);
> +	return be16_to_cpu(*(uint16_t*)p);

... here and below you add open-coded casts. Is there a reason you
don't retain the ..._to_cpup() macros?

Jan



  parent reply	other threads:[~2021-11-02 15:23 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-22 10:47 [PATCH v2 0/7] Implement byteswap and update references Lin Liu
2021-10-22 10:47 ` [PATCH v2 1/7] xen: implement byteswap.h Lin Liu
2021-10-22 14:00   ` Andrew Cooper
2021-11-02 14:23   ` Jan Beulich
2021-10-22 10:47 ` [PATCH v2 2/7] crypto/vmac: Simplify code with byteswap.h Lin Liu
2021-11-02 15:00   ` Jan Beulich
2021-10-22 10:47 ` [PATCH v2 3/7] arm64/find_next_bit: Remove ext2_swab() Lin Liu
2021-10-22 10:47 ` [PATCH v2 4/7] arm: Switch to byteswap.h Lin Liu
2021-10-22 10:47 ` [PATCH v2 5/7] xen/xsm: " Lin Liu
2021-10-22 15:46   ` Daniel P. Smith
2021-11-02 15:18     ` Jan Beulich
2021-10-22 10:47 ` [PATCH v2 6/7] xen: " Lin Liu
2021-10-22 11:25   ` Andrew Cooper
2021-11-02 15:23   ` Jan Beulich [this message]
2021-10-22 10:47 ` [PATCH v2 7/7] byteorder: Remove byteorder Lin Liu
2021-10-22 11:50 ` [PATCH v2 0/7] Implement byteswap and update references Andrew Cooper

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=deff112e-2546-43cb-0869-964336d27f8b@suse.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=george.dunlap@citrix.com \
    --cc=iwj@xenproject.org \
    --cc=julien@xen.org \
    --cc=lin.liu@citrix.com \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --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.