]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Always use container_of to find mdev pointer from clock struct
authorEran Ben Elisha <eranbe@mellanox.com>
Wed, 13 May 2020 08:06:47 +0000 (11:06 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Tue, 15 Sep 2020 18:59:49 +0000 (11:59 -0700)
commit2a529eba414413937cee58336ffa71a758ed51f3
treefd6a751f5417628bdeecb7a87d9c149099642633
parent0d78359e717bc34db87cd0a6ed2bb4e020827245
net/mlx5: Always use container_of to find mdev pointer from clock struct

Clock struct is part of struct mlx5_core_dev. Code was inconsistent, on
some cases used container_of and on another used clock->mdev.

Align code to use container_of amd remove clock->mdev pointer.
While here, fix reverse xmas tree coding style.

Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Reviewed-by: Moshe Shemesh <moshe@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
include/linux/mlx5/driver.h