All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: Stephan Gerhold <stephan@gerhold.net>
Cc: u-boot@lists.denx.de, Ramon Fried <rfried.dev@gmail.com>
Subject: Re: [PATCH v2 2/2] arm: mach-snapdrgon: misc: Simplify msm_generate_mac_addr()
Date: Thu, 2 Sep 2021 18:41:37 -0400	[thread overview]
Message-ID: <20210902224137.GR858@bill-the-cat> (raw)
In-Reply-To: <20210803101238.35596-2-stephan@gerhold.net>

[-- Attachment #1: Type: text/plain, Size: 983 bytes --]

On Tue, Aug 03, 2021 at 12:12:38PM +0200, Stephan Gerhold wrote:

> The logic in msm_generate_mac_addr() was originally taken from the LK
> bootloader where the serial number is a string and must be parsed first.
> However, in U-Boot msm_board_serial() returns an u32 and
> msm_generate_mac_addr() has quite complicated code that will first
> print it as a hex string and then immediately parse it again.
> 
> What this function actually does at the end is to put the serial number
> encoded as big endian (the order used for the hex string) into the u8 *mac.
> Use put_unaligned_be32() to do that with bit shifts instead of going
> through the string format.
> 
> This should be slightly more efficient and cleaner but does not result
> in any functional difference.
> 
> Cc: Ramon Fried <rfried.dev@gmail.com>
> Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>

Applied to u-boot/next, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

  parent reply	other threads:[~2021-09-02 22:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-03 10:12 [PATCH v2 1/2] arm: mach-snapdragon: misc: Initialize eMMC if necessary Stephan Gerhold
2021-08-03 10:12 ` [PATCH v2 2/2] arm: mach-snapdrgon: misc: Simplify msm_generate_mac_addr() Stephan Gerhold
2021-08-03 13:10   ` Ramon Fried
2021-09-02 22:41   ` Tom Rini [this message]
2021-09-02 22:41 ` [PATCH v2 1/2] arm: mach-snapdragon: misc: Initialize eMMC if necessary Tom Rini

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=20210902224137.GR858@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=rfried.dev@gmail.com \
    --cc=stephan@gerhold.net \
    --cc=u-boot@lists.denx.de \
    /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.