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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 78B7AC636D7 for ; Tue, 21 Feb 2023 20:33:26 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9BE1B85B92; Tue, 21 Feb 2023 21:24:46 +0100 (CET) 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="YqSrO3pz"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 84A1A85B5B; Tue, 21 Feb 2023 21:23:58 +0100 (CET) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) (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 EDF9E85A72 for ; Tue, 21 Feb 2023 21:22:44 +0100 (CET) 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: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9B0E9611DE; Tue, 21 Feb 2023 20:22:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4F213C433A1; Tue, 21 Feb 2023 20:22:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1677010953; bh=CsecIE4By1xCY5bs7erCx2npaLojWK27Vlp26wweHv0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YqSrO3pz0+KewpZYsk1A1AEoyRHVIeA/hA1ArGmOu77bVp1YHT04I1to1T7CwZ3O5 Bde3TMBMhDyUIVSwHA71ldhXXkEW/vRUWxpmW8K5xup9gHZKhHe9dZLwfCqSR183mu 5b0akx7TMGCX+CsoLpLE++u41DX0IeoR6NyKDcSbI9lAh4RmYf4pm4o7fZoOuuCMx4 vG0nm8OICC47GHGQxSaJPmoarphCbYKs76AntXd0ogq7omO4Kk4/t8Gzl20PX4C/nD e7cEJDJBcH434Y9y7Q3fbMX+5Crhas2/I3i9CGIEeMYY5lPDz9GI59PP8wKK6bDJ8V KD77Vdmp1x0zg== Received: by pali.im (Postfix) id 0BB1CAA6; Tue, 21 Feb 2023 21:22:33 +0100 (CET) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: u-boot@lists.denx.de Cc: Stefan Roese , Tony Dinh , Josua Mayer Subject: [PATCH RFC u-boot-mvebu 32/59] tools: kwbimage: Fix endianity when dumping NAND_PAGE_SIZE Date: Tue, 21 Feb 2023 21:18:58 +0100 Message-Id: <20230221201925.9644-33-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230221201925.9644-1-pali@kernel.org> References: <20230221201925.9644-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.39 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.6 at phobos.denx.de X-Virus-Status: Clean Fixes: 1a8e6b63e24f ("tools: kwbimage: Dump kwbimage config file on '-p -1' option") Signed-off-by: Pali Rohár --- tools/kwbimage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/kwbimage.c b/tools/kwbimage.c index 1719b0415da1..a6f6f1578c79 100644 --- a/tools/kwbimage.c +++ b/tools/kwbimage.c @@ -2182,7 +2182,7 @@ static int kwbimage_generate_config(void *ptr, struct image_tool_params *params) fprintf(f, "NAND_ECC_MODE %s\n", image_nand_ecc_mode_name(mhdr0->nandeccmode)); if (mhdr->blockid == IBR_HDR_NAND_ID) - fprintf(f, "NAND_PAGE_SIZE 0x%x\n", (unsigned)mhdr->nandpagesize); + fprintf(f, "NAND_PAGE_SIZE 0x%x\n", (unsigned)le16_to_cpu(mhdr->nandpagesize)); if (version != 0 && mhdr->blockid == IBR_HDR_NAND_ID) fprintf(f, "NAND_BLKSZ 0x%x\n", (unsigned)mhdr->nandblocksize); -- 2.20.1