netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Saeed Mahameed <saeed@kernel.org>
Cc: Jakub Kicinski <kuba@kernel.org>,
	Dan Carpenter <dan.carpenter@oracle.com>,
	Yevgeny Kliteynik <kliteyn@nvidia.com>,
	linux-rdma@vger.kernel.org, kernel-janitors@vger.kernel.org,
	linux-netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next] net/mlx5: Fix some error messages
Date: Tue, 27 Apr 2021 08:08:22 +0300	[thread overview]
Message-ID: <YIecRqSNq6aPiwVA@unreal> (raw)
In-Reply-To: <d2eca0209e76544b09021d94a47bc623ebfdc20c.camel@kernel.org>

On Mon, Apr 26, 2021 at 11:47:03AM -0700, Saeed Mahameed wrote:
> On Mon, 2021-04-26 at 09:33 -0700, Jakub Kicinski wrote:
> > On Sun, 25 Apr 2021 09:39:29 +0300 Leon Romanovsky wrote:
> > > > diff --git
> > > > a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads_termtb
> > > > l.c
> > > > b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads_termtb
> > > > l.c
> > > > index a81ece94f599..95f5c1a27718 100644
> > > > ---
> > > > a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads_termtb
> > > > l.c
> > > > +++
> > > > b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads_termtb
> > > > l.c
> > > > @@ -83,16 +83,16 @@ mlx5_eswitch_termtbl_create(struct
> > > > mlx5_core_dev *dev,
> > > >         ft_attr.autogroup.max_num_groups = 1;
> > > >         tt->termtbl =
> > > > mlx5_create_auto_grouped_flow_table(root_ns, &ft_attr);
> > > >         if (IS_ERR(tt->termtbl)) {
> > > > -               esw_warn(dev, "Failed to create termination table
> > > > (error %d)\n",
> > > > -                        IS_ERR(tt->termtbl));
> > > > +               esw_warn(dev, "Failed to create termination table
> > > > (error %ld)\n",
> > > > +                        PTR_ERR(tt->termtbl));
> > 
> > If these are error pointers - perhaps %pe?
> 
> no reason to use %pe, we know it is an err ptr at this point so just
> report PTR_ERR() 

Saeed,

%pe prints string "-EINVAL" instead of "22", which is better.

I didn't know about such format specifier.

Thanks

      reply	other threads:[~2021-04-27  5:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <YIKywXhusLj4cDFM@mwanda>
2021-04-25  6:39 ` [PATCH net-next] net/mlx5: Fix some error messages Leon Romanovsky
2021-04-26 16:33   ` Jakub Kicinski
2021-04-26 18:47     ` Saeed Mahameed
2021-04-27  5:08       ` Leon Romanovsky [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YIecRqSNq6aPiwVA@unreal \
    --to=leon@kernel.org \
    --cc=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kliteyn@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=saeed@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).