From: Al Viro <viro@zeniv.linux.org.uk>
To: "Bence Csókás" <bence98@sch.bme.hu>
Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Fix 'assignment to __be16' warning
Date: Thu, 15 Apr 2021 20:37:19 +0000 [thread overview]
Message-ID: <YHij/89HZXdFed5V@zeniv-ca.linux.org.uk> (raw)
In-Reply-To: <20210412115302.95686-1-bence98@sch.bme.hu>
On Mon, Apr 12, 2021 at 11:53:02AM +0000, Bence Csókás wrote:
> While the preamble field _is_ technically big-endian, its value is always 0x2A2A,
> which is the same in either endianness, therefore it should be u16 instead.
Just replace the assignment with htons(0x2A2A) and be done with that - it's
a constant expression and compiler will yield the same assembler.
prev parent reply other threads:[~2021-04-15 20:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-12 11:53 [PATCH] Fix 'assignment to __be16' warning Bence Csókás
2021-04-15 20:19 ` Wolfram Sang
2021-04-15 20:37 ` Al Viro [this message]
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=YHij/89HZXdFed5V@zeniv-ca.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=bence98@sch.bme.hu \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox