lkml.org 
[lkml]   [2023]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 3/3] serial: core: Move console character device handling from printk
* Andy Shevchenko <andriy.shevchenko@intel.com> [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

\
 
 \ /
  Last update: 2023-11-22 07:24    [W:0.084 / U:1.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site