Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1099598ybk; Wed, 20 May 2020 21:42:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz738ro+POe6ekKhAwnkegoVLrgCAqSNQii2mLkwD6+U3xd51xkbGarnsO8cl5gzhdCV9Wt X-Received: by 2002:a05:6402:b2c:: with SMTP id bo12mr6562200edb.274.1590036161621; Wed, 20 May 2020 21:42:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590036161; cv=none; d=google.com; s=arc-20160816; b=vXHXPHApeivE1cdEJieh4aYqwbkC2vVJXmdxfx8Je4TaAmVL2lIDHoNtaMANI4Zi9j SMRexudzrOxu5rCBYsV31TcuqVEWu/PdWdPghHOw9jJFMYyY3SsxDgq4wytqabZGLhnc FqmoJ04BzwoN8IK9xui2e4MFiF1SVWG516BnfReXAWwQW9KpLLe0pXDIlJVGdetUDnvv V1hqxy4zGlY3G0HggDXyW5KPxpVwGoe0H7mlLOZnuYWD3+6CTz5wMIQ60JyO5rMxkGIJ t8UYn6vO3/d0hGN3e1H0+AYRvsG9EFGyClEef4C4yoa+ojnigCroAZkmYlScH8zt5UqV YPAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=0dBM6Jf9laYSqCn1u4fza8WQwxPjuR9/y0IS0rwQhLc=; b=Zb5zrBEJH+dAY93FkQjzSCkEHlxv0E/8YTZ1gIARhV8s9z3sUXZsgf2UH58v38/xhK gkMf6s9q0hHXbLEZBcb14Les2BmfKHI39zxfzPz6c0r/8cIJlwgI7psKo4fas9CQNVPq dO0AXAgRVeukXFJeMOPzwJhDDWT6tXWV6fsGwiCRVuhDVJxkBZ/RLffgww6E5bSeEDTq 3WbUAELFxUEnlaePUlzFT05j9DpOlO8dbVZYLIcpZ6UGTGpXzSg+PGW5BA7wm3jgteEC AZClSOHjcqK+4T4lVpOVBvYhxrolRiaZ324wiiDdSJ5cLcoSopb/stZ1nYnOczA5ncFs jPwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ptCl1re6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r27si2532790ejb.750.2020.05.20.21.42.19; Wed, 20 May 2020 21:42:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ptCl1re6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728096AbgEUEkI (ORCPT + 99 others); Thu, 21 May 2020 00:40:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:47240 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726887AbgEUEkI (ORCPT ); Thu, 21 May 2020 00:40:08 -0400 Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 085EB20738; Thu, 21 May 2020 04:40:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590036008; bh=2w9DxCHe0scNGtAZ7nw2RWCMBOMr7GLohZ7W2FFj9Gk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ptCl1re6iGPmvbMoa+Kxvl3v2vb6IA2r1DBlonJlocQDk4spMLVOJLVDdsdYVZhmY POucurkfgP9X/qiQ+Vgv66cmmG7AmJgVoYXR1jW4GbvEeZOCrnXG88c3KOOZxJs+pK Do3SM2jUr/HJsokTJPMTG/91o3Zxobpe5tnjIZI4= Date: Wed, 20 May 2020 21:40:07 -0700 From: Andrew Morton To: Sergey Senozhatsky Cc: Joe Perches , Chenggang Wang , linux-kernel@vger.kernel.org, Petr Mladek , Steven Rostedt Subject: Re: [RFC PATCH 2/2] init: Allow multi-line output of kernel command line Message-Id: <20200520214007.86f36f61e1fc0329b66758ed@linux-foundation.org> In-Reply-To: <20200521043628.GB755@jagdpanzerIV.localdomain> References: <2b3832fed9370f0f8dfd1ea33dddb1d05a36e265.1589916689.git.joe@perches.com> <20200520044127.GB938@jagdpanzerIV.localdomain> <20200520121000.GF520@jagdpanzerIV.localdomain> <19a8c717f8d9dc76f2b09e6dd19f3fbb71bf29c5.camel@perches.com> <20200520180028.8fc1b7890774c6f92a6c2623@linux-foundation.org> <20200521043628.GB755@jagdpanzerIV.localdomain> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 21 May 2020 13:36:28 +0900 Sergey Senozhatsky wrote: > On (20/05/20 18:00), Andrew Morton wrote: > [..] > > I'm wondering if we shold add a kernel puts() (putsk()? yuk) which can > > puts() a string of any length. > > > > I'm counting around 150 instances of printk("%s", ...) and pr_foo("%s", > > ...) which could perhaps be converted, thus saving an argument. > > Can you point me at some examples? > ./arch/powerpc/kernel/udbg.c: printk("%s", s); ./arch/powerpc/xmon/nonstdio.c: printk("%s", xmon_outbuf); ./arch/um/os-Linux/drivers/ethertap_user.c: printk("%s", output); ./arch/um/os-Linux/drivers/ethertap_user.c: printk("%s", output); ./arch/um/os-Linux/drivers/tuntap_user.c: printk("%s", out etc. My point is, if we created a length-unlimited puts() function for printing the kernel command line, it could be reused in such places, resulting in a smaller kernel.