From mboxrd@z Thu Jan 1 00:00:00 1970 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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 A1CD6C4338F for ; Wed, 11 Aug 2021 14:19:57 +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 CEBD16105A for ; Wed, 11 Aug 2021 14:19:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org CEBD16105A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=denx.de 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 2768881280; Wed, 11 Aug 2021 16:19:55 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1628691595; bh=XNRYeqevbwy34v7MazEaRV7Cs+7WCR8iFEgHtnm2ZvA=; h=Subject:To:Cc:References:From:Date:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=ooi8fptAvxUQEBYDkLgD3OEfAbwEs3Nh4HWfJqLUIBUr2Z56D197Uwn7XmK+/SvrF M64h9tea9Acb0JQ+68TmjDcOT6nfFWh/1T8YVrVpZbvQMHiS3tA8P46fNbWlIeuiOC jPw4b+JAtNo/niv+1boi1gcVNiHwAVCID745NxVN1aForbk+2Sh59/lorJ0wP+VZVd +5UBbJUfCo2c5DgyhA3bEpIWvQEA6+LNyEx3qJe8y1Zc16IF/P2xuZZehc+Zpv2q3a E+IeudHJyF1xICKBNe3H5bRdCgKMGQZDEm3157Qw/4MdTuK+p3/3lyKoi9LXlFWLCv mLVLle63qz08w== Received: by phobos.denx.de (Postfix, from userid 109) id C81DA82D2D; Wed, 11 Aug 2021 16:19:53 +0200 (CEST) Received: from mout-u-107.mailbox.org (mout-u-107.mailbox.org [IPv6:2001:67c:2050:1::465:107]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id BB3128022E for ; Wed, 11 Aug 2021 16:19:49 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sr@denx.de Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-107.mailbox.org (Postfix) with ESMTPS id 4GlBm53vMyzQjYX; Wed, 11 Aug 2021 16:19:49 +0200 (CEST) Received: from smtp1.mailbox.org ([80.241.60.240]) by hefe.heinlein-support.de (hefe.heinlein-support.de [91.198.250.172]) (amavisd-new, port 10030) with ESMTP id DfPTFU7j0_t1; Wed, 11 Aug 2021 16:19:46 +0200 (CEST) Subject: Re: [PATCH 4/4] tools: kwbimage: Use IBR_HDR_* constants instead of raw numbers To: =?UTF-8?Q?Pali_Roh=c3=a1r?= Cc: u-boot@lists.denx.de, =?UTF-8?Q?Marek_Beh=c3=ban?= References: <20210811081417.18010-1-pali@kernel.org> <20210811081417.18010-4-pali@kernel.org> From: Stefan Roese Message-ID: <17d2388e-35cb-9e76-d78d-8017472a0175@denx.de> Date: Wed, 11 Aug 2021 16:19:46 +0200 MIME-Version: 1.0 In-Reply-To: <20210811081417.18010-4-pali@kernel.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-DE Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C089E22F X-Rspamd-UID: e0ea27 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 On 11.08.21 10:14, Pali Rohár wrote: > There are already IBR_HDR_* constants for these numbers, so use them. > > Signed-off-by: Pali Rohár Reviewed-by: Stefan Roese Thanks, Stefan > --- > tools/kwbimage.c | 22 +++++++++++----------- > 1 file changed, 11 insertions(+), 11 deletions(-) > > diff --git a/tools/kwbimage.c b/tools/kwbimage.c > index 5ac34ac5e9c8..c1269fb6633a 100644 > --- a/tools/kwbimage.c > +++ b/tools/kwbimage.c > @@ -59,13 +59,13 @@ struct hash_v1 { > }; > > struct boot_mode boot_modes[] = { > - { 0x4D, "i2c" }, > - { 0x5A, "spi" }, > - { 0x8B, "nand" }, > - { 0x78, "sata" }, > - { 0x9C, "pex" }, > - { 0x69, "uart" }, > - { 0xAE, "sdio" }, > + { IBR_HDR_I2C_ID, "i2c" }, > + { IBR_HDR_SPI_ID, "spi" }, > + { IBR_HDR_NAND_ID, "nand" }, > + { IBR_HDR_SATA_ID, "sata" }, > + { IBR_HDR_PEX_ID, "pex" }, > + { IBR_HDR_UART_ID, "uart" }, > + { IBR_HDR_SDIO_ID, "sdio" }, > {}, > }; > > @@ -75,10 +75,10 @@ struct nand_ecc_mode { > }; > > struct nand_ecc_mode nand_ecc_modes[] = { > - { 0x00, "default" }, > - { 0x01, "hamming" }, > - { 0x02, "rs" }, > - { 0x03, "disabled" }, > + { IBR_HDR_ECC_DEFAULT, "default" }, > + { IBR_HDR_ECC_FORCED_HAMMING, "hamming" }, > + { IBR_HDR_ECC_FORCED_RS, "rs" }, > + { IBR_HDR_ECC_DISABLED, "disabled" }, > {}, > }; > > Viele Grüße, Stefan -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de