From nobody Mon Apr 29 04:01:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+46665+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+46665+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1567425919; cv=none; d=zoho.com; s=zohoarc; b=UuKsL1eQicif/8wWrN9lzz4gjYhSzTcbG0JKsjW08+3WETGKr798j0VmX66PAx4kbIkfBZJ0XD7Xj7tfUA7iTGQ7Q/8EQs4W3IQB0LicXRlBImkUuM6imh4u7AlyAXfigCL3dszjho8VoKC/CbneiaBOjvRj5Pnf3wAtOrbP3hA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1567425919; h=Cc:Date:From:List-Id:List-Unsubscribe:Message-ID:Reply-To:Sender:Subject:To:ARC-Authentication-Results; bh=pF9MryYD2trsPPatSySD47CF5NVhAe3pKbE/SSAVpVc=; b=FAUvanYtCOUEtjzK9hDXYL22iUCJY0SbwEu0yRdq56eWokvWvcnjrOrVnMZsIoAwwzd/CMUDrF+Yv2bcc3VfJRVtOr7QyrrwmU1kzit7rV85uLW+tlg2EXx09U80aGGm/fn2qvVD0YPx5ZaCZDhggLYYPpjBOARb0OJPiok76HM= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+46665+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1567425919608534.468595686752; Mon, 2 Sep 2019 05:05:19 -0700 (PDT) Return-Path: X-Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by groups.io with SMTP; Mon, 02 Sep 2019 05:05:18 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Sep 2019 05:05:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,459,1559545200"; d="scan'208";a="186985426" X-Received: from shenglei-dev.ccr.corp.intel.com ([10.239.158.52]) by orsmga006.jf.intel.com with ESMTP; 02 Sep 2019 05:05:16 -0700 From: "Zhang, Shenglei" To: devel@edk2.groups.io Cc: Michael Kubacki , Sai Chaganty , Liming Gao Subject: [edk2-devel] [PATCH] AdvancedFeaturePkg/BmcElog: Change arithmetic logic Date: Mon, 2 Sep 2019 20:05:13 +0800 Message-Id: <20190902120514.18028-1-shenglei.zhang@intel.com> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,shenglei.zhang@intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1567425919; bh=9EBQufFWLmoOv1cXD/IDPcZ0ySERvU61exdGYmaZtE8=; h=Cc:Date:From:Reply-To:Subject:To; b=UVRrz/ekb4M7MYucWJVEPKyGhxuHTxdfpLd//zXxyV/syfzcmW6DjeS8RwZljE0Gv9S D8IPSjfvg3ZNruyaNWl4HVi70jEZmsb4oINhRvXMIJ2qzWQaO+AD6yaVm4AFI3S5k0Y67 4AVzrhgAhbWqLx2vVO0zomNHveQCIahXQAk= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Change the value from "sizeof(UINT8)" to 1 in the arithmetic expression. The original value added to (UINT8 *)&GetBmcGlobalEnables is (sizeof(UINT8)*sizeof(UINT8)) which equals to 1, so the functionality looks right. But the arithmetic logic is actually wrong. Cc: Michael Kubacki Cc: Sai Chaganty Cc: Liming Gao Signed-off-by: Shenglei Zhang Reviewed-by: Liming Gao --- Platform/Intel/AdvancedFeaturePkg/Ipmi/BmcElog/BmcElog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Platform/Intel/AdvancedFeaturePkg/Ipmi/BmcElog/BmcElog.c b/Pla= tform/Intel/AdvancedFeaturePkg/Ipmi/BmcElog/BmcElog.c index 421fbdec..beaa3fa0 100644 --- a/Platform/Intel/AdvancedFeaturePkg/Ipmi/BmcElog/BmcElog.c +++ b/Platform/Intel/AdvancedFeaturePkg/Ipmi/BmcElog/BmcElog.c @@ -131,7 +131,7 @@ Returns: ElogStat =3D 1; } =20 - CopyMem (&SetBmcGlobalEnables, (UINT8 *)&GetBmcGlobalEnables + sizeo= f(UINT8), sizeof(UINT8)); + CopyMem (&SetBmcGlobalEnables, (UINT8 *)&GetBmcGlobalEnables + 1, si= zeof(UINT8)); SetBmcGlobalEnables.SetEnables.Bits.SystemEventLogging =3D ElogStat; =20 Status =3D IpmiSetBmcGlobalEnables (&SetBmcGlobalEnables, &Completio= nCode); --=20 2.18.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#46665): https://edk2.groups.io/g/devel/message/46665 Mute This Topic: https://groups.io/mt/33110327/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-