From: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
To: Yuval Shaia <yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Cc: yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v4] net/mlx4_core: Use min3 to select number of MSI-X vectors
Date: Mon, 15 May 2017 11:12:56 +0300 [thread overview]
Message-ID: <20170515081256.GB3616@mtr-leonro.local> (raw)
In-Reply-To: <20170515075324.GA3523@yuval-lap>
[-- Attachment #1: Type: text/plain, Size: 1636 bytes --]
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-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> > > > ---
> > > > 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-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2017-05-15 8:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-12 6:10 [PATCH v4] net/mlx4_core: Use min3 to select number of MSI-X vectors Yuval Shaia
[not found] ` <1494569451-2567-1-git-send-email-yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2017-05-14 19:01 ` Yuval Shaia
2017-05-15 4:43 ` Leon Romanovsky
[not found] ` <20170515044304.GV3616-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-05-15 7:53 ` Yuval Shaia
2017-05-15 8:12 ` Leon Romanovsky [this message]
2017-05-15 18:20 ` David Miller
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=20170515081256.GB3616@mtr-leonro.local \
--to=leonro-vpraknaxozvwk0htik3j/w@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.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