Re: [PATCH net-next v6 5/9] net: dsa: microchip: ksz9477: Add Wake on Magic Packet support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux