diff mbox series

platform/x86: ideapad-laptop: Use __func__ instead of read_ec_cmd in pr_err

Message ID 1536044899-10452-1-git-send-email-zhang.xianwei8@zte.com.cn (mailing list archive)
State Accepted, archived
Delegated to: Andy Shevchenko
Headers show
Series platform/x86: ideapad-laptop: Use __func__ instead of read_ec_cmd in pr_err | expand

Commit Message

Zhang Xianwei Sept. 4, 2018, 7:08 a.m. UTC
Refer to the commit f1395edbcec8 ("platform/x86: ideapad-laptop: Use
__func__ instead of write_ec_cmd in pr_err"), prefer using '"%s...",
__func__' to using 'read_ec_cmd' in read_ec_data.

Signed-off-by: Zhang Xianwei <zhang.xianwei8@zte.com.cn>
---
 drivers/platform/x86/ideapad-laptop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ike Panhc Sept. 6, 2018, 8:49 a.m. UTC | #1
On 09/04/2018 03:08 PM, Zhang Xianwei wrote:
> Refer to the commit f1395edbcec8 ("platform/x86: ideapad-laptop: Use
> __func__ instead of write_ec_cmd in pr_err"), prefer using '"%s...",
> __func__' to using 'read_ec_cmd' in read_ec_data.
> 
> Signed-off-by: Zhang Xianwei <zhang.xianwei8@zte.com.cn>
> ---
>  drivers/platform/x86/ideapad-laptop.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c
> index d4f1259..f856d59 100644
> --- a/drivers/platform/x86/ideapad-laptop.c
> +++ b/drivers/platform/x86/ideapad-laptop.c
> @@ -212,7 +212,7 @@ static int read_ec_data(acpi_handle handle, int cmd, unsigned long *data)
>  			return 0;
>  		}
>  	}
> -	pr_err("timeout in read_ec_cmd\n");
> +	pr_err("timeout in %s\n", __func__);
>  	return -1;
>  }
>  
> 

Good catch. Thanks.

Acked-by: Ike Panhc <ike.pan@canonical.com>
Andy Shevchenko Sept. 26, 2018, 9:28 a.m. UTC | #2
On Thu, Sep 6, 2018 at 11:49 AM Ike Panhc <ike.pan@canonical.com> wrote:
>
> On 09/04/2018 03:08 PM, Zhang Xianwei wrote:
> > Refer to the commit f1395edbcec8 ("platform/x86: ideapad-laptop: Use
> > __func__ instead of write_ec_cmd in pr_err"), prefer using '"%s...",
> > __func__' to using 'read_ec_cmd' in read_ec_data.
> >

Pushed to my review and testing queue, thanks!

> > Signed-off-by: Zhang Xianwei <zhang.xianwei8@zte.com.cn>
> > ---
> >  drivers/platform/x86/ideapad-laptop.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c
> > index d4f1259..f856d59 100644
> > --- a/drivers/platform/x86/ideapad-laptop.c
> > +++ b/drivers/platform/x86/ideapad-laptop.c
> > @@ -212,7 +212,7 @@ static int read_ec_data(acpi_handle handle, int cmd, unsigned long *data)
> >                       return 0;
> >               }
> >       }
> > -     pr_err("timeout in read_ec_cmd\n");
> > +     pr_err("timeout in %s\n", __func__);
> >       return -1;
> >  }
> >
> >
>
> Good catch. Thanks.
>
> Acked-by: Ike Panhc <ike.pan@canonical.com>
>
diff mbox series

Patch

diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c
index d4f1259..f856d59 100644
--- a/drivers/platform/x86/ideapad-laptop.c
+++ b/drivers/platform/x86/ideapad-laptop.c
@@ -212,7 +212,7 @@  static int read_ec_data(acpi_handle handle, int cmd, unsigned long *data)
 			return 0;
 		}
 	}
-	pr_err("timeout in read_ec_cmd\n");
+	pr_err("timeout in %s\n", __func__);
 	return -1;
 }