mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: Joshua Yeong <joshua.yeong@starfivetech.com>
Cc: rafael@kernel.org, linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: cpufreq: Fix printing large cpu and cpufreq number
Date: Mon, 29 Apr 2024 08:51:46 +0530	[thread overview]
Message-ID: <20240429032146.2d3t7bai7k6cotqt@vireshk-i7> (raw)
In-Reply-To: <20240425110017.75238-1-joshua.yeong@starfivetech.com>

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>

-- 
viresh

  parent reply	other threads:[~2024-04-29  3:21 UTC|newest]

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

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=20240429032146.2d3t7bai7k6cotqt@vireshk-i7 \
    --to=viresh.kumar@linaro.org \
    --cc=joshua.yeong@starfivetech.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael@kernel.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

all inboxes | Powered by JetHome®