Message ID | 20200906214405.71632-20-sjg@chromium.org |
---|---|
State | Superseded |
Delegated to: | Bin Meng |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=ZKhspca8; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Bl4vK5d28z9sSn for <incoming@patchwork.ozlabs.org>; Mon, 7 Sep 2020 07:54:37 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6721C82503; Sun, 6 Sep 2020 23:45:42 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org 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=chromium.org header.i=@chromium.org header.b="ZKhspca8"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BF42282465; Sun, 6 Sep 2020 23:45:08 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd43.google.com (mail-io1-xd43.google.com [IPv6:2607:f8b0:4864:20::d43]) (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 D0B5682464 for <u-boot@lists.denx.de>; Sun, 6 Sep 2020 23:45:04 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd43.google.com with SMTP id r25so1233412ioj.0 for <u-boot@lists.denx.de>; Sun, 06 Sep 2020 14:45:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=kqoSpjV5jxWF1TpeOjY1q3Ica94bcSL2sCBaFjbkjOQ=; b=ZKhspca8/AGKhd5fZ20Bhi8KYw319Fjup8xYkUWO39j/KyzpdioIYkR+Si6tTMlUnv Kr6UoUzOq5IRnNBwu4TStFRy07iJaqPWfADzt0MDCrDngdSrXvRiTAybYLgFB52kdxLO YePqk2tJVQN/uRqV/U8TxNyeSl6XTVj+pLZlY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=kqoSpjV5jxWF1TpeOjY1q3Ica94bcSL2sCBaFjbkjOQ=; b=NP0aFRz8BzkyLDiXDy1VWB18CjBWRBRXp5GuFZvn5p8jdiXbn0DeOuklI/Rph9i0t7 SXEYDuAYjLOAZOSF60/Psyo6QlWhBxRMqMn3Y0VxnzHHpL4p1nmqgdnOMxtgWGGcpF6B pFMWmY/+dq6sSSUIk5SAhwgwRpsKZ7DlAjNsIuEBtHxu67GmJCub3L3yzhJT74D1xBI8 nxTA42ixsOke7GdQia7w5FMN7V5yYJZFZCc5j2FmiJWKURqU8xdi/ZUVmeaCjMDT1itL H11iYR3vjwgpBqtjJDpb5twBvz7vCjEwAaWTPHqSLBEU+2MsneuSXmBSL7P7dPL4eyU7 kjnw== X-Gm-Message-State: AOAM533Hj8DKMn/0SsugvEf5dpgmLkDIj/E/Lzt5RqU82FSNwgI09DQR e80BAfrXNqRlwnhXABBYWZlv6yJZrT/z7bYQ X-Google-Smtp-Source: ABdhPJwV+igaBiHyyzMVvbmJ5abcZGI/daJ5+x1/OWTTs3EyZJxze7Hvquc+mS+pQ6Uqbk0oxPNKXg== X-Received: by 2002:a05:6602:2245:: with SMTP id o5mr992492ioo.105.1599428703632; Sun, 06 Sep 2020 14:45:03 -0700 (PDT) Received: from localhost.localdomain (c-73-14-175-90.hsd1.co.comcast.net. [73.14.175.90]) by smtp.gmail.com with ESMTPSA id w13sm6232663iox.10.2020.09.06.14.45.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Sep 2020 14:45:03 -0700 (PDT) From: Simon Glass <sjg@chromium.org> To: U-Boot Mailing List <u-boot@lists.denx.de> Cc: Wolfgang Wallner <wolfgang.wallner@br-automation.com>, Bin Meng <bmeng.cn@gmail.com>, Bernhard Messerklinger <bernhard.messerklinger@br-automation.com>, Andy Shevchenko <andriy.shevchenko@linux.intel.com>, Simon Glass <sjg@chromium.org> Subject: [PATCH v3 54/57] acpi: Use defines for field lengths Date: Sun, 6 Sep 2020 15:44:02 -0600 Message-Id: <20200906214405.71632-20-sjg@chromium.org> X-Mailer: git-send-email 2.28.0.526.ge36021eeef-goog In-Reply-To: <20200906214405.71632-1-sjg@chromium.org> References: <20200906214405.71632-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <https://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean |
Series |
dm: Add programatic generation of ACPI tables (part D)
|
expand
|
On Mon, Sep 7, 2020 at 5:45 AM Simon Glass <sjg@chromium.org> wrote: > > A few fields have an open-coded length. Use the defines for this purpose > instead. > > Signed-off-by: Simon Glass <sjg@chromium.org> > --- > > (no changes since v1) > > include/acpi/acpi_table.h | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
diff --git a/include/acpi/acpi_table.h b/include/acpi/acpi_table.h index 9fba6536f50..3a243bf19ce 100644 --- a/include/acpi/acpi_table.h +++ b/include/acpi/acpi_table.h @@ -13,6 +13,7 @@ #ifndef __ACPI_TABLE_H__ #define __ACPI_TABLE_H__ +#include <dm/acpi.h> #include <linux/bitops.h> #define RSDP_SIG "RSD PTR " /* RSDP pointer signature */ @@ -48,7 +49,7 @@ struct acpi_rsdp { /* Generic ACPI header, provided by (almost) all tables */ struct __packed acpi_table_header { - char signature[4]; /* ACPI signature (4 ASCII characters) */ + char signature[ACPI_NAME_LEN]; /* ACPI signature (4 ASCII chars) */ u32 length; /* Table length in bytes (incl. header) */ u8 revision; /* Table version (not ACPI version!) */ volatile u8 checksum; /* To make sum of entire table == 0 */ @@ -263,7 +264,7 @@ struct __packed acpi_fadt { /* FACS (Firmware ACPI Control Structure) */ struct acpi_facs { - char signature[4]; /* "FACS" */ + char signature[ACPI_NAME_LEN]; /* "FACS" */ u32 length; /* Length in bytes (>= 64) */ u32 hardware_signature; /* Hardware signature */ u32 firmware_waking_vector; /* Firmware waking vector */
A few fields have an open-coded length. Use the defines for this purpose instead. Signed-off-by: Simon Glass <sjg@chromium.org> --- (no changes since v1) include/acpi/acpi_table.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)