[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEExFWs6Wtg9dJbx9nwq4F53Lc5e__rzRn0QedJt2ffJTKU3uA@mail.gmail.com>
Date: Tue, 24 Dec 2019 22:51:30 +0800
From: Frank Lee <tiny.windzz@...il.com>
To: Chanwoo Choi <cw00.choi@...sung.com>
Cc: MyungJoo Ham <myungjoo.ham@...sung.com>,
Kyungmin Park <kyungmin.park@...sung.com>,
Kukjin Kim <kgene@...nel.org>,
Krzysztof Kozlowski <krzk@...nel.org>,
Linux PM <linux-pm@...r.kernel.org>,
linux-samsung-soc <linux-samsung-soc@...r.kernel.org>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] PM / devfreq: exynos-bus: Add error log when get event fails
On Tue, Dec 24, 2019 at 12:00 PM Chanwoo Choi <cw00.choi@...sung.com> wrote:
>
> Hi,
>
> I think that you better to use 'devfreq-event' instead of just 'event'
> as following:
>
> PM / devfreq: exynos-bus: Add error log when fail to get devfreq-event
>
> On 12/24/19 4:19 AM, Yangtao Li wrote:
> > Adding an error log makes it easier to trace the function's error path.
> > Because the error code may be rewritten on return, print error code here.
> >
> > Signed-off-by: Yangtao Li <tiny.windzz@...il.com>
> > ---
> > drivers/devfreq/exynos-bus.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c
> > index 948e9340f91c..634d63fd00ea 100644
> > --- a/drivers/devfreq/exynos-bus.c
> > +++ b/drivers/devfreq/exynos-bus.c
> > @@ -126,6 +126,8 @@ static int exynos_bus_get_dev_status(struct device *dev,
> >
> > ret = exynos_bus_get_event(bus, &edata);
> > if (ret < 0) {
> > + dev_err(dev, "failed to get event from devfreq-event devices %d\n",
> > + ret);
Emmm, it looks a bit strange to me...
V2 has been sent.
Yours,
Yangtao
>
> Better to make it under 80 char as following:
>
> diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c
> index f5d4c369c7fb..10f4fa1a0363 100644
> --- a/drivers/devfreq/exynos-bus.c
> +++ b/drivers/devfreq/exynos-bus.c
> @@ -126,7 +126,8 @@ static int exynos_bus_get_dev_status(struct device *dev,
>
> ret = exynos_bus_get_event(bus, &edata);
> if (ret < 0) {
> - dev_err(dev, "failed to get event from devfreq-event devices %d\n",
> + dev_err(dev,
> + "failed to get event from devfreq-event devices %d\n",
> ret);
> stat->total_time = stat->busy_time = 0;
> goto err;
>
>
> > stat->total_time = stat->busy_time = 0;
> > goto err;
> > }
> >
>
>
> --
> Best Regards,
> Chanwoo Choi
> Samsung Electronics
Powered by blists - more mailing lists