Re: [PATCH v3 3/3] serial: core: Move console character device handling from printk

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

 



* Andy Shevchenko <andriy.shevchenko@xxxxxxxxx> [231121 18:00]:
> On Tue, Nov 21, 2023 at 01:31:57PM +0200, Tony Lindgren wrote:
> > +	ret = add_preferred_console_match(name, drv->dev_name, port->line);
> > +	if (ret && ret != -ENOENT)
> > +		return ret;
> > +
> > +	return 0;
> 
> 2nd time and so on, perhaps deserves a helper?
> 
> static inline int add_preferred_console...(...)
> {
> 	int ret;
> 
> 	ret = add_preferred_console_match(name, drv->dev_name, port->line);
> 	if (ret == -ENOENT)
> 		return 0;
> 	return ret;
> 
> }
> 
> ?

Yes good idea, thanks.

Tony




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux