linux-samsung-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Frank Lee <tiny.windzz@gmail.com>
To: Chanwoo Choi <cw00.choi@samsung.com>
Cc: MyungJoo Ham <myungjoo.ham@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Kukjin Kim <kgene@kernel.org>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Linux PM <linux-pm@vger.kernel.org>,
	linux-samsung-soc <linux-samsung-soc@vger.kernel.org>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] PM / devfreq: exynos-bus: Add error log when get event fails
Date: Tue, 24 Dec 2019 22:51:30 +0800	[thread overview]
Message-ID: <CAEExFWs6Wtg9dJbx9nwq4F53Lc5e__rzRn0QedJt2ffJTKU3uA@mail.gmail.com> (raw)
In-Reply-To: <7230b556-7a96-14d1-ed22-43b5a6cd5a71@samsung.com>

On Tue, Dec 24, 2019 at 12:00 PM Chanwoo Choi <cw00.choi@samsung.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@gmail.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

  reply	other threads:[~2019-12-24 14:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20191223191928epcas1p128d39bb875b8654d61ae21364e466ec7@epcas1p1.samsung.com>
2019-12-23 19:19 ` [PATCH] PM / devfreq: exynos-bus: Add error log when get event fails Yangtao Li
2019-12-24  4:07   ` Chanwoo Choi
2019-12-24 14:51     ` Frank Lee [this message]
2019-12-26  1:28       ` Chanwoo Choi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAEExFWs6Wtg9dJbx9nwq4F53Lc5e__rzRn0QedJt2ffJTKU3uA@mail.gmail.com \
    --to=tiny.windzz@gmail.com \
    --cc=cw00.choi@samsung.com \
    --cc=kgene@kernel.org \
    --cc=krzk@kernel.org \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=myungjoo.ham@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).