diff mbox series

net/mlx5e: Make use of pr_warn()

Message ID 20210809090843.2456-1-caihuoqing@baidu.com (mailing list archive)
State Awaiting Upstream
Delegated to: Netdev Maintainers
Headers show
Series net/mlx5e: Make use of pr_warn() | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Guessed tree name to be net-next
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cc_maintainers warning 2 maintainers not CCed: davem@davemloft.net kuba@kernel.org
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 warning WARNING: line length of 97 exceeds 80 columns
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/header_inline success Link

Commit Message

Cai,Huoqing Aug. 9, 2021, 9:08 a.m. UTC
to replace printk(KERN_WARNING ...) with pr_warn() kindly

Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Leon Romanovsky Aug. 9, 2021, 10:24 a.m. UTC | #1
On Mon, Aug 09, 2021 at 05:08:43PM +0800, Cai Huoqing wrote:
> to replace printk(KERN_WARNING ...) with pr_warn() kindly
> 
> Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
> ---
>  drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
> index e5c4344a114e..ab7c059e630f 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
> @@ -2702,7 +2702,7 @@ static int offload_pedit_fields(struct mlx5e_priv *priv,
>  		if (s_mask && a_mask) {
>  			NL_SET_ERR_MSG_MOD(extack,
>  					   "can't set and add to the same HW field");
> -			printk(KERN_WARNING "mlx5: can't set and add to the same HW field (%x)\n", f->field);
> +			pr_warn("mlx5: can't set and add to the same HW field (%x)\n", f->field);

It should be "mlx5_core_warn(priv->mdev, ....") and not pr_warn.

>  			return -EOPNOTSUPP;
>  		}
>  
> @@ -2741,8 +2741,8 @@ static int offload_pedit_fields(struct mlx5e_priv *priv,
>  		if (first < next_z && next_z < last) {
>  			NL_SET_ERR_MSG_MOD(extack,
>  					   "rewrite of few sub-fields isn't supported");
> -			printk(KERN_WARNING "mlx5: rewrite of few sub-fields (mask %lx) isn't offloaded\n",
> -			       mask);
> +			pr_warn("mlx5: rewrite of few sub-fields (mask %lx) isn't offloaded\n",
> +				mask);

ditto

Thanks

>  			return -EOPNOTSUPP;
>  		}
>  
> -- 
> 2.25.1
>
Saeed Mahameed Aug. 9, 2021, 8:37 p.m. UTC | #2
On Mon, 2021-08-09 at 13:24 +0300, Leon Romanovsky wrote:
> On Mon, Aug 09, 2021 at 05:08:43PM +0800, Cai Huoqing wrote:
> 

[...]

> > -                       printk(KERN_WARNING "mlx5: can't set and
> > add to the same HW field (%x)\n", f->field);
> > +                       pr_warn("mlx5: can't set and add to the
> > same HW field (%x)\n", f->field);
> 
> It should be "mlx5_core_warn(priv->mdev, ....") and not pr_warn.
> 

please use: netdev_warn(priv->netdev,

> >                         return -EOPNOTSUPP;
> >                 }
> >  
> > @@ -2741,8 +2741,8 @@ static int offload_pedit_fields(struct
> > mlx5e_priv *priv,
> >                 if (first < next_z && next_z < last) {
> >                         NL_SET_ERR_MSG_MOD(extack,
> >                                            "rewrite of few sub-
> > fields isn't supported");
> > -                       printk(KERN_WARNING "mlx5: rewrite of few
> > sub-fields (mask %lx) isn't offloaded\n",
> > -                              mask);
> > +                       pr_warn("mlx5: rewrite of few sub-fields
> > (mask %lx) isn't offloaded\n",
> > +                               mask);
> 
> ditto
> 

same
diff mbox series

Patch

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
index e5c4344a114e..ab7c059e630f 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
@@ -2702,7 +2702,7 @@  static int offload_pedit_fields(struct mlx5e_priv *priv,
 		if (s_mask && a_mask) {
 			NL_SET_ERR_MSG_MOD(extack,
 					   "can't set and add to the same HW field");
-			printk(KERN_WARNING "mlx5: can't set and add to the same HW field (%x)\n", f->field);
+			pr_warn("mlx5: can't set and add to the same HW field (%x)\n", f->field);
 			return -EOPNOTSUPP;
 		}
 
@@ -2741,8 +2741,8 @@  static int offload_pedit_fields(struct mlx5e_priv *priv,
 		if (first < next_z && next_z < last) {
 			NL_SET_ERR_MSG_MOD(extack,
 					   "rewrite of few sub-fields isn't supported");
-			printk(KERN_WARNING "mlx5: rewrite of few sub-fields (mask %lx) isn't offloaded\n",
-			       mask);
+			pr_warn("mlx5: rewrite of few sub-fields (mask %lx) isn't offloaded\n",
+				mask);
 			return -EOPNOTSUPP;
 		}