From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4001:c06::229; helo=mail-io0-x229.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-io0-x229.google.com (mail-io0-x229.google.com [IPv6:2607:f8b0:4001:c06::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 3B090221ED77C for ; Tue, 26 Dec 2017 00:56:42 -0800 (PST) Received: by mail-io0-x229.google.com with SMTP id 14so25552400iou.2 for ; Tue, 26 Dec 2017 01:01:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=t0kR9UxS5jh0W3/PdspMpDDJBZpduE/kEfbC07LrdPY=; b=cz8CM4RRuUVP/mWostBJCZIjwcLJQfkK5WesvOqEHKVwXfgDrj5P+qcXrYTJblfjzB UiO5efp6O2+kCggKAc3TsPcGMHlQEyEPvqQv2jCJz3JxEwWWePouQKpvy/keUDZrxtea GU7BUl3FAWDCi67QXFdE5oPf6gEbPuVCFrx10= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=t0kR9UxS5jh0W3/PdspMpDDJBZpduE/kEfbC07LrdPY=; b=aTliiswynBSgkughNN8QvgpGSSULSa62gjZ8C8y9a1Hlw/ynAZRftB+rfEQQmXNWO1 Rk/kpZj8udNfVfKTYTP9vcPD76oVXPrE+RODQTdQDLZ89InoFX4gemF6eNzLWDlyzIrv 8fQpHJj+9wdu9SDrDjAU3Chn/zHI2d0hn0NQRVVU+iNNoUFxn4KrHj6kflQFNP70CP1c vVdPxvcKleeDDceX8//44kDc/eBBiaF3ucCaMycG6ZSo96xIW01/k6rT/fvboQ04BJzW 42zHsjeZsc0cnkrknM1MTwvUGN/oVuIp8Y+E5EeSmUlXFoC3Jz+vMIJq5JWrkoOro8AS zDwQ== X-Gm-Message-State: AKGB3mItrJ9p5TrWi4anW0RmO4g9Ecn6dALGBS3FwscHOzuGAKIQUkjz 2Bv3YEwaVAW3mYXiwDQBUVjxzcK/sei7x/h4XEn+Ig== X-Google-Smtp-Source: ACJfBotXelWpZACEqo2SzKxI/V9VPoSuZ08Oyh0t9ePaN6ZbCmfUFnwaXF4yvUNzr1tz683iXo5HCIddeWOucfPWjHk= X-Received: by 10.107.151.142 with SMTP id z136mr32983676iod.248.1514278895433; Tue, 26 Dec 2017 01:01:35 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.52.14 with HTTP; Tue, 26 Dec 2017 01:01:34 -0800 (PST) In-Reply-To: <0C09AFA07DD0434D9E2A0C6AEB0483103B9DD8F1@SHSMSX104.ccr.corp.intel.com> References: <1514278760-1844-1-git-send-email-liming.gao@intel.com> <0C09AFA07DD0434D9E2A0C6AEB0483103B9DD8F1@SHSMSX104.ccr.corp.intel.com> From: Ard Biesheuvel Date: Tue, 26 Dec 2017 09:01:34 +0000 Message-ID: To: "Zeng, Star" Cc: "Gao, Liming" , "edk2-devel@lists.01.org" , "Wu, Hao A" Subject: Re: [PATCH v2] MdeModulePkg Variable: Update Pointer Minus with UINTN type X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Dec 2017 08:56:42 -0000 Content-Type: text/plain; charset="UTF-8" On 26 December 2017 at 09:00, Zeng, Star wrote: > Reviewed-by: Star Zeng > > > Thanks, > Star > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Liming Gao > Sent: Tuesday, December 26, 2017 4:59 PM > To: edk2-devel@lists.01.org > Cc: Zeng, Star > Subject: [edk2] [PATCH v2] MdeModulePkg Variable: Update Pointer Minus with UINTN type > > In V2, reduce unnecessary () in the expression. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Liming Gao > Cc: Star Zeng Reviewed-by: Ard Biesheuvel > --- > MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c > index 77905a0..2632211 100644 > --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c > +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c > @@ -4125,7 +4125,7 @@ ConvertNormalVarStorageToAuthVarStorage ( > // > AuthVarStorage->Format = NormalVarStorage->Format; > AuthVarStorage->State = NormalVarStorage->State; > - AuthVarStorage->Size = (UINT32) (UINTN) ((UINT8 *) AuthStartPtr - (UINT8 *) AuthVarStorage); > + AuthVarStorage->Size = (UINT32)((UINTN)AuthStartPtr - (UINTN)AuthVarStorage); > CopyGuid (&AuthVarStorage->Signature, &gEfiAuthenticatedVariableGuid); > ASSERT (AuthVarStorage->Size <= AuthVarStroageSize); > > -- > 2.8.0.windows.1 > > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel