* [PATCH][net-next][V2] net/mlx5: remove self-assignment on esw->dev
@ 2019-08-02 15:13 Colin King
2019-08-03 15:02 ` Parav Pandit
2019-08-06 21:01 ` Saeed Mahameed
0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2019-08-02 15:13 UTC (permalink / raw)
To: Saeed Mahameed, Leon Romanovsky, David S . Miller, netdev, linux-rdma
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
There is a self assignment of esw->dev to itself, clean this up by
removing it. Also make dev a const pointer.
Addresses-Coverity: ("Self assignment")
Fixes: 6cedde451399 ("net/mlx5: E-Switch, Verify support QoS element type")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
V2: make dev const
---
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
index f4ace5f8e884..de0894b695e3 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
@@ -1413,7 +1413,7 @@ static int esw_vport_egress_config(struct mlx5_eswitch *esw,
static bool element_type_supported(struct mlx5_eswitch *esw, int type)
{
- struct mlx5_core_dev *dev = esw->dev = esw->dev;
+ const struct mlx5_core_dev *dev = esw->dev;
switch (type) {
case SCHEDULING_CONTEXT_ELEMENT_TYPE_TSAR:
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH][net-next][V2] net/mlx5: remove self-assignment on esw->dev
2019-08-02 15:13 [PATCH][net-next][V2] net/mlx5: remove self-assignment on esw->dev Colin King
@ 2019-08-03 15:02 ` Parav Pandit
2019-08-06 21:01 ` Saeed Mahameed
1 sibling, 0 replies; 3+ messages in thread
From: Parav Pandit @ 2019-08-03 15:02 UTC (permalink / raw)
To: Colin King
Cc: Saeed Mahameed, Leon Romanovsky, David S . Miller, netdev,
linux-rdma, kernel-janitors, Linux Kernel Mailing List
On Sat, Aug 3, 2019 at 7:54 PM Colin King <colin.king@canonical.com> wrote:
>
> From: Colin Ian King <colin.king@canonical.com>
>
> There is a self assignment of esw->dev to itself, clean this up by
> removing it. Also make dev a const pointer.
>
> Addresses-Coverity: ("Self assignment")
> Fixes: 6cedde451399 ("net/mlx5: E-Switch, Verify support QoS element type")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>
> V2: make dev const
>
> ---
> drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
> index f4ace5f8e884..de0894b695e3 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
> @@ -1413,7 +1413,7 @@ static int esw_vport_egress_config(struct mlx5_eswitch *esw,
>
> static bool element_type_supported(struct mlx5_eswitch *esw, int type)
> {
> - struct mlx5_core_dev *dev = esw->dev = esw->dev;
> + const struct mlx5_core_dev *dev = esw->dev;
>
> switch (type) {
> case SCHEDULING_CONTEXT_ELEMENT_TYPE_TSAR:
> --
> 2.20.1
>
Reviewed-by: Parav Pandit <parav@mellanox.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH][net-next][V2] net/mlx5: remove self-assignment on esw->dev
2019-08-02 15:13 [PATCH][net-next][V2] net/mlx5: remove self-assignment on esw->dev Colin King
2019-08-03 15:02 ` Parav Pandit
@ 2019-08-06 21:01 ` Saeed Mahameed
1 sibling, 0 replies; 3+ messages in thread
From: Saeed Mahameed @ 2019-08-06 21:01 UTC (permalink / raw)
To: linux-rdma, colin.king, davem, leon, netdev; +Cc: kernel-janitors, linux-kernel
On Fri, 2019-08-02 at 16:13 +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> There is a self assignment of esw->dev to itself, clean this up by
> removing it. Also make dev a const pointer.
>
> Addresses-Coverity: ("Self assignment")
> Fixes: 6cedde451399 ("net/mlx5: E-Switch, Verify support QoS element
> type")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>
> V2: make dev const
>
Applied to mlx5-next.
Thanks,
Saeed.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-08-06 21:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-02 15:13 [PATCH][net-next][V2] net/mlx5: remove self-assignment on esw->dev Colin King
2019-08-03 15:02 ` Parav Pandit
2019-08-06 21:01 ` Saeed Mahameed
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).