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=-19.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT 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 9F867C4338F for ; Wed, 11 Aug 2021 08:15:14 +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 8A64C60F41 for ; Wed, 11 Aug 2021 08:15:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8A64C60F41 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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 2229182000; Wed, 11 Aug 2021 10:14:59 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="PsgLnU5N"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CD9F282CE8; Wed, 11 Aug 2021 10:14:52 +0200 (CEST) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 5A618800BF for ; Wed, 11 Aug 2021 10:14:45 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: by mail.kernel.org (Postfix) with ESMTPSA id 9AAD26024A; Wed, 11 Aug 2021 08:14:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1628669678; bh=jnuNhAlh9NPZU8zu+NX4oPpgGFXU5arrV/9eet4ggTw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PsgLnU5NqMtfRP0WYhZ490x0XwmBtu00IaiQT9+IHhTpgN4ekQI8qqB3QxKY1eN1t 8qiURga6DrnYFiXacw+U4CYD2+BMDxezHP8deHy0BLbm4Ho99Tmxsbl2i6S0AOsPnD zyIGq2J2PCSa3VhHoO6bHPp5XxyMeOOP37A1BoB4fjHzvgCuoZrvJQKoEFVWgL8y/N ywUvKAmlGAvKTEDFXNnB5FHAlEjtgyiVALeRs4ZuYS2pTE/63tsmGMO1BZikphs5Sj iTlFcVpY/bop7Ls1KWie7gTtGMYLeoaJZ9sJobdcmIjs11mvtpm2sx9jPrwr4qRmNC p+JLjNnneD0kQ== Received: by pali.im (Postfix) id D0D91B4A; Wed, 11 Aug 2021 10:14:36 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Stefan Roese Cc: u-boot@lists.denx.de, =?UTF-8?q?Marek=20Beh=C3=BAn?= Subject: [PATCH 4/4] tools: kwbimage: Use IBR_HDR_* constants instead of raw numbers Date: Wed, 11 Aug 2021 10:14:17 +0200 Message-Id: <20210811081417.18010-4-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210811081417.18010-1-pali@kernel.org> References: <20210811081417.18010-1-pali@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 There are already IBR_HDR_* constants for these numbers, so use them. Signed-off-by: Pali Rohár --- 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" }, {}, }; -- 2.20.1