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: <CAAXyoMPFDRyKqZiFsH7cCQzBg6z5KO5mUpLf8jjpCcQhD09-zw@mail.gmail.com>
Date: Mon, 19 Jan 2026 03:24:44 +0800
From: Yangfl <mmyangfl@...il.com>
To: Andrew Lunn <andrew@...n.ch>
Cc: netdev@...r.kernel.org, Vladimir Oltean <olteanv@...il.com>, 
	"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, 
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v6 2/3] net: dsa: yt921x: Return early for failed
 MIB read

On Mon, Jan 19, 2026 at 12:06 AM Andrew Lunn <andrew@...n.ch> wrote:
>
> On Sun, Jan 18, 2026 at 09:30:15AM +0800, David Yang wrote:
> > This patch does not change anything effectively, but serves as a
> > prerequisite for another patch.
> >
> > Signed-off-by: David Yang <mmyangfl@...il.com>
> > ---
> >  drivers/net/dsa/yt921x.c | 11 +++++++----
> >  1 file changed, 7 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/net/dsa/yt921x.c b/drivers/net/dsa/yt921x.c
> > index 5e4e8093ba16..fe08385445d2 100644
> > --- a/drivers/net/dsa/yt921x.c
> > +++ b/drivers/net/dsa/yt921x.c
> > @@ -707,6 +707,12 @@ static int yt921x_read_mib(struct yt921x_priv *priv, int port)
> >               WRITE_ONCE(*valp, val);
> >       }
> >
> > +     if (res) {
> > +             dev_err(dev, "Failed to %s port %d: %i\n", "read stats for",
> > +                     port, res);
> > +             return res;
> > +     }
>
> I know you are just moving code around, so i can understand a straight
> cut/paste.
>
> However, when i look at the code, what is the point of %s and the
> constant "read stats for"?
>
>         Andrew

The error format is used many times across the file, so using the same
string helps reduce the data size a bit.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ