Linux-PM Archive mirror
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Viresh Kumar <viresh.kumar@linaro.org>,
	Joshua Yeong <joshua.yeong@starfivetech.com>
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: cpufreq: Fix printing large cpu and cpufreq number
Date: Tue, 30 Apr 2024 12:56:38 +0200	[thread overview]
Message-ID: <CAJZ5v0iY9CQPRWub_Mk3LyZX_41Y_L4Gjm302X=GjcnhRiu1vw@mail.gmail.com> (raw)
In-Reply-To: <20240429032146.2d3t7bai7k6cotqt@vireshk-i7>

On Mon, Apr 29, 2024 at 5:21 AM Viresh Kumar <viresh.kumar@linaro.org> wrote:
>
> On 25-04-24, 19:00, Joshua Yeong wrote:
> > Fix printing negative number when CPU frequency
> > with large number.
> >
> > Signed-off-by: Joshua Yeong <joshua.yeong@starfivetech.com>
> > ---
> >  drivers/cpufreq/freq_table.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/cpufreq/freq_table.c b/drivers/cpufreq/freq_table.c
> > index c17dc51a5a02..9b9568023f3c 100644
> > --- a/drivers/cpufreq/freq_table.c
> > +++ b/drivers/cpufreq/freq_table.c
> > @@ -194,7 +194,7 @@ int cpufreq_table_index_unsorted(struct cpufreq_policy *policy,
> >       }
> >       if (optimal.driver_data > i) {
> >               if (suboptimal.driver_data > i) {
> > -                     WARN(1, "Invalid frequency table: %d\n", policy->cpu);
> > +                     WARN(1, "Invalid frequency table: %u\n", policy->cpu);
> >                       return 0;
> >               }
> >
> > @@ -254,7 +254,7 @@ static ssize_t show_available_freqs(struct cpufreq_policy *policy, char *buf,
> >               if (show_boost ^ (pos->flags & CPUFREQ_BOOST_FREQ))
> >                       continue;
> >
> > -             count += sprintf(&buf[count], "%d ", pos->frequency);
> > +             count += sprintf(&buf[count], "%u ", pos->frequency);
> >       }
> >       count += sprintf(&buf[count], "\n");
>
> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
>
> --

Applied as 6.10 material with edited subject and changelog, thanks!

      reply	other threads:[~2024-04-30 10:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-25 11:00 cpufreq: Fix printing large cpu and cpufreq number Joshua Yeong
2024-04-25 13:56 ` Thorsten Blum
2024-04-29  3:21 ` Viresh Kumar
2024-04-30 10:56   ` Rafael J. Wysocki [this message]

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='CAJZ5v0iY9CQPRWub_Mk3LyZX_41Y_L4Gjm302X=GjcnhRiu1vw@mail.gmail.com' \
    --to=rafael@kernel.org \
    --cc=joshua.yeong@starfivetech.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=viresh.kumar@linaro.org \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).