mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jagadeesh Kona <quic_jkona@quicinc.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Sudeep Holla <sudeep.holla@arm.com>,
	"Rafael J . Wysocki" <rafael@kernel.org>,
	Cristian Marussi <cristian.marussi@arm.com>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-pm@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	Taniya Das <quic_tdas@quicinc.com>,
	"Ajit Pandey" <quic_ajipan@quicinc.com>,
	Imran Shaik <quic_imrashai@quicinc.com>,
	Vivek Aknurwar <quic_viveka@quicinc.com>,
	Mike Tipton <quic_mdtipton@quicinc.com>
Subject: Re: [PATCH V2] cpufreq: scmi: Avoid overflow of target_freq in fast switch
Date: Fri, 31 May 2024 08:50:30 +0530	[thread overview]
Message-ID: <7d904044-05da-4671-b8de-e752b952b006@quicinc.com> (raw)
In-Reply-To: <20240528040345.ghw6qkha3cka2pe5@vireshk-i7>



On 5/28/2024 9:33 AM, Viresh Kumar wrote:
> On 27-05-24, 15:26, Jagadeesh Kona wrote:
>>
>>
>> On 5/20/2024 2:17 PM, Viresh Kumar wrote:
>>> On 20-05-24, 12:07, Jagadeesh Kona wrote:
>>>> Conversion of target_freq to HZ in scmi_cpufreq_fast_switch()
>>>> can lead to overflow if the multiplied result is greater than
>>>> UINT_MAX, since type of target_freq is unsigned int. Avoid this
>>>> overflow by assigning target_freq to unsigned long variable for
>>>> converting it to HZ.
>>>>
>>>> Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com>
>>>> ---
>>>> Changes in V2:
>>>>     - Updated freq variable from u64 to unsigned long to keep it
>>>>       consistent with the rate parameter in scmi .freq_set() callback
>>>>     - Link to v1: https://lore.kernel.org/all/20240517070157.19553-1-quic_jkona@quicinc.com/
>>>> ---
>>>>    drivers/cpufreq/scmi-cpufreq.c | 4 ++--
>>>>    1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> Applied. Thanks.
>>>
>>
>> Thanks Viresh for the offline update on applying this patch to cpufreq arm
>> tree. Please help share the git tree details of the same, since we need them
>> to pick this change in Google ACK and downstream tree.
> 
> git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm.git cpufreq/arm/linux-next
> 
> I have pushed it out now, it will be there in linux-next soon. My
> branch is not fixed, I may end up rebasing it. Ideally, you shouldn't
> backport anything to android unless it end ups in Linus's tree, only
> then the sha id will be fixed and guaranteed not to change.
> 

Thanks Viresh!

      reply	other threads:[~2024-05-31  3:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-20  6:37 Jagadeesh Kona
2024-05-20  8:47 ` Viresh Kumar
2024-05-27  9:56   ` Jagadeesh Kona
2024-05-28  4:03     ` Viresh Kumar
2024-05-31  3:20       ` Jagadeesh Kona [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=7d904044-05da-4671-b8de-e752b952b006@quicinc.com \
    --to=quic_jkona@quicinc.com \
    --cc=cristian.marussi@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=quic_ajipan@quicinc.com \
    --cc=quic_imrashai@quicinc.com \
    --cc=quic_mdtipton@quicinc.com \
    --cc=quic_tdas@quicinc.com \
    --cc=quic_viveka@quicinc.com \
    --cc=rafael@kernel.org \
    --cc=sudeep.holla@arm.com \
    --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

all inboxes | Powered by JetHome®