* [PATCH][next] IB/mlx5: remove redundant assignment of mdev
@ 2018-01-09 15:55 Colin King
2018-01-10 7:40 ` Leon Romanovsky
0 siblings, 1 reply; 3+ messages in thread
From: Colin King @ 2018-01-09 15:55 UTC (permalink / raw)
To: Matan Barak, Leon Romanovsky, Doug Ledford, Jason Gunthorpe,
linux-rdma
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The initial assignment to mdev is redundant as mdev is re-assigned
later and the first assigned value is never read. Remove this
redundant assignment.
Cleans up clang warning:
drivers/infiniband/hw/mlx5/main.c:359:24: warning: Value stored
to 'mdev' during its initialization is never read
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/infiniband/hw/mlx5/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index 5d6fba986fa5..91e6b42798e5 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -356,7 +356,7 @@ static int mlx5_query_port_roce(struct ib_device *device, u8 port_num,
struct ib_port_attr *props)
{
struct mlx5_ib_dev *dev = to_mdev(device);
- struct mlx5_core_dev *mdev = dev->mdev;
+ struct mlx5_core_dev *mdev;
struct net_device *ndev, *upper;
enum ib_mtu ndev_ib_mtu;
bool put_mdev = true;
--
2.15.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH][next] IB/mlx5: remove redundant assignment of mdev
2018-01-09 15:55 [PATCH][next] IB/mlx5: remove redundant assignment of mdev Colin King
@ 2018-01-10 7:40 ` Leon Romanovsky
[not found] ` <20180110074003.GG7368-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Leon Romanovsky @ 2018-01-10 7:40 UTC (permalink / raw)
To: Colin King
Cc: Matan Barak, Doug Ledford, Jason Gunthorpe, linux-rdma,
kernel-janitors, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 635 bytes --]
On Tue, Jan 09, 2018 at 03:55:43PM +0000, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The initial assignment to mdev is redundant as mdev is re-assigned
> later and the first assigned value is never read. Remove this
> redundant assignment.
>
> Cleans up clang warning:
> drivers/infiniband/hw/mlx5/main.c:359:24: warning: Value stored
> to 'mdev' during its initialization is never read
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/infiniband/hw/mlx5/main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Thanks,
Acked-by: Leon Romanovsky <leonro@mellanox.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH][next] IB/mlx5: remove redundant assignment of mdev
[not found] ` <20180110074003.GG7368-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
@ 2018-01-10 21:53 ` Doug Ledford
0 siblings, 0 replies; 3+ messages in thread
From: Doug Ledford @ 2018-01-10 21:53 UTC (permalink / raw)
To: Leon Romanovsky, Colin King
Cc: Matan Barak, Jason Gunthorpe, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
kernel-janitors-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 935 bytes --]
On Wed, 2018-01-10 at 09:40 +0200, Leon Romanovsky wrote:
> On Tue, Jan 09, 2018 at 03:55:43PM +0000, Colin King wrote:
> > From: Colin Ian King <colin.king@canonical.com>
> >
> > The initial assignment to mdev is redundant as mdev is re-assigned
> > later and the first assigned value is never read. Remove this
> > redundant assignment.
> >
> > Cleans up clang warning:
> > drivers/infiniband/hw/mlx5/main.c:359:24: warning: Value stored
> > to 'mdev' during its initialization is never read
> >
> > Signed-off-by: Colin Ian King <colin.king@canonical.com>
> > ---
> > drivers/infiniband/hw/mlx5/main.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
>
> Thanks,
> Acked-by: Leon Romanovsky <leonro@mellanox.com>
Thanks, applied to for-next.
--
Doug Ledford <dledford@redhat.com>
GPG KeyID: B826A3330E572FDD
Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-01-10 21:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-09 15:55 [PATCH][next] IB/mlx5: remove redundant assignment of mdev Colin King
2018-01-10 7:40 ` Leon Romanovsky
[not found] ` <20180110074003.GG7368-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2018-01-10 21:53 ` Doug Ledford
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox