Linux-RDMA Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] net/mlx5: Declare 'rt' as corresponding enum type
@ 2019-09-10  9:27 Austin Kim
  2019-09-10 17:59 ` Saeed Mahameed
  0 siblings, 1 reply; 3+ messages in thread
From: Austin Kim @ 2019-09-10  9:27 UTC (permalink / raw)
  To: saeedm, leon
  Cc: davem, valex, erezsh, markb, netdev, linux-rdma, linux-kernel,
	austindh.kim

When building kernel with clang, we can observe below warning message:

drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c:1080:9:
warning: implicit conversion from enumeration type 'enum mlx5_reformat_ctx_type'
to different enumeration type 'enum mlx5dr_action_type' [-   Wenum-conversion]
	rt = MLX5_REFORMAT_TYPE_L2_TO_L2_TUNNEL;
       			  ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c:1082:9:
warning: implicit conversion from enumeration type 'enum mlx5_reformat_ctx_type'
to different enumeration type 'enum mlx5dr_action_type' [-   Wenum-conversion]
	rt = MLX5_REFORMAT_TYPE_L2_TO_L3_TUNNEL;
        ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c:1084:51:
warning: implicit conversion from enumeration type 'enum mlx5dr_action_type'
to different enumeration type 'enum mlx5_reformat_ctx_type' [-  Wenum-conversion]
	ret = mlx5dr_cmd_create_reformat_ctx(dmn->mdev, rt, data_sz, data,
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~            ^~

Declare 'rt' as corresponding enum mlx5_reformat_ctx_type type.

Signed-off-by: Austin Kim <austindh.kim@gmail.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c
index a02f87f..7d81a77 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c
@@ -1074,7 +1074,7 @@ dr_action_create_reformat_action(struct mlx5dr_domain *dmn,
 	case DR_ACTION_TYP_L2_TO_TNL_L2:
 	case DR_ACTION_TYP_L2_TO_TNL_L3:
 	{
-		enum mlx5dr_action_type rt;
+		enum mlx5_reformat_ctx_type rt;
 
 		if (action->action_type == DR_ACTION_TYP_L2_TO_TNL_L2)
 			rt = MLX5_REFORMAT_TYPE_L2_TO_L2_TUNNEL;
-- 
2.6.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] net/mlx5: Declare 'rt' as corresponding enum type
  2019-09-10  9:27 [PATCH] net/mlx5: Declare 'rt' as corresponding enum type Austin Kim
@ 2019-09-10 17:59 ` Saeed Mahameed
  2019-09-11 11:39   ` Austin Kim
  0 siblings, 1 reply; 3+ messages in thread
From: Saeed Mahameed @ 2019-09-10 17:59 UTC (permalink / raw)
  To: austindh.kim, leon
  Cc: linux-rdma, linux-kernel, Mark Bloch, davem, netdev, Alex Vesker,
	Erez Shitrit

On Tue, 2019-09-10 at 18:27 +0900, Austin Kim wrote:
> When building kernel with clang, we can observe below warning
> message:
> 
> drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c:1080:9:
> warning: implicit conversion from enumeration type 'enum
> mlx5_reformat_ctx_type'
> to different enumeration type 'enum mlx5dr_action_type' [-   Wenum-
> conversion]
> 	rt = MLX5_REFORMAT_TYPE_L2_TO_L2_TUNNEL;
>        			  ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c:1082:9:
> warning: implicit conversion from enumeration type 'enum
> mlx5_reformat_ctx_type'
> to different enumeration type 'enum mlx5dr_action_type' [-   Wenum-
> conversion]
> 	rt = MLX5_REFORMAT_TYPE_L2_TO_L3_TUNNEL;
>         ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c:1084:51:
> warning: implicit conversion from enumeration type 'enum
> mlx5dr_action_type'
> to different enumeration type 'enum mlx5_reformat_ctx_type'
> [-  Wenum-conversion]
> 	ret = mlx5dr_cmd_create_reformat_ctx(dmn->mdev, rt, data_sz,
> data,
>          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~            ^~
> 
> Declare 'rt' as corresponding enum mlx5_reformat_ctx_type type.
> 
> Signed-off-by: Austin Kim <austindh.kim@gmail.com>
Hi Austin, Thanks for the patch:

We already have a similar patch queued for submission.
https://patchwork.ozlabs.org/patch/1158175/

> ---
>  drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git
> a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c
> b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c
> index a02f87f..7d81a77 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c
> @@ -1074,7 +1074,7 @@ dr_action_create_reformat_action(struct
> mlx5dr_domain *dmn,
>  	case DR_ACTION_TYP_L2_TO_TNL_L2:
>  	case DR_ACTION_TYP_L2_TO_TNL_L3:
>  	{
> -		enum mlx5dr_action_type rt;
> +		enum mlx5_reformat_ctx_type rt;
>  
>  		if (action->action_type == DR_ACTION_TYP_L2_TO_TNL_L2)
>  			rt = MLX5_REFORMAT_TYPE_L2_TO_L2_TUNNEL;

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] net/mlx5: Declare 'rt' as corresponding enum type
  2019-09-10 17:59 ` Saeed Mahameed
@ 2019-09-11 11:39   ` Austin Kim
  0 siblings, 0 replies; 3+ messages in thread
From: Austin Kim @ 2019-09-11 11:39 UTC (permalink / raw)
  To: Saeed Mahameed
  Cc: leon, linux-rdma, linux-kernel, Mark Bloch, davem, netdev,
	Alex Vesker, Erez Shitrit

It is good to hear that similar patch was submitted.
Thanks for notification.

Thanks,
Austin Kim

2019년 9월 11일 (수) 오전 2:59, Saeed Mahameed <saeedm@mellanox.com>님이 작성:
>
> On Tue, 2019-09-10 at 18:27 +0900, Austin Kim wrote:
> > When building kernel with clang, we can observe below warning
> > message:
> >
> > drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c:1080:9:
> > warning: implicit conversion from enumeration type 'enum
> > mlx5_reformat_ctx_type'
> > to different enumeration type 'enum mlx5dr_action_type' [-   Wenum-
> > conversion]
> >       rt = MLX5_REFORMAT_TYPE_L2_TO_L2_TUNNEL;
> >                                 ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c:1082:9:
> > warning: implicit conversion from enumeration type 'enum
> > mlx5_reformat_ctx_type'
> > to different enumeration type 'enum mlx5dr_action_type' [-   Wenum-
> > conversion]
> >       rt = MLX5_REFORMAT_TYPE_L2_TO_L3_TUNNEL;
> >         ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c:1084:51:
> > warning: implicit conversion from enumeration type 'enum
> > mlx5dr_action_type'
> > to different enumeration type 'enum mlx5_reformat_ctx_type'
> > [-  Wenum-conversion]
> >       ret = mlx5dr_cmd_create_reformat_ctx(dmn->mdev, rt, data_sz,
> > data,
> >          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~            ^~
> >
> > Declare 'rt' as corresponding enum mlx5_reformat_ctx_type type.
> >
> > Signed-off-by: Austin Kim <austindh.kim@gmail.com>
> Hi Austin, Thanks for the patch:
>
> We already have a similar patch queued for submission.
> https://patchwork.ozlabs.org/patch/1158175/
>
> > ---
> >  drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git
> > a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c
> > b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c
> > index a02f87f..7d81a77 100644
> > --- a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c
> > +++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c
> > @@ -1074,7 +1074,7 @@ dr_action_create_reformat_action(struct
> > mlx5dr_domain *dmn,
> >       case DR_ACTION_TYP_L2_TO_TNL_L2:
> >       case DR_ACTION_TYP_L2_TO_TNL_L3:
> >       {
> > -             enum mlx5dr_action_type rt;
> > +             enum mlx5_reformat_ctx_type rt;
> >
> >               if (action->action_type == DR_ACTION_TYP_L2_TO_TNL_L2)
> >                       rt = MLX5_REFORMAT_TYPE_L2_TO_L2_TUNNEL;

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-10  9:27 [PATCH] net/mlx5: Declare 'rt' as corresponding enum type Austin Kim
2019-09-10 17:59 ` Saeed Mahameed
2019-09-11 11:39   ` Austin Kim

Linux-RDMA Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-rdma/0 linux-rdma/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-rdma linux-rdma/ https://lore.kernel.org/linux-rdma \
		linux-rdma@vger.kernel.org linux-rdma@archiver.kernel.org
	public-inbox-index linux-rdma

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-rdma


AGPL code for this site: git clone https://public-inbox.org/ public-inbox