diff mbox

[U-Boot,4/9] x86: ivybridge: Use 'ret' instead of 'rcode'

Message ID 1445205337-32504-5-git-send-email-sjg@chromium.org
State Accepted
Delegated to: Simon Glass
Headers show

Commit Message

Simon Glass Oct. 18, 2015, 9:55 p.m. UTC
For consistency, use 'ret' to handle a return value.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 arch/x86/cpu/ivybridge/sdram.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

Comments

Bin Meng Oct. 19, 2015, 2:23 a.m. UTC | #1
On Mon, Oct 19, 2015 at 5:55 AM, Simon Glass <sjg@chromium.org> wrote:
> For consistency, use 'ret' to handle a return value.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
>  arch/x86/cpu/ivybridge/sdram.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/arch/x86/cpu/ivybridge/sdram.c b/arch/x86/cpu/ivybridge/sdram.c
> index fc66a3c..26e2e5b 100644
> --- a/arch/x86/cpu/ivybridge/sdram.c
> +++ b/arch/x86/cpu/ivybridge/sdram.c
> @@ -93,11 +93,11 @@ static int read_seed_from_cmos(struct pei_data *pei_data)
>  {
>         u16 c1, c2, checksum, seed_checksum;
>         struct udevice *dev;
> -       int rcode = 0;
> +       int ret = 0;
>
> -       rcode = uclass_get_device(UCLASS_RTC, 0, &dev);
> -       if (rcode) {
> -               debug("Cannot find RTC: err=%d\n", rcode);
> +       ret = uclass_get_device(UCLASS_RTC, 0, &dev);
> +       if (ret) {
> +               debug("Cannot find RTC: err=%d\n", ret);
>                 return -ENODEV;
>         }
>
> @@ -170,11 +170,11 @@ static int write_seeds_to_cmos(struct pei_data *pei_data)
>  {
>         u16 c1, c2, checksum;
>         struct udevice *dev;
> -       int rcode = 0;
> +       int ret = 0;
>
> -       rcode = uclass_get_device(UCLASS_RTC, 0, &dev);
> -       if (rcode) {
> -               debug("Cannot find RTC: err=%d\n", rcode);
> +       ret = uclass_get_device(UCLASS_RTC, 0, &dev);
> +       if (ret) {
> +               debug("Cannot find RTC: err=%d\n", ret);
>                 return -ENODEV;
>         }
>
> --

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Simon Glass Oct. 21, 2015, 11:24 p.m. UTC | #2
On 18 October 2015 at 20:23, Bin Meng <bmeng.cn@gmail.com> wrote:
> On Mon, Oct 19, 2015 at 5:55 AM, Simon Glass <sjg@chromium.org> wrote:
>> For consistency, use 'ret' to handle a return value.
>>
>> Signed-off-by: Simon Glass <sjg@chromium.org>
>> ---
>>
>>  arch/x86/cpu/ivybridge/sdram.c | 16 ++++++++--------
>>  1 file changed, 8 insertions(+), 8 deletions(-)
>>

>
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

Applied to u-boot-x86.
diff mbox

Patch

diff --git a/arch/x86/cpu/ivybridge/sdram.c b/arch/x86/cpu/ivybridge/sdram.c
index fc66a3c..26e2e5b 100644
--- a/arch/x86/cpu/ivybridge/sdram.c
+++ b/arch/x86/cpu/ivybridge/sdram.c
@@ -93,11 +93,11 @@  static int read_seed_from_cmos(struct pei_data *pei_data)
 {
 	u16 c1, c2, checksum, seed_checksum;
 	struct udevice *dev;
-	int rcode = 0;
+	int ret = 0;
 
-	rcode = uclass_get_device(UCLASS_RTC, 0, &dev);
-	if (rcode) {
-		debug("Cannot find RTC: err=%d\n", rcode);
+	ret = uclass_get_device(UCLASS_RTC, 0, &dev);
+	if (ret) {
+		debug("Cannot find RTC: err=%d\n", ret);
 		return -ENODEV;
 	}
 
@@ -170,11 +170,11 @@  static int write_seeds_to_cmos(struct pei_data *pei_data)
 {
 	u16 c1, c2, checksum;
 	struct udevice *dev;
-	int rcode = 0;
+	int ret = 0;
 
-	rcode = uclass_get_device(UCLASS_RTC, 0, &dev);
-	if (rcode) {
-		debug("Cannot find RTC: err=%d\n", rcode);
+	ret = uclass_get_device(UCLASS_RTC, 0, &dev);
+	if (ret) {
+		debug("Cannot find RTC: err=%d\n", ret);
 		return -ENODEV;
 	}