From: Arnd Bergmann <arnd@arndb.de>
To: Saeed Mahameed <saeedm@mellanox.com>
Cc: "dledford@redhat.com" <dledford@redhat.com>,
"davem@davemloft.net" <davem@davemloft.net>,
"jgg@ziepe.ca" <jgg@ziepe.ca>,
"leon@kernel.org" <leon@kernel.org>,
"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
Yishai Hadas <yishaih@mellanox.com>,
Mark Bloch <markb@mellanox.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Erez Shitrit <erezsh@mellanox.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
Alex Vesker <valex@mellanox.com>,
Ariel Levkovich <lariel@mellanox.com>,
Nathan Chancellor <natechancellor@gmail.com>
Subject: Re: [PATCH net-next 2/2] mlx5: fix type mismatch
Date: Tue, 10 Sep 2019 21:51:53 +0200 [thread overview]
Message-ID: <CAK8P3a3CFYrQ53as4+xAmxHfa67E25mhN8q1NZwhQ50iSavp+Q@mail.gmail.com> (raw)
In-Reply-To: <8311cb643690d3e80dddd5d4f2f6a7d923b9fbbc.camel@mellanox.com>
On Tue, Sep 10, 2019 at 7:56 PM Saeed Mahameed <saeedm@mellanox.com> wrote:
>
> On Mon, 2019-09-09 at 21:50 +0200, Arnd Bergmann wrote:
> > In mlx5, pointers to 'phys_addr_t' and 'u64' are mixed since the
> > addition
> > of the pool memory allocator, leading to incorrect behavior on 32-bit
> > architectures and this compiler warning:
> >
> > drivers/net/ethernet/mellanox/mlx5/core/steering/dr_icm_pool.c:121:8:
> > error: incompatible pointer types passing 'u64 *' (aka 'unsigned long
> > long *') to parameter of type 'phys_addr_t *' (aka 'unsigned int *')
> > [-Werror,-Wincompatible-pointer-types]
> > &icm_mr->dm.addr, &icm_mr-
> > >dm.obj_id);
> > ^~~~~~~~~~~~~~~~
> > include/linux/mlx5/driver.h:1092:39: note: passing argument to
> > parameter 'addr' here
> > u64 length, u16 uid, phys_addr_t *addr, u32
> > *obj_id);
> >
> > Change the code to use 'u64' consistently in place of 'phys_addr_t'
> > to
> > fix this. The alternative of using phys_addr_t more would require a
> > larger
> > rework.
> >
> > Fixes: 29cf8febd185 ("net/mlx5: DR, ICM pool memory allocator")
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> Hi Arnd,
>
> Nathan Chancellor Already submitted a patch to fix this and it is more
> minimal:
> https://patchwork.ozlabs.org/patch/1158177/
>
> I would like to use that patch if it is ok with you..
Yes, please do. I think I had tried something like that
initially and concluded it wasn't quite right before I went
into a different direction with my patch.
Looking at the two versions now, I also prefer Nathan's,
and I just confirmed that it fixes all the randconfig failures
I ran into.
Arnd
next prev parent reply other threads:[~2019-09-10 19:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-09 19:50 [PATCH net-next 1/2] mlx5: steering: use correct enum type Arnd Bergmann
2019-09-09 19:50 ` [PATCH net-next 2/2] mlx5: fix type mismatch Arnd Bergmann
2019-09-10 17:56 ` Saeed Mahameed
2019-09-10 19:51 ` Arnd Bergmann [this message]
2019-09-09 19:55 ` [PATCH net-next 1/2] mlx5: steering: use correct enum type Nathan Chancellor
2019-09-09 21:14 ` Nick Desaulniers
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=CAK8P3a3CFYrQ53as4+xAmxHfa67E25mhN8q1NZwhQ50iSavp+Q@mail.gmail.com \
--to=arnd@arndb.de \
--cc=davem@davemloft.net \
--cc=dledford@redhat.com \
--cc=erezsh@mellanox.com \
--cc=jgg@ziepe.ca \
--cc=lariel@mellanox.com \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=markb@mellanox.com \
--cc=natechancellor@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=saeedm@mellanox.com \
--cc=valex@mellanox.com \
--cc=yishaih@mellanox.com \
/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;
as well as URLs for NNTP newsgroup(s).