lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YIecRqSNq6aPiwVA@unreal>
Date:   Tue, 27 Apr 2021 08:08:22 +0300
From:   Leon Romanovsky <leon@...nel.org>
To:     Saeed Mahameed <saeed@...nel.org>
Cc:     Jakub Kicinski <kuba@...nel.org>,
        Dan Carpenter <dan.carpenter@...cle.com>,
        Yevgeny Kliteynik <kliteyn@...dia.com>,
        linux-rdma@...r.kernel.org, kernel-janitors@...r.kernel.org,
        linux-netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next] net/mlx5: Fix some error messages

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ