linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	Chen Yu <yu.c.chen@intel.com>, Chen Yu <yu.chen.surf@gmail.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@kernel.org>, Jonathan Corbet <corbet@lwn.net>,
	"open list:DOCUMENTATION" <linux-doc@vger.kernel.org>
Subject: Re: [RFC PATCH 0/3] bootconfig: Use hexadecimal ASCII string for size and checksum
Date: Thu, 19 Nov 2020 09:36:47 -0800	[thread overview]
Message-ID: <CAHk-=wi9RedSQoGF06dVs2mp7tBp4QoiW8+XZzNcDFJr3Zo5gg@mail.gmail.com> (raw)
In-Reply-To: <160579629161.503380.9118263439060046721.stgit@devnote2>

On Thu, Nov 19, 2020 at 6:31 AM Masami Hiramatsu <mhiramat@kernel.org> wrote:
>
> Here is a seires of patches to change the bootconfig footer format
> to use 8-bytes hexadecimal ASCII string for size and checksum instead
> of u32.

Ugh.,

Just make it little-endian only.

The _worst_ thing to do is to make it some kind of "native-endian",
because then you have to deal with cross building issues etc.

But using a __le32 type and just doing "le32_to_cpu()" is trivial and
optimal - not just because everybody relevant is LE anyway, but simply
because even if you _aren't_ LE, an unconditional byte swap is better
than a conditional native access.

           Linus

  parent reply	other threads:[~2020-11-19 17:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-19 14:31 [RFC PATCH 0/3] bootconfig: Use hexadecimal ASCII string for size and checksum Masami Hiramatsu
2020-11-19 14:31 ` [RFC PATCH 1/3] " Masami Hiramatsu
2020-11-19 14:31 ` [RFC PATCH 2/3] tools/bootconfig: " Masami Hiramatsu
2020-11-19 14:32 ` [RFC PATCH 3/3] docs: bootconfig: " Masami Hiramatsu
2020-11-19 17:36 ` Linus Torvalds [this message]
2020-11-19 17:42   ` [RFC PATCH 0/3] " Steven Rostedt
2020-11-19 23:58     ` Masami Hiramatsu

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='CAHk-=wi9RedSQoGF06dVs2mp7tBp4QoiW8+XZzNcDFJr3Zo5gg@mail.gmail.com' \
    --to=torvalds@linux-foundation.org \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=mingo@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=yu.c.chen@intel.com \
    --cc=yu.chen.surf@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).