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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231020081847.zgpez76utrexix24@skbuf>
Date: Fri, 20 Oct 2023 11:18:47 +0300
From: Vladimir Oltean <olteanv@...il.com>
To: "Russell King (Oracle)" <linux@...linux.org.uk>
Cc: Oleksij Rempel <o.rempel@...gutronix.de>,
	"David S. Miller" <davem@...emloft.net>,
	Andrew Lunn <andrew@...n.ch>, Eric Dumazet <edumazet@...gle.com>,
	Florian Fainelli <f.fainelli@...il.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Woojung Huh <woojung.huh@...rochip.com>,
	Arun Ramadoss <arun.ramadoss@...rochip.com>,
	Conor Dooley <conor+dt@...nel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
	Rob Herring <robh+dt@...nel.org>, kernel@...gutronix.de,
	linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
	UNGLinuxDriver@...rochip.com, devicetree@...r.kernel.org
Subject: Re: [PATCH net-next v6 5/9] net: dsa: microchip: ksz9477: Add Wake
 on Magic Packet support

On Thu, Oct 19, 2023 at 07:17:32PM +0100, Russell King (Oracle) wrote:
> On Thu, Oct 19, 2023 at 08:29:53PM +0300, Vladimir Oltean wrote:
> > > -	dev_dbg(dev->dev, "Wake event on port %d due to: %s %s\n", port,
> > > +	dev_dbg(dev->dev, "Wake event on port %d due to: %s %s %s\n", port,
> > > +		pme_status & PME_WOL_MAGICPKT ? "\"Magic Packet\"" : "",
> > >  		pme_status & PME_WOL_LINKUP ? "\"Link Up\"" : "",
> > >  		pme_status & PME_WOL_ENERGY ? "\"Enery detect\"" : "");
> > 
> > Trivial: if you format the printf string as %s%s%s and the arguments as
> > "\"Magic Packet\" " : "", then the printed line won't have a trailing
> > space at the end.
> 
> Sadly, it still will. The best solution is to prepend the space
> character to each entry in the "list" and remove the space characters
> after the : in the format string thusly:
> 
> 	dev_dbg(dev->dev, "Wake event on port %d due to:%s%s%s\n", port,
> 		pme_status & PME_WOL_MAGICPKT ? " \"Magic Packet\"" : "",
> 		pme_status & PME_WOL_LINKUP ? " \"Link Up\"" : "",
> 		pme_status & PME_WOL_ENERGY ? " \"Enery detect\"" : "");

Thanks for correcting me.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ