From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:400e:c01::236; helo=mail-pl0-x236.google.com; envelope-from=ming.huang@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-pl0-x236.google.com (mail-pl0-x236.google.com [IPv6:2607:f8b0:400e:c01::236]) (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 A33E7210E38C0 for ; Wed, 8 Aug 2018 23:22:47 -0700 (PDT) Received: by mail-pl0-x236.google.com with SMTP id w3-v6so2114750plq.2 for ; Wed, 08 Aug 2018 23:22:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=DSFw3BcqeBJpgzggi61xhypA+yfg5oGFBAAB+ENEI5s=; b=UDsIJ4hSzaE/Ugah3rE4iQ/esvlj4DGgomjWqvgNPFo1mEhEp1hpSCPCREKP5RW3uC pFKgaE7l+SgVZ2Zbma1HUCuYHj6L4oOEJhhz+E9XqW0fQpvRn8kOtunhBWkvuHFPSwKM F5szj6RhzsIsTf+95nK75FGR44N7ocAJANpQ4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=DSFw3BcqeBJpgzggi61xhypA+yfg5oGFBAAB+ENEI5s=; b=OqGN72WA1JF+Y5bgjf9KZWU/w7rcYSOBMXdff/2kCY/JSHFbdMtIWPpXCUcYE4/gb9 S1Q5rCDTjFy0p6KZGap6Vq8KYTzNnT8YlS+SWmg2+1Uet9kZUFivqxtHl03PxRMjpKJD t36LwUBcgQ04ecoyi1MV0PoGiBWMH2lvR9eeS4fsXiKaTOE6o6mcroZiYKLApi+JEJbp e9wbfz5ui81HfBAaZqs3IFIffxZqwluiMA2KIra2NBps/QU0xi8EH3t/hFASqctRWZdy FITVSXvWc4RZ3wsEcPv61tyNKrAzpzFPluEnGuw8Gm7QX26nto1J8pZ8mwJuYzFbXSgR NV7g== X-Gm-Message-State: AOUpUlGGsgPfjDcWbwJlqCn2nTFYTh9Y/J6DB3RHJD9bCs2C+IMKI0iL 3Vpb0U+A+LrpXeJU0p2Kv9dN6Q== X-Google-Smtp-Source: AA+uWPwAjYGWVU09WcUpUZh3MR4BO0IWj7zx4BuNGcq/v7Y7Z7WozSqS9GMd/aELCIMbfCRVbdGggg== X-Received: by 2002:a17:902:bd93:: with SMTP id q19-v6mr816813pls.238.1533795767141; Wed, 08 Aug 2018 23:22:47 -0700 (PDT) Received: from [10.199.0.182] ([64.64.108.224]) by smtp.gmail.com with ESMTPSA id x65-v6sm10685505pfk.140.2018.08.08.23.22.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Aug 2018 23:22:46 -0700 (PDT) To: Leif Lindholm Cc: linaro-uefi@lists.linaro.org, edk2-devel@lists.01.org, graeme.gregory@linaro.org, ard.biesheuvel@linaro.org, guoheyi@huawei.com, wanghuiqiang@huawei.com, huangming23@huawei.com, zhangjinsong2@huawei.com, huangdaode@hisilicon.com, john.garry@huawei.com, xinliang.liu@linaro.org, Heyi Guo References: <20180724070922.63362-1-ming.huang@linaro.org> <20180724070922.63362-24-ming.huang@linaro.org> <20180803152010.n4d7td5fikofy2qf@bivouac.eciton.net> From: Ming Message-ID: <12dad452-d5fa-31f4-7a3d-9e9aeb474289@linaro.org> Date: Thu, 9 Aug 2018 14:22:31 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180803152010.n4d7td5fikofy2qf@bivouac.eciton.net> Subject: Re: [PATCH edk2-platforms v1 23/38] Hisilicon/D0X: Rename the global variable gDS3231RtcDevice X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Aug 2018 06:22:47 -0000 Content-Type: text/plain; charset=gbk Content-Transfer-Encoding: 8bit ÔÚ 8/3/2018 11:20 PM, Leif Lindholm дµÀ: > On Tue, Jul 24, 2018 at 03:09:07PM +0800, Ming Huang wrote: >> The global variable gDS3231RtcDevice is used by several >> modules included common module in other Pkg. Renaming it >> with a general name is proper. > > Ah, this was why the variable name did not match the patch set. > Good. MEans I can trust your tree again. > > But please do this change _before_ introducing it for D06. > >> Contributed-under: TianoCore Contribution Agreement 1.1 >> Signed-off-by: Ming Huang >> Signed-off-by: Heyi Guo >> --- >> Platform/Hisilicon/D03/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.c | 8 ++++---- >> Platform/Hisilicon/D03/Library/OemMiscLib2P/BoardFeature2PHi1610.c | 2 +- >> Platform/Hisilicon/D05/Library/OemMiscLibD05/BoardFeatureD05.c | 2 +- >> Platform/Hisilicon/D06/Library/M41T83RealTimeClockLib/M41T83RealTimeClockLib.c | 8 ++++---- >> Platform/Hisilicon/D06/Library/M41T83RealTimeClockLib/M41T83RealTimeClockLib.inf | 1 + >> Platform/Hisilicon/D06/Library/OemMiscLibD06/BoardFeatureD06.c | 2 +- >> Silicon/Hisilicon/Include/Library/OemMiscLib.h | 2 +- >> Silicon/Hisilicon/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.c | 8 ++++---- >> 8 files changed, 17 insertions(+), 16 deletions(-) >> >> diff --git a/Platform/Hisilicon/D03/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.c b/Platform/Hisilicon/D03/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.c >> index 07fa52aa78..ed866e46b5 100644 >> --- a/Platform/Hisilicon/D03/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.c >> +++ b/Platform/Hisilicon/D03/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.c >> @@ -41,7 +41,7 @@ >> #include >> #include >> >> -extern I2C_DEVICE gDS3231RtcDevice; >> +extern I2C_DEVICE gRtcDevice; >> >> STATIC BOOLEAN mDS3231Initialized = FALSE; >> >> @@ -117,7 +117,7 @@ InitializeDS3231 ( >> // Prepare the hardware >> (VOID)IdentifyDS3231(); >> >> - (VOID) CopyMem(&Dev, &gDS3231RtcDevice, sizeof(Dev)); >> + (VOID) CopyMem(&Dev, &gRtcDevice, sizeof(Dev)); > > Space before (. > >> >> Status = I2CInit(Dev.Socket,Dev.Port,Normal); >> if (EFI_ERROR (Status)) { >> @@ -199,7 +199,7 @@ LibGetTime ( >> } >> } >> >> - (VOID) CopyMem(&Dev, &gDS3231RtcDevice, sizeof(Dev)); >> + (VOID) CopyMem(&Dev, &gRtcDevice, sizeof(Dev)); > > Space before (. > >> >> Status |= I2CRead(&Dev,DS3231_REGADDR_MONTH,1,&Temp); >> >> @@ -299,7 +299,7 @@ LibSetTime ( >> } >> } >> >> - (VOID) CopyMem(&Dev, &gDS3231RtcDevice, sizeof(Dev)); >> + (VOID) CopyMem(&Dev, &gRtcDevice, sizeof(Dev)); > > Space before (. All comments will apply in v2. Thanks. > > / > Leif > >> >> Temp = ((Time->Second/10)<<4) | (Time->Second%10); >> MicroSecondDelay(1000); >> diff --git a/Platform/Hisilicon/D03/Library/OemMiscLib2P/BoardFeature2PHi1610.c b/Platform/Hisilicon/D03/Library/OemMiscLib2P/BoardFeature2PHi1610.c >> index 66d62895a6..4771cb900c 100644 >> --- a/Platform/Hisilicon/D03/Library/OemMiscLib2P/BoardFeature2PHi1610.c >> +++ b/Platform/Hisilicon/D03/Library/OemMiscLib2P/BoardFeature2PHi1610.c >> @@ -25,7 +25,7 @@ >> #include >> #include >> >> -I2C_DEVICE gDS3231RtcDevice = { >> +I2C_DEVICE gRtcDevice = { >> .Socket = 0, >> .Port = 6, >> .DeviceType = DEVICE_TYPE_SPD, >> diff --git a/Platform/Hisilicon/D05/Library/OemMiscLibD05/BoardFeatureD05.c b/Platform/Hisilicon/D05/Library/OemMiscLibD05/BoardFeatureD05.c >> index 15a509be5d..ae4c194070 100644 >> --- a/Platform/Hisilicon/D05/Library/OemMiscLibD05/BoardFeatureD05.c >> +++ b/Platform/Hisilicon/D05/Library/OemMiscLibD05/BoardFeatureD05.c >> @@ -26,7 +26,7 @@ >> #include >> >> >> -I2C_DEVICE gDS3231RtcDevice = { >> +I2C_DEVICE gRtcDevice = { >> .Socket = 0, >> .Port = 4, >> .DeviceType = DEVICE_TYPE_SPD, >> diff --git a/Platform/Hisilicon/D06/Library/M41T83RealTimeClockLib/M41T83RealTimeClockLib.c b/Platform/Hisilicon/D06/Library/M41T83RealTimeClockLib/M41T83RealTimeClockLib.c >> index 9b1d7c00e8..d680dd0393 100644 >> --- a/Platform/Hisilicon/D06/Library/M41T83RealTimeClockLib/M41T83RealTimeClockLib.c >> +++ b/Platform/Hisilicon/D06/Library/M41T83RealTimeClockLib/M41T83RealTimeClockLib.c >> @@ -32,7 +32,7 @@ >> #include >> #include "M41T83RealTimeClock.h" >> >> -extern I2C_DEVICE gDS3231RtcDevice; >> +extern I2C_DEVICE gRtcDevice; >> >> EFI_STATUS >> SwitchRtcI2cChannelAndLock ( >> @@ -108,7 +108,7 @@ RtcRead ( >> { >> EFI_STATUS Status; >> >> - Status = I2CRead (&gDS3231RtcDevice, Address, Size, Data); >> + Status = I2CRead (&gRtcDevice, Address, Size, Data); >> MicroSecondDelay (1000); >> return Status; >> } >> @@ -131,7 +131,7 @@ RtcWrite ( >> { >> EFI_STATUS Status; >> >> - Status = I2CWrite(&gDS3231RtcDevice, Address, Size, Data); >> + Status = I2CWrite(&gRtcDevice, Address, Size, Data); >> MicroSecondDelay (1000); >> return Status; >> } >> @@ -162,7 +162,7 @@ InitializeM41T83 ( >> EfiAcquireLock (&mRtcLock); >> } >> >> - Status = I2CInit (gDS3231RtcDevice.Socket, gDS3231RtcDevice.Port, Normal); >> + Status = I2CInit (gRtcDevice.Socket, gRtcDevice.Port, Normal); >> MicroSecondDelay (1000); >> if (EFI_ERROR (Status)) { >> if (!EfiAtRuntime ()) { >> diff --git a/Platform/Hisilicon/D06/Library/M41T83RealTimeClockLib/M41T83RealTimeClockLib.inf b/Platform/Hisilicon/D06/Library/M41T83RealTimeClockLib/M41T83RealTimeClockLib.inf >> index 0d0bb37557..1337fae19d 100644 >> --- a/Platform/Hisilicon/D06/Library/M41T83RealTimeClockLib/M41T83RealTimeClockLib.inf >> +++ b/Platform/Hisilicon/D06/Library/M41T83RealTimeClockLib/M41T83RealTimeClockLib.inf >> @@ -36,6 +36,7 @@ >> DebugLib >> I2CLib >> IoLib >> + OemMiscLib >> PcdLib >> TimerLib >> UefiLib >> diff --git a/Platform/Hisilicon/D06/Library/OemMiscLibD06/BoardFeatureD06.c b/Platform/Hisilicon/D06/Library/OemMiscLibD06/BoardFeatureD06.c >> index c8f6cd0e29..9d3f12e42f 100644 >> --- a/Platform/Hisilicon/D06/Library/OemMiscLibD06/BoardFeatureD06.c >> +++ b/Platform/Hisilicon/D06/Library/OemMiscLibD06/BoardFeatureD06.c >> @@ -26,7 +26,7 @@ >> >> #include >> >> -I2C_DEVICE gDS3231RtcDevice = { >> +I2C_DEVICE gRtcDevice = { >> .Socket = 0, >> .Port = 5, >> .DeviceType = DEVICE_TYPE_SPD, >> diff --git a/Silicon/Hisilicon/Include/Library/OemMiscLib.h b/Silicon/Hisilicon/Include/Library/OemMiscLib.h >> index 53e7a37a68..517111e762 100644 >> --- a/Silicon/Hisilicon/Include/Library/OemMiscLib.h >> +++ b/Silicon/Hisilicon/Include/Library/OemMiscLib.h >> @@ -34,7 +34,7 @@ extern REPORT_PCIEDIDVID2BMC PcieDeviceToReport[PCIEDEVICE_REPORT_MAX]; >> BOOLEAN OemIsSocketPresent (UINTN Socket); >> VOID CoreSelectBoot(VOID); >> VOID OemPcieResetAndOffReset(void); >> -extern I2C_DEVICE gDS3231RtcDevice; >> +extern I2C_DEVICE gRtcDevice; >> >> UINTN OemGetSocketNumber(VOID); >> UINTN OemGetDdrChannel (VOID); >> diff --git a/Silicon/Hisilicon/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.c b/Silicon/Hisilicon/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.c >> index 02d6d7f14d..8ad807f000 100644 >> --- a/Silicon/Hisilicon/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.c >> +++ b/Silicon/Hisilicon/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.c >> @@ -39,7 +39,7 @@ >> #include >> #include "DS3231RealTimeClock.h" >> >> -extern I2C_DEVICE gDS3231RtcDevice; >> +extern I2C_DEVICE gRtcDevice; >> >> STATIC BOOLEAN mDS3231Initialized = FALSE; >> >> @@ -67,7 +67,7 @@ InitializeDS3231 ( >> // Prepare the hardware >> (VOID)IdentifyDS3231(); >> >> - (VOID) CopyMem(&Dev, &gDS3231RtcDevice, sizeof(Dev)); >> + (VOID) CopyMem(&Dev, &gRtcDevice, sizeof(Dev)); >> >> Status = I2CInit(Dev.Socket,Dev.Port,Normal); >> if (EFI_ERROR (Status)) { >> @@ -143,7 +143,7 @@ LibGetTime ( >> } >> } >> >> - (VOID) CopyMem(&Dev, &gDS3231RtcDevice, sizeof(Dev)); >> + (VOID) CopyMem(&Dev, &gRtcDevice, sizeof(Dev)); >> >> >> Status |= I2CRead(&Dev,DS3231_REGADDR_MONTH,1,&Temp); >> @@ -233,7 +233,7 @@ LibSetTime ( >> } >> } >> >> - (VOID) CopyMem(&Dev, &gDS3231RtcDevice, sizeof(Dev)); >> + (VOID) CopyMem(&Dev, &gRtcDevice, sizeof(Dev)); >> >> Temp = ((Time->Second/10)<<4) | (Time->Second%10); >> MicroSecondDelay(1000); >> -- >> 2.17.0 >>