Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1CBC8C433EF for ; Thu, 2 Sep 2021 22:42:11 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4D3186023F for ; Thu, 2 Sep 2021 22:42:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 4D3186023F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 88D65834F7; Fri, 3 Sep 2021 00:41:58 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="sG9aCxl6"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5BB8D83304; Fri, 3 Sep 2021 00:41:49 +0200 (CEST) Received: from mail-qt1-x829.google.com (mail-qt1-x829.google.com [IPv6:2607:f8b0:4864:20::829]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id E3301834E6 for ; Fri, 3 Sep 2021 00:41:40 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qt1-x829.google.com with SMTP id c19so3052582qte.7 for ; Thu, 02 Sep 2021 15:41:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=L5cCgtmvsDzUZ+8L5X6kA10HolmMmWvR9R5u+ezcF3M=; b=sG9aCxl6pCXBmXgaSwBseCOLikhlmRTCyfepV7SzSN3QW9ReiVd7lb9uv3e+tYJOqM idxZITj+Ib6yqrrAM0Rd128CrWeY1eP2l5LQhFMIewtGi4+301k08VxPr6Ysk2fe9/LO rRSbEEesaWz9vTIvSskFUkqtH1ds8zU8rHUO0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=L5cCgtmvsDzUZ+8L5X6kA10HolmMmWvR9R5u+ezcF3M=; b=g0E8IfvVOCFn6/UI12KIEyd4QJVi6l93hINOJfnFw152Y98NxTvH+ZhDAZcyzDbXEP Usr7AVThNaoV1kU8D9bIeaIzUSWWv1sVvBRsrRGQwyfHrBVl8CyW2fiQRF+7D2TwndtR tzYxCp+0eizOxJz5bNnvIMYarXJnDgBseigABhKsroSt71siEpJQ8glBSKg8yNJQXh+0 BiJKCbwzeWtYFXBqpHwcf6L4O12xiVgz1McdL0ZP91c609k340GTsnJwEHL/EPlkrNIS ZTfzF+B9QNGW0wK/yTKTh8dg2sqHNy6uSzp8YkhtriMvlEddVX21uk/XEkSwNVO/yHNX l60A== X-Gm-Message-State: AOAM531amDKwWMQIJyb0LGMaFTFqEqGvRTKT2Qa3ZJD5cl/GkaTina8q w/NXjFFqA+LDlPoczJ1TsZcBXeuRo2kzd12c X-Google-Smtp-Source: ABdhPJwJiduMVxHls388tfB7xQrmfZqIyYmL6ULLTmmL78s4OF29LlngMbXXfFnUOyFlaVC2d2zr8A== X-Received: by 2002:ac8:1493:: with SMTP id l19mr732314qtj.43.1630622499779; Thu, 02 Sep 2021 15:41:39 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-95b1-4c42-35f4-d991.res6.spectrum.com. [2603:6081:7b01:cbda:95b1:4c42:35f4:d991]) by smtp.gmail.com with ESMTPSA id u189sm2509816qkh.14.2021.09.02.15.41.38 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 02 Sep 2021 15:41:39 -0700 (PDT) Date: Thu, 2 Sep 2021 18:41:37 -0400 From: Tom Rini To: Stephan Gerhold Cc: u-boot@lists.denx.de, Ramon Fried Subject: Re: [PATCH v2 2/2] arm: mach-snapdrgon: misc: Simplify msm_generate_mac_addr() Message-ID: <20210902224137.GR858@bill-the-cat> References: <20210803101238.35596-1-stephan@gerhold.net> <20210803101238.35596-2-stephan@gerhold.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="oto7cvk5q2N/9i9r" Content-Disposition: inline In-Reply-To: <20210803101238.35596-2-stephan@gerhold.net> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean --oto7cvk5q2N/9i9r Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > 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 *ma= c. > Use put_unaligned_be32() to do that with bit shifts instead of going > through the string format. >=20 > This should be slightly more efficient and cleaner but does not result > in any functional difference. >=20 > Cc: Ramon Fried > Signed-off-by: Stephan Gerhold > Reviewed-by: Ramon Fried Applied to u-boot/next, thanks! --=20 Tom --oto7cvk5q2N/9i9r Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmExUyEACgkQFHw5/5Y0 tyz7xQv/b+Dn5qt2EO8fwc6zZqWwZOCQCux9P3SM9ZXkXVqrwhnp6CaGIhepTmGc YY+w7cgxDzU6piNuV6wJKOnlsEfB2dG9LkKM1sQwX/QNuEcaRuKSwN+yUM1beKYq myR3e3M1ayb6doyb5YDVQridJ6deKwrZtSw4XdMWMGlSy3DCUigUwtX3FXsSsYyo lTb1RT3LmW/IvHVgkrRoYeTL2ec0A803YXZ3skh43sy8ecijFWV7kgxYoEY69hx4 C81aMbvvtsFbnXdh6uKorQ6ozGMMAV048njHFN6IXZHb3V6Lg7BsToYOt71Ijc05 A1I8GPbDGyytK5odxu0LoFb+ARP5fpnLcZXDzPKb50+65KTV2qKVfnFMZbcjic9Z VhG8zm41gBUTEXX7ccUWBXSKhSS+qsMc8xRxq0kBYC6XCLgpfbuxXWj3k2VnCBak hsdB6fK7JYMX0Z3t36OxH3ysJsQQUjlCmZEr+0BmaVOSHZsyN4B91N7JQ2b/NIjc iMW5q1Ix =hnOq -----END PGP SIGNATURE----- --oto7cvk5q2N/9i9r--