Message ID | 20201206235919.393158-2-vladimir.oltean@nxp.com (mailing list archive) |
---|---|
State | RFC |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | Make .ndo_get_stats64 sleepable | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Clearly marked for net-next |
netdev/subject_prefix | success | Link |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 0 this patch: 0 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 10 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 0 this patch: 0 |
netdev/header_inline | success | Link |
netdev/stable | success | Stable not CCed |
On Mon, Dec 07, 2020 at 01:59:07AM +0200, Vladimir Oltean wrote: > The dev_base_lock does not protect dev->dev_addr, so it serves no > purpose here. > > Cc: Leon Romanovsky <leon@kernel.org> > Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> > --- > drivers/infiniband/hw/mlx4/main.c | 3 --- > 1 file changed, 3 deletions(-) Agree with the description, most likely the authors wanted to ensure that "dev" doesn't disappear, but it is not correct way to do and not needed in that flow. Thanks for the patch, Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c index f0864f40ea1a..e3cd402c079a 100644 --- a/drivers/infiniband/hw/mlx4/main.c +++ b/drivers/infiniband/hw/mlx4/main.c @@ -2265,10 +2265,7 @@ static void mlx4_ib_update_qps(struct mlx4_ib_dev *ibdev, u64 release_mac = MLX4_IB_INVALID_MAC; struct mlx4_ib_qp *qp; - read_lock(&dev_base_lock); new_smac = mlx4_mac_to_u64(dev->dev_addr); - read_unlock(&dev_base_lock); - atomic64_set(&ibdev->iboe.mac[port - 1], new_smac); /* no need for update QP1 and mac registration in non-SRIOV */
The dev_base_lock does not protect dev->dev_addr, so it serves no purpose here. Cc: Leon Romanovsky <leon@kernel.org> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> --- drivers/infiniband/hw/mlx4/main.c | 3 --- 1 file changed, 3 deletions(-)