From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by mx.groups.io with SMTP id smtpd.web12.45590.1585555929927504068 for ; Mon, 30 Mar 2020 01:12:10 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=Pzn0PjE5; spf=pass (domain: linaro.org, ip: 209.85.221.68, mailfrom: ard.biesheuvel@linaro.org) Received: by mail-wr1-f68.google.com with SMTP id a25so20455365wrd.0 for ; Mon, 30 Mar 2020 01:12:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=NZnHmLfeBGWxO+ZqhoJxF9dwsTHlgOE0qf22RKgZvWg=; b=Pzn0PjE5EcB3QeJUugYUqc40i7wryWHUlcszK7JgfpOZGMtiNLqzyjlOm9nLkz2Ysu O13mD+Ieqewow/F2IEiW6i7yZUtE2ezUWSImOqy2N293VoHSQhBg3b7uSG7f1fx4sVos rXVS/J+VYtfETLPS4D10D6NtD4A6D8A8ER+6EZIuq1PyOL836Og39nP7jZbBjsFUW9uV EPfaHQd296kVZoj2Okd6jPtE03PGyQ5P7yvCMRfP43xL5OSMIP+xYu4nS8lU16V3rf9u nPcbKSD+u9Fo23En7XRqa6h7jeGOg/wZO+uIICLjpYztWRgY00Lk5QSfDnYSNwy5Rqky GgLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=NZnHmLfeBGWxO+ZqhoJxF9dwsTHlgOE0qf22RKgZvWg=; b=NYx3oA5FHqMTxnG24mri+WSD8mj/Pz77hLp/Fdx34Y8WFRC9nEDB/znZBKA0d60Crp Zz+SH32EfsKjOJJ9oSdjnnlA/oMrgdHLmWnGPMTXwmQL0qxdPyIht3KROqi3gV92dkEW YnPp8JiP2nc/GctQQ8yywofWbfd4dqDGAZ24znOGaMDNgFRhOpSeLZKPKuuGksD6ClbM K6gbJMEE9jwv9p3S7qbSF9wqirgWjhfrYz2nYHjy4870rVbPeNOup+sfqP1eMYNq0SoF hmcErrbR8LZsYqcsZFNy19Xg50Y6oVFrslM1sgaemM97NQbe7m2qn32YUS8n3o/J557A HvTQ== X-Gm-Message-State: ANhLgQ1jTA6jN5IE5r1U27mETgpvfmtVH8HrXV2JGsfGoDNeT5ycWENs CLVzAjitqhgKJN3kjuLMe0ANTNtsLncABNwW46UT79CEbQTrTA== X-Google-Smtp-Source: ADFU+vsg27fzV+jHuFWDOpUadV+v0CPGvmGFEMX4uKYxZL+HV7n35G4Zy/dGrv23cBQq3s6475QemMIExcw/FN0ZTw8= X-Received: by 2002:a5d:4fcf:: with SMTP id h15mr13492389wrw.262.1585555927653; Mon, 30 Mar 2020 01:12:07 -0700 (PDT) MIME-Version: 1.0 References: <20200329151353.14096-1-sami.mujawar@arm.com> <20200329151353.14096-9-sami.mujawar@arm.com> In-Reply-To: <20200329151353.14096-9-sami.mujawar@arm.com> From: "Ard Biesheuvel" Date: Mon, 30 Mar 2020 10:11:56 +0200 Message-ID: Subject: Re: [edk2-devel] [PATCH v2 08/16] DynamicTablesPkg: Fix ACPI table rev field width To: edk2-devel-groups-io , Sami Mujawar Cc: Alexei Fedorov , "(Exiting) Leif Lindholm" , Matteo Carlini , Laura Moretta , nd Content-Type: text/plain; charset="UTF-8" On Sun, 29 Mar 2020 at 17:14, Sami Mujawar wrote: > > The VS2017 compiler reports 'warning C4244: '=': conversion from > 'const UINT32' to 'UINT8', possible loss of data' when the ACPI > table revision field is being updated. > > The width of the revision field in the EFI_ACPI_DESCRIPTION_HEADER > struct is 8-bit wide. Therefore, to fix the above warning make the > ACPI Table revision field usage 8-bit wide across Dynamic Tables > Framework. > > Signed-off-by: Sami Mujawar > Reviewed-by: Alexei Fedorov Reviewed-by: Ard Biesheuvel > --- > > Notes: > v2: > Splitting patch series and re-submitting DynamicTablesPkg [SAMI] > patches from https://edk2.groups.io/g/devel/message/46261 > > DynamicTablesPkg/Include/AcpiTableGenerator.h | 4 ++-- > DynamicTablesPkg/Include/StandardNameSpaceObjects.h | 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/DynamicTablesPkg/Include/AcpiTableGenerator.h b/DynamicTablesPkg/Include/AcpiTableGenerator.h > index e46717e6e8442ec516ef79ea979bd29e070f6d0a..b55feb4e7507f0e4e1e0a64c3c4b8068f17dad47 100644 > --- a/DynamicTablesPkg/Include/AcpiTableGenerator.h > +++ b/DynamicTablesPkg/Include/AcpiTableGenerator.h > @@ -287,10 +287,10 @@ typedef struct AcpiTableGenerator { > UINT32 AcpiTableSignature; > > /// The ACPI table revision. > - UINT32 AcpiTableRevision; > + UINT8 AcpiTableRevision; > > /// The minimum supported ACPI table revision. > - UINT32 MinAcpiTableRevision; > + UINT8 MinAcpiTableRevision; > > /// The ACPI table creator ID. > UINT32 CreatorId; > diff --git a/DynamicTablesPkg/Include/StandardNameSpaceObjects.h b/DynamicTablesPkg/Include/StandardNameSpaceObjects.h > index 21bb7de4044ffd6f97156f761e30fc1790f11c0c..0ba6b163691ea127ae7a7d57fb5f9fdf84789338 100644 > --- a/DynamicTablesPkg/Include/StandardNameSpaceObjects.h > +++ b/DynamicTablesPkg/Include/StandardNameSpaceObjects.h > @@ -79,7 +79,7 @@ typedef struct CmAStdObjAcpiTableInfo { > UINT32 AcpiTableSignature; > > /// The ACPI table revision > - UINT32 AcpiTableRevision; > + UINT8 AcpiTableRevision; > > /// The ACPI Table Generator ID > ACPI_TABLE_GENERATOR_ID TableGeneratorId; > -- > 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' > > > >