From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c09::22b; helo=mail-wm0-x22b.google.com; envelope-from=leif.lindholm@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm0-x22b.google.com (mail-wm0-x22b.google.com [IPv6:2a00:1450:400c:c09::22b]) (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 511A121A00AE6 for ; Fri, 3 Aug 2018 08:20:15 -0700 (PDT) Received: by mail-wm0-x22b.google.com with SMTP id r24-v6so5249201wmh.0 for ; Fri, 03 Aug 2018 08:20:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=VVtTiMR8IRbUrYpd8G27WWEBtF2UU2U0Rqc+1gn4VMI=; b=Zxy99VKyQd83sug9eprV7B5womq2B7QnZMcB0s8HQbyz9IMBoKh3hxTZXAdFY9oBhS 8kzQ8Y/tPLPh2WgCQ/eXoN08g2U+KBVN8W/FP7r8PhHCsDfwLeHPYQxvbB+coh/0eUfd QHIoPJ24wpcCo4Odhf3ew/8zQxaqUkbQE/a0Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=VVtTiMR8IRbUrYpd8G27WWEBtF2UU2U0Rqc+1gn4VMI=; b=nvghA/j40rRvZjubmONlRr6sD9FzlCJFTg8raYWweNEepySUl1Vh7mXnA1ypkHW7ke kG/atwzDUv3CMTJGCe6AZp29koBRIPU9yC2gw7AQggOTJYR0F6YuCJNTXPJCxKDNt8XX EwJ3K50IAnUnO3F+9aHN/2Z5JElOQ/6V4aBOI6SlV1hEe04uL2JXXbfM/KtcW7uROBtE +girmorz270Q75Fn9IR0QVTmV7qjfEMqMWTxwreRO7h9vRDnXusZkxJOuzWIiYSAbfwH Z35TRkCu/eC1TSskSggadVak2TQ2vebZh+tjUldlzjCgzfPQR4kLE1K9J10jn9qCKt9b vEWQ== X-Gm-Message-State: AOUpUlF3LE1AkbS8heeE4qgBMcR8K+OiHisu0ZRjhiS4NaLVZCn5v+NY w5AKQlLYXAV0+JwEX+6Zqs3yKw== X-Google-Smtp-Source: AAOMgpfrSnT8slSY+1+bQBj2GLpuAUDGYwIlioVALQoPSnwwfpGNjrQlorDSSPrRRNVTviE0ue4WNQ== X-Received: by 2002:a1c:9550:: with SMTP id x77-v6mr4922455wmd.135.1533309613439; Fri, 03 Aug 2018 08:20:13 -0700 (PDT) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id h14-v6sm4280435wro.15.2018.08.03.08.20.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Aug 2018 08:20:12 -0700 (PDT) Date: Fri, 3 Aug 2018 16:20:10 +0100 From: Leif Lindholm To: Ming Huang 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 Message-ID: <20180803152010.n4d7td5fikofy2qf@bivouac.eciton.net> References: <20180724070922.63362-1-ming.huang@linaro.org> <20180724070922.63362-24-ming.huang@linaro.org> MIME-Version: 1.0 In-Reply-To: <20180724070922.63362-24-ming.huang@linaro.org> User-Agent: NeoMutt/20170113 (1.7.2) 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: Fri, 03 Aug 2018 15:20:15 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 (. / 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 >