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] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 15 May 2017 11:12:56 +0300
From:   Leon Romanovsky <leonro@...lanox.com>
To:     Yuval Shaia <yuval.shaia@...cle.com>
CC:     <yishaih@...lanox.com>, <netdev@...r.kernel.org>,
        <linux-rdma@...r.kernel.org>
Subject: Re: [PATCH v4] net/mlx4_core: Use min3 to select number of MSI-X
 vectors

On Mon, May 15, 2017 at 10:53:24AM +0300, Yuval Shaia wrote:
> On Mon, May 15, 2017 at 07:43:04AM +0300, Leon Romanovsky wrote:
> > On Sun, May 14, 2017 at 10:01:34PM +0300, Yuval Shaia wrote:
> > > On Fri, May 12, 2017 at 09:10:51AM +0300, Yuval Shaia wrote:
> > > > Signed-off-by: Yuval Shaia <yuval.shaia@...cle.com>
> > > > ---
> > > > v0 -> v1:
> > > > 	* s/"min_t("/"min_t(int"
> > > > v1 -> v2:
> > > > 	* Use min3 instead of min_t twice
> > > > v2 -> v3:
> > > > 	* Change commit log header message to reflect the changes made in
> > > > 	  v2
> > > > v3 -> v4:
> > > > 	* Cast return value from num_online_cpus to int to avoid
> > > > 	  compilation errors from "sparse"
> > >
> > > Hi Leon,
> > > Got your r-b for v3, can you please review v4?
> >
> > What was the sparse error?
> >
> > num_online_cpus() is declared as "unsigned int", so you don't need to do casting.
> >
> > ➜  linux-rdma git:(master) git grep num_online_cpus include/
> > include/linux/cpumask.h:#define num_online_cpus()       cpumask_weight(cpu_online_mask)
> > include/linux/cpumask.h:#define num_online_cpus()       1U
> >
> > ➜  linux-rdma git:(master) git grep cpumask_weight include/
> > include/linux/cpumask.h:static inline unsigned int cpumask_weight(const struct cpumask *srcp)
>
> But num_eqs and reserved_eqs are ints so assuming the error is that i
> asked min3 to compare unsigned int with int.
>
> This casting cannot do harm because anyway the result is stored in int
> variable.

Thanks,
Reviewed-by: Leon Romanovsky <leonro@...lanox.com>

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ