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: <ZcuRLBcXr7QQh3in@smile.fi.intel.com>
Date: Tue, 13 Feb 2024 17:56:28 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Tony Lindgren <tony@...mide.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Jiri Slaby <jirislaby@...nel.org>, Petr Mladek <pmladek@...e.com>,
	Steven Rostedt <rostedt@...dmis.org>,
	John Ogness <john.ogness@...utronix.de>,
	Sergey Senozhatsky <senozhatsky@...omium.org>,
	"David S . Miller" <davem@...emloft.net>,
	Dhruva Gole <d-gole@...com>,
	Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
	Johan Hovold <johan@...nel.org>,
	Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
	Vignesh Raghavendra <vigneshr@...com>, linux-kernel@...r.kernel.org,
	linux-serial@...r.kernel.org
Subject: Re: [PATCH v6 5/6] serial: core: Handle serial console options

On Tue, Feb 13, 2024 at 10:45:12AM +0200, Tony Lindgren wrote:
> In order to start moving the serial console quirks out of console_setup(),
> let's add parsing for the quirks to the serial core layer. We can use
> serial_base_add_one_prefcon() to handle the quirks.
> 
> Note that eventually we may want to set up driver specific console quirk
> handling for the serial port device drivers to use. But we need to figure
> out which driver(s) need to call the quirk. So for now, we just handle the
> sparc quirk directly.

..

> +static int serial_base_add_sparc_console(const char *dev_name, int idx)
> +{
> +	const char *name = NULL;

Seems like redundant assignment.

> +	switch (idx) {
> +	case 0:
> +		name = "ttya";
> +		break;
> +	case 1:
> +		name = "ttyb";
> +		break;
> +	default:
> +		return 0;
> +	}
> +
> +	return serial_base_add_one_prefcon(name, dev_name, idx);
> +}

..

> +	/* Handle ttyS specific options */
> +	if (str_has_prefix(name, "ttyS")) {

Recently I have learnt that we have strstarts() which returns boolean and suits
in cases like this. If you send a new version, you could switch to it.

> +	}

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ