From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:4864:20::42b; helo=mail-wr1-x42b.google.com; envelope-from=leif.lindholm@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) (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 06EF0210F8F07 for ; Tue, 21 Aug 2018 10:59:50 -0700 (PDT) Received: by mail-wr1-x42b.google.com with SMTP id u12-v6so16587630wrr.4 for ; Tue, 21 Aug 2018 10:59:50 -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=t3qdYwrrsdr4kNp9VtNKeNM9FC0AihDLFymv1+gIChk=; b=LaRaBEE51SWz1h10Ru5xvOaCD/EzgJZkHSRKd41rBP0hqOJi5jd2+pjvsTynyilrGG YDuP7kM45hKR2G70otL6SRBDQFh6poIX9tysUPaUpQK8pigrlDnie3YzZBfmIy5mAxC1 o8iqZx4pNWGSIRYfXvU90s398g4yUQyvIxxjY= 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=t3qdYwrrsdr4kNp9VtNKeNM9FC0AihDLFymv1+gIChk=; b=K5eQ57oa+LMuSF5juq332B4teqm5KisjxTqhVSUDtvUpykwOInNpX3qI2VuM62SAxy 3B2qCnS9U59Zek4ErhteWn0/qna/edab14t2jXle8q52pUUgt9nNIh/GmuwnLZC2WmNN zAEnNSu/oGx7k3jxoNaQuUu49noAgqN50ox4MQt7/iNY1pr6d0inhqXXUisNUmdWXqJX tF+sXWob0M4UH2K+x6qFHkB0d2/lRMmZVuINpGYRCwqIdZaBaQcZco6GjSOaxX6/Kc8/ ZxyNax0K0lYONLjoKhHxkQIxMqqR4CBN1sr7xyCsi3JnCnII4aFXCMkYqbtocq81wQ5l brcQ== X-Gm-Message-State: AOUpUlGLMADa4OD1bFtpveFG6yebBdtTIFLY1qLomiww5Jrqp+wLJyKK LK74uUG8WcW8zbz84BC47mA09A== X-Google-Smtp-Source: AA+uWPw9iuy2A1UrYsovWlZShDY0qkwnVL8yeD7f2M6+i1Ex6563HircwyHz1QMnIxrPF/Vvm0x8AQ== X-Received: by 2002:adf:cd82:: with SMTP id q2-v6mr34399382wrj.118.1534874389302; Tue, 21 Aug 2018 10:59:49 -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 m68-v6sm5784681wmb.10.2018.08.21.10.59.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 21 Aug 2018 10:59:48 -0700 (PDT) Date: Tue, 21 Aug 2018 18:59:46 +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, michael.d.kinney@intel.com, lersek@redhat.com, guoheyi@huawei.com, wanghuiqiang@huawei.com, huangming23@huawei.com, zhangjinsong2@huawei.com, huangdaode@hisilicon.com, john.garry@huawei.com, xinliang.liu@linaro.org Message-ID: <20180821175946.w7t355u4dluxq7yx@bivouac.eciton.net> References: <20180814080903.50466-1-ming.huang@linaro.org> <20180814080903.50466-10-ming.huang@linaro.org> MIME-Version: 1.0 In-Reply-To: <20180814080903.50466-10-ming.huang@linaro.org> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [PATCH edk2-platforms v2 09/43] Hisilicon/D0X: Rename the global variable gDS3231RtcDevice X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2018 17:59:51 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Aug 14, 2018 at 04:08:29PM +0800, Ming Huang wrote: > The global variable gDS3231RtcDevice is used by several > modules included common module in HwPkg. Renaming it > with a general name is proper. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Ming Huang > --- > Silicon/Hisilicon/Include/Library/OemMiscLib.h | 2 +- > Platform/Hisilicon/D03/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.c | 8 ++++---- > Platform/Hisilicon/D03/Library/OemMiscLib2P/BoardFeature2PHi1610.c | 2 +- > Platform/Hisilicon/D05/Library/OemMiscLibD05/BoardFeatureD05.c | 2 +- > Silicon/Hisilicon/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.c | 8 ++++---- > 5 files changed, 11 insertions(+), 11 deletions(-) > > diff --git a/Silicon/Hisilicon/Include/Library/OemMiscLib.h b/Silicon/Hisilicon/Include/Library/OemMiscLib.h > index 6f18c0fa72..87cb498dd7 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/Platform/Hisilicon/D03/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.c b/Platform/Hisilicon/D03/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.c > index 07fa52aa78..f6dbcf6b75 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)); You did the correct thing in adjusting the spacing when modifying this line (and the identical ones below). However, there should also be no space after (VOID), but there should be one after sizeof. I have fixed this up on pushing. For 2, 4, 8, 9: Reviewed-by: Leif Lindholm 1, 2, 4, 8, 9, pushed as: d11581e5fd..4e6af5fa1b / Leif > 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)); > > 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)); > > 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/Silicon/Hisilicon/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.c b/Silicon/Hisilicon/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.c > index 02d6d7f14d..105eb15635 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 >