lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 9 Jul 2020 10:47:13 +0100
From:   Sudeep Holla <sudeep.holla@....com>
To:     Dien Pham <dien.pham.ry@...esas.com>
Cc:     "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-clk@...r.kernel.org" <linux-clk@...r.kernel.org>,
        Stephen Boyd <sboyd@...nel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Sudeep Holla <sudeep.holla@....com>,
        Michael Turquette <mturquette@...libre.com>
Subject: Re: [PATCH 1/2] firmware: arm_scmi: Keep the discrete clock rates
 sorted

On Thu, Jul 09, 2020 at 08:53:44AM +0000, Dien Pham wrote:
> Dear Sudeep-san,
> 
> > > >+}
> > > >+
> > > > static int
> > > > scmi_clock_describe_rates_get(const struct scmi_handle *handle, u32 clk_id,
> > > > 			      struct scmi_clock_info *clk) @@ -184,8 +193,10 @@ 
> > > >scmi_clock_describe_rates_get(const struct scmi_handle *handle, u32 clk_id,
> > > > 		 */
> > > > 	} while (num_returned && num_remaining);
> > > >
> > > >-	if (rate_discrete)
> > > >+	if (rate_discrete) {
> > > > 		clk->list.num_rates = tot_rate_cnt;
> > > >+		sort(rate, tot_rate_cnt, sizeof(*rate), rate_cmp_func, NULL);
> > >
> > > About warning of above line, I think it relates to below snip of code:
> > >                 if (tot_rate_cnt + num_returned > SCMI_MAX_NUM_RATES) {
> > >                         dev_err(handle->dev, "No. of rates > MAX_NUM_RATES");
> > >                         break;
> > >                 }
> > >
> > 
> > I don't understand your comment and relation to above warning.
> 
> I'd like to mention about below warning.
> 
> >drivers/firmware/arm_scmi/clock.c: In function 'scmi_clock_protocol_init':
> >drivers/firmware/arm_scmi/clock.c:197:3: warning: 'rate' may be used uninitialized in this function [-Wmaybe-uninitialized]

Ah ok, sorry I didn't see this one. I am unable to observe this in the
default build, I will check with W=1. Thanks for that.

> >  sort(rate, tot_rate_cnt, sizeof(*rate), rate_cmp_func, NULL);
> 
> The warning for line
> > > >+		sort(rate, tot_rate_cnt, sizeof(*rate), rate_cmp_func, NULL);
> 
> But, I think that it is affected by 'break' of below line. And for fixing
> this warning, I think we should fix inside this 'if' block.

OK will take a look.

-- 
Regards,
Sudeep

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ