Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net/mlx5: Remove unused MLX5_*_DOORBELL_LOCK macros

MLX5_*_DOORBELL_LOCK macros provided a way to avoid locking for
mlx5_write64 on 64-bit platforms where it's not necessary. Currently all
calls to mlx5_write64 don't use a spinlock, so the macros became unused.

Signed-off-by: Maxim Mikityanskiy <maximmi@mellanox.com>
Reviewed-by: Eran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>

authored by

Maxim Mikityanskiy and committed by
Saeed Mahameed
38702cce 37b6bb77

-8
-8
include/linux/mlx5/doorbell.h
··· 42 42 * PCI so we won't worry about it. 43 43 */ 44 44 45 - #define MLX5_DECLARE_DOORBELL_LOCK(name) 46 - #define MLX5_INIT_DOORBELL_LOCK(ptr) do { } while (0) 47 - #define MLX5_GET_DOORBELL_LOCK(ptr) (NULL) 48 - 49 45 static inline void mlx5_write64(__be32 val[2], void __iomem *dest, 50 46 spinlock_t *doorbell_lock) 51 47 { ··· 54 58 * BITS_PER_LONG is 32 -- there's no portable way to do atomic 64-bit 55 59 * MMIO writes. 56 60 */ 57 - 58 - #define MLX5_DECLARE_DOORBELL_LOCK(name) spinlock_t name; 59 - #define MLX5_INIT_DOORBELL_LOCK(ptr) spin_lock_init(ptr) 60 - #define MLX5_GET_DOORBELL_LOCK(ptr) (ptr) 61 61 62 62 static inline void mlx5_write64(__be32 val[2], void __iomem *dest, 63 63 spinlock_t *doorbell_lock)