From patchwork Thu Mar 2 13:11:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksey Makarov X-Patchwork-Id: 94781 Delivered-To: patch@linaro.org Received: by 10.140.82.71 with SMTP id g65csp156189qgd; Thu, 2 Mar 2017 05:15:48 -0800 (PST) X-Received: by 10.98.91.131 with SMTP id p125mr15526219pfb.165.1488460548109; Thu, 02 Mar 2017 05:15:48 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p67si7435871pfb.136.2017.03.02.05.15.47; Thu, 02 Mar 2017 05:15:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753019AbdCBNPr (ORCPT + 25 others); Thu, 2 Mar 2017 08:15:47 -0500 Received: from mail-lf0-f44.google.com ([209.85.215.44]:33507 "EHLO mail-lf0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752981AbdCBNPn (ORCPT ); Thu, 2 Mar 2017 08:15:43 -0500 Received: by mail-lf0-f44.google.com with SMTP id a6so33462564lfa.0 for ; Thu, 02 Mar 2017 05:15:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=++Kkz3yyivhUg6/ctQuvIzYkzCf9aB0zsZNM8hsCKBk=; b=YApvBanBTDuSyMtICZkNXCkNi1wHtxz0HRrYdui6U5AevAsQ0rFtNCnHQW9J2SKJ6w stZhIcym7KD7y0ihUftsc0ArAmekMM+yop35fdvapFDY7tm4vifBi8L4KkmL80njwkHC +mTdF9RlWkpYW9RzRGJH00gRhiVf9BNo9o9H0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=++Kkz3yyivhUg6/ctQuvIzYkzCf9aB0zsZNM8hsCKBk=; b=XL8cKrUWDr4eGgPg8YZCta3Kv5WlX4hCSBkA0mOY+mM0VHpgJBHb9zD53svCMgzq0a 7rMVy958YnyhLhOuM3mCpdDfm+Fx0OrWFmJfE4YrMRqgzc/EPLJA5GUKHGct23r2AieS 3nPEeEQvk7rOzumZ0MAZAIUZEvayRNqG/KhCNJUlGTjCbSkauoQoj1uKqVThJWM/f9Ce wQR8TuXBJmn4zk/qBw1A5dM3WYhl4NhY4Jvc8uCy4cpox7CWm2fnuroO0IW+p6Rs5L5m TWrUOYvFeILkUW6/aPwc4nuucnCAhP7tTN3yBNfqRhaHSfcYwYKLGjz4layJ/yFl/wYx No4Q== X-Gm-Message-State: AMke39lzeWhCWnb9UlyUbWd0/nWmIj1NioQmrNVwoscZaJhrk0yYYMb/xXci+Hhs0+eqlcNx X-Received: by 10.25.19.194 with SMTP id 63mr4557693lft.144.1488460523681; Thu, 02 Mar 2017 05:15:23 -0800 (PST) Received: from localhost.localdomain (nivc-213.auriga.ru. [80.240.102.213]) by smtp.gmail.com with ESMTPSA id c69sm1696062lfe.23.2017.03.02.05.15.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Mar 2017 05:15:23 -0800 (PST) From: Aleksey Makarov To: linux-serial@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Aleksey Makarov , Sudeep Holla , Greg Kroah-Hartman , Peter Hurley , Jiri Slaby , Robin Murphy , Steven Rostedt , "Nair, Jayachandran" , Petr Mladek , Sergey Senozhatsky Subject: [PATCH v2 2/3] printk: rename selected_console -> preferred_console Date: Thu, 2 Mar 2017 16:11:33 +0300 Message-Id: <20170302131153.22733-3-aleksey.makarov@linaro.org> X-Mailer: git-send-email 2.11.1 In-Reply-To: <20170302131153.22733-1-aleksey.makarov@linaro.org> References: <20170302131153.22733-1-aleksey.makarov@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The variable selected_console is set in __add_preferred_console() to point to the last console parameter that was added to the console_cmdline array. Rename it to preferred_console so that the name reflects the usage. Suggested-by: Peter Hurley Signed-off-by: Aleksey Makarov --- kernel/printk/printk.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) -- 2.11.1 Acked-by: Steven Rostedt (VMware) Acked-by: Petr Mladek diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index 3c2234f21291..ed2a9b31f214 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -267,7 +267,7 @@ static struct console *exclusive_console; static struct console_cmdline console_cmdline[MAX_CMDLINECONSOLES]; -static int selected_console = -1; +static int preferred_console = -1; int console_set_on_cmdline; EXPORT_SYMBOL(console_set_on_cmdline); @@ -1907,14 +1907,14 @@ static int __add_preferred_console(char *name, int idx, char *options, i++, c++) { if (strcmp(c->name, name) == 0 && c->index == idx) { if (!brl_options) - selected_console = i; + preferred_console = i; return 0; } } if (i == MAX_CMDLINECONSOLES) return -E2BIG; if (!brl_options) - selected_console = i; + preferred_console = i; strlcpy(c->name, name, sizeof(c->name)); c->options = options; braille_set_options(c, brl_options); @@ -2433,7 +2433,7 @@ void register_console(struct console *newcon) bcon = console_drivers; if (!has_preferred || bcon || !console_drivers) - has_preferred = selected_console >= 0; + has_preferred = preferred_console >= 0; /* * See if we want to use this console driver. If we @@ -2481,7 +2481,7 @@ void register_console(struct console *newcon) } newcon->flags |= CON_ENABLED; - if (i == selected_console) { + if (i == preferred_console) { newcon->flags |= CON_CONSDEV; has_preferred = true; }