Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1604192

Re: [PATCH v7 3/3] printk: fix double printing with earlycon

From Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH v7 3/3] printk: fix double printing with earlycon
Date 2017-03-20 07:20 +0100
Message-ID <tmYPE-Db-13@gated-at.bofh.it> (permalink)
References <tlevv-6jJ-5@gated-at.bofh.it> <tm0qt-7b2-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hello,

On (03/17/17 16:43), Aleksey Makarov wrote:
[..]
> +static void ensure_preferred_is_last(int i)
> +{
> +	int last;
> +
> +	for (last = MAX_CMDLINECONSOLES - 1;
> +	     last >= 0 && !console_cmdline[last].name[0];
> +	     last--)
> +		;
> +
> +	BUG_ON(last < 0);

let's not panic().


a nitpick, console swap can be done as

	if (i != last)
		swap(console_cmdline[i], console_cmdline[last]);
	preferred_console = last;


		-ss

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v5 0/3] printk: fix double printing with earlycon Aleksey Makarov <aleksey.makarov@linaro.org> - 2017-03-15 11:40 +0100
  [PATCH v6 3/3] printk: fix double printing with earlycon Aleksey Makarov <aleksey.makarov@linaro.org> - 2017-03-17 12:50 +0100
    Re: [PATCH v6 3/3] printk: fix double printing with earlycon Aleksey Makarov <aleksey.makarov@linaro.org> - 2017-03-17 14:50 +0100
  [PATCH v7 3/3] printk: fix double printing with earlycon Aleksey Makarov <aleksey.makarov@linaro.org> - 2017-03-17 14:50 +0100
    Re: [PATCH v7 3/3] printk: fix double printing with earlycon Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-03-20 07:20 +0100
  [PATCH v8 3/3] printk: fix double printing with earlycon Aleksey Makarov <aleksey.makarov@linaro.org> - 2017-03-20 11:10 +0100
    Re: [PATCH v8 3/3] printk: fix double printing with earlycon Petr Mladek <pmladek@suse.com> - 2017-03-27 16:20 +0200
      Re: [PATCH v8 3/3] printk: fix double printing with earlycon Aleksey Makarov <aleksey.makarov@linaro.org> - 2017-03-27 18:30 +0200

csiph-web