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 13F40C6FD1D for ; Tue, 4 Apr 2023 18:45:54 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id F313C85927; Tue, 4 Apr 2023 20:45:51 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.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=ti.com header.i=@ti.com header.b="WoXe6f6R"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9419985927; Tue, 4 Apr 2023 20:45:49 +0200 (CEST) Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (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 7EABF856B2 for ; Tue, 4 Apr 2023 20:45:45 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=afd@ti.com Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 334IjfsA041692; Tue, 4 Apr 2023 13:45:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1680633941; bh=QEMDtuoi52qnDRGpUHPuDrT4ZZjF4MAo/Ig1WaNgF3M=; h=From:To:CC:Subject:Date; b=WoXe6f6Rd0NK7iZGj2rTSe+c3nEyaAZFpplIdmTOLVeOD5cHeDLCvLS1UlBpFs4gn KhnrXp+cROXYKOLv/lEaumOrkLAyg1RbYDBgJqD2S/Nq97hnUEADVhq5wYWhOD1P3S x9aJ9h0ZcQIrkEkul+tg6wGm2ImZ5/88eZV0S7mM= Received: from DFLE112.ent.ti.com (dfle112.ent.ti.com [10.64.6.33]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 334Ijfah111998 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 4 Apr 2023 13:45:41 -0500 Received: from DFLE113.ent.ti.com (10.64.6.34) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Tue, 4 Apr 2023 13:45:41 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Tue, 4 Apr 2023 13:45:41 -0500 Received: from ula0226330.dal.design.ti.com (ileaxei01-snat.itg.ti.com [10.180.69.5]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 334Ijfml027795; Tue, 4 Apr 2023 13:45:41 -0500 From: Andrew Davis To: Simon Glass , Tom Rini , CC: Andrew Davis Subject: [PATCH] binman: Use unsigned long over typedef ulong Date: Tue, 4 Apr 2023 13:45:41 -0500 Message-ID: <20230404184541.24120-1-afd@ti.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 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.8 at phobos.denx.de X-Virus-Status: Clean The header binman_sym.h depends on ulong typedef but does not include types.h. This means the header must be included after including types.h or a header that includes it. We could include types.h but instead let's just switch from ulong to directly using unsigned long. This removes the need for typedef'ing it in some of the tests, so also remove those. Signed-off-by: Andrew Davis --- include/binman_sym.h | 8 ++++---- tools/binman/test/blob_syms.c | 2 -- tools/binman/test/u_boot_binman_syms.c | 2 -- tools/binman/test/u_boot_binman_syms_size.c | 2 -- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/include/binman_sym.h b/include/binman_sym.h index 528d7e4e90e..49a95eafade 100644 --- a/include/binman_sym.h +++ b/include/binman_sym.h @@ -71,7 +71,7 @@ * value #defined above. This is used to check at runtime if the * symbol values were filled in and are OK to use. */ -extern ulong _binman_sym_magic; +extern unsigned long _binman_sym_magic; /** * DECLARE_BINMAN_MAGIC_SYM - Declare the internal magic symbol @@ -81,7 +81,7 @@ extern ulong _binman_sym_magic; * definitions of the symbol. */ #define DECLARE_BINMAN_MAGIC_SYM \ - ulong _binman_sym_magic \ + unsigned long _binman_sym_magic \ __attribute__((aligned(4), section(".binman_sym"))) /** @@ -93,14 +93,14 @@ extern ulong _binman_sym_magic; * Return: 1 if binman symbol values are usable, 0 if not */ #define BINMAN_SYMS_OK \ - (*(ulong *)&_binman_sym_magic == BINMAN_SYM_MAGIC_VALUE) + (*(unsigned long *)&_binman_sym_magic == BINMAN_SYM_MAGIC_VALUE) /** * binman_sym() - Access a previously declared symbol * * This is used to get the value of a symbol. E.g.: * - * ulong address = binman_sym(ulong, u_boot_spl, pos); + * unsigned long address = binman_sym(unsigned long, u_boot_spl, pos); * * @_type: Type f the symbol (e.g. unsigned long) * @entry_name: Name of the entry to look for (e.g. 'u_boot_spl') diff --git a/tools/binman/test/blob_syms.c b/tools/binman/test/blob_syms.c index d652c79aa98..1df8d64353f 100644 --- a/tools/binman/test/blob_syms.c +++ b/tools/binman/test/blob_syms.c @@ -5,8 +5,6 @@ * Simple program to create some binman symbols. This is used by binman tests. */ -typedef unsigned long ulong; - #include #include diff --git a/tools/binman/test/u_boot_binman_syms.c b/tools/binman/test/u_boot_binman_syms.c index ed761246aec..147c90230f8 100644 --- a/tools/binman/test/u_boot_binman_syms.c +++ b/tools/binman/test/u_boot_binman_syms.c @@ -5,8 +5,6 @@ * Simple program to create some binman symbols. This is used by binman tests. */ -typedef unsigned long ulong; - #include #include diff --git a/tools/binman/test/u_boot_binman_syms_size.c b/tools/binman/test/u_boot_binman_syms_size.c index fa41b3d9a33..f686892a4da 100644 --- a/tools/binman/test/u_boot_binman_syms_size.c +++ b/tools/binman/test/u_boot_binman_syms_size.c @@ -5,8 +5,6 @@ * Simple program to create some binman symbols. This is used by binman tests. */ -typedef unsigned long ulong; - #include #include -- 2.39.2