From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 34A87317161 for ; Thu, 23 Apr 2026 14:16:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=216.40.44.15 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776953819; cv=none; b=apUVvXSquYwAOH40F3QXGxtmAVdzgR+nUjTaNGsDtciV1vn8iU0/G103r/sQLuWkf09pscp3IaQWQ/WMwetWvllupGKycRCXau0CgWyHKOnXDVCxEKUrmu5fHiNB0eSOj7XWaiDZXWEBSayvNrYcGEC/7lovaSsPtPbeSBHeJ4E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776953819; c=relaxed/simple; bh=Q+4olKm1EiqFamSJMaH7cCqucQkMHyajxSOPeDAKeBs=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=o+KaLrjVOhH38uZXM96yJ+B0+xGa/5n7Ew55UejJhRDawh0bGflVpHCcX7dtYFiR0fX6jGIAA3oEwkhgSOTjep4FMR0zj6vIZ6cAjEU0ZrN+sNt0Ozd4s0hPropGJibYX54P3H41s//bst72VyltSaGYCBkpGw+oYxlmzBnLx/g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=goodmis.org; spf=pass smtp.mailfrom=goodmis.org; arc=none smtp.client-ip=216.40.44.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=goodmis.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=goodmis.org Received: from omf02.hostedemail.com (lb01b-stub [10.200.18.250]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 8DAEA401E7; Thu, 23 Apr 2026 14:16:48 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: rostedt@goodmis.org) by omf02.hostedemail.com (Postfix) with ESMTPA id 9F1D180022; Thu, 23 Apr 2026 14:16:45 +0000 (UTC) Date: Thu, 23 Apr 2026 10:16:48 -0400 From: Steven Rostedt To: Petr Mladek Cc: John Ogness , Sergey Senozhatsky , Marcos Paulo de Souza , Chris Down , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/9] printk: Rename struct console_cmdline to preferred_console Message-ID: <20260423101648.7f048575@gandalf.local.home> In-Reply-To: <20260423130015.85175-2-pmladek@suse.com> References: <20260423130015.85175-1-pmladek@suse.com> <20260423130015.85175-2-pmladek@suse.com> X-Mailer: Claws Mail 3.20.0git84 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Stat-Signature: gp5p44a63z8ngsaeey8899girjisg9w8 X-Rspamd-Server: rspamout08 X-Rspamd-Queue-Id: 9F1D180022 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Session-ID: U2FsdGVkX1+UmOkEjwWpm51LG6qw7gOWo2CZ3MVt/nk= X-HE-Tag: 1776953805-689745 X-HE-Meta: U2FsdGVkX1+Qa0BpIRb3/P8Q3X1Hn2xmxzdOZS77EQrsws+71fH3bN0D3WoT8P4rAGvR6ODM60wKQbYehONOFcK8fTTbKW5h0LuDCkLUFed0eSL126kfEFwwUQhUr2KbZ1jNRadJaahK71S2dFaTKIQCLSLUx3Ba0VIyCbmHePBbDGQJUQqLFcfo5BiS0X0/kf/RlbjjkuWcNWKcCvvh4twrifvU9VazUXIc4Ucm+xZVUGwcuznWfNchtcmjCj1/13Xg1LaJpzFEUe5EXCX0nsekUbKIYk/uUi/b3nDA3HV5dYBfUPvXGv1wp7c8W+PyogehkUcvgnByUbQVtrwNhAVOB3HM9rdoICNPqY9HQ08VhEabJJJTli0i7dud9Lc8s8z7OhbxSUqVLpt0Ph5J8fBkRXf4DcTk On Thu, 23 Apr 2026 15:00:06 +0200 Petr Mladek wrote: > The structure 'console_cmdline' was originally intended to store details > about consoles defined on the kernel command line. However, its usage > has since expanded; it now stores information for consoles preferred > via SPCR, device tree, or by particular platforms, e.g. XEN. > > The current naming is misleading as it implies the configuration only > originates from the command line. > > Rename the structure and associated artifacts to better reflect their > current purpose, for example: > > - struct console_cmdline c -> struct preferred_console pc > - console_cmdline[] -> preferred_consoles[] > - console_cmdline.h -> console_register.h > - c -> pc Nice. > > Additionally, renaming the header file to console_register.h would > eventually allow to decouple console registration logic from > the monolithic printk.c. > > Finally, renaming the local variable from "c" to "pc" helps to distinguish > it from struct console variables. Note that "c" is used for struct console > in some code, for example see vt_console_device() function definition. > > The patch should not change the existing behaivor. I believe the phrase is: "No functional changes" ;-) > > Signed-off-by: Petr Mladek > Acked-by: Chris Down > Acked-by: Marcos Paulo de Souza > --- > @@ -2624,8 +2624,10 @@ __setup("console_msg_format=", console_msg_format_setup); > */ > static int __init console_setup(char *str) > { > - static_assert(sizeof(console_cmdline[0].devname) >= sizeof(console_cmdline[0].name) + 4); > - char buf[sizeof(console_cmdline[0].devname)]; > + static_assert(sizeof(preferred_consoles[0].devname) >= > + sizeof(preferred_consoles[0].name) + 4); Hmm with the line break and you adding a space before the declarations; If this is going to change, might as well move it below the declarations as it is a compile time check, and the order doesn't matter. > + > + char buf[sizeof(preferred_consoles[0].devname)]; > char *brl_options = NULL; > char *ttyname = NULL; > char *devname = NULL; -- Steve