Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1615334rdb; Mon, 2 Oct 2023 15:40:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFzuToO6xhmuTGXfW+RkaUD7VAEuoSUsBf8dnyTK1wrHN68degXwnosEtFPu2NaDdLcgLRA X-Received: by 2002:a17:90a:b38a:b0:263:f630:228f with SMTP id e10-20020a17090ab38a00b00263f630228fmr12814335pjr.23.1696286430854; Mon, 02 Oct 2023 15:40:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696286430; cv=none; d=google.com; s=arc-20160816; b=QSG5jgHj7Gw0NE4Z9iQYpVblvgu77EEZ25PptijZfdK2ngcGyQOZhIgG6arGie9q49 ZUqQOuo7Loby8LR0bg7P/MmBm+QW1b88IOxWUgnvpghzqZPBdI3azpOuaFjOhtDrPcm1 HRoSPto0wfgpmbcvHqpEGUTyozsq+EITCXirnRlz7Cd4pkla6u/tOtUrIo3oygNDAvAD 7+FHZWCYArKn559M3kZ2WxUHc98Z/F4BLkzmWzo6N9KAXztzTva1A/Kd5CsONOH+8mFO 7NBkflzaZQdH+tXQeFjhBqDstXXDCoyTgHEiuDzcFDiuG9LCT0Pu90XJJuPNs+za1b/T 01vQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=AX93sLvcrd6tJrae8auvW0+fJziM4fCii67Rek5eZuc=; fh=ZAiEAvwuyGe5lqcvHZme0GNsvHHj1L7U41EE0Q9tyS0=; b=rl5zTOG25eW6RO2S4YxQQmUF7H72YQOO8NIhOSq4lE0u4DylXk8ElXAixCssVmGeE1 xgW8noi9CaO7IXVhi3fW6Et2JwgWx+051x3SVENOyn/8wqlOvzJHlwKa7iT6YUq7AsEu SueRKLPYfIo8ZeXQ+IbhI90eGl/2E8/AKFtwjwXy10XSSq+L3JBt5GBY8zq4YPKo/b7v sl8lGm+DaK9z2Zjpg/JpuHE2v30X6JOmGT/UOfMoy0X7Cf410vHlZ7f3TjeLwUPbaMEV wEmjeEMnhtt71vNcC07AJ7ZT3QGw7s+d/De8TxWLiXglFfsTcNwO+wP2PFTdsZ96bbJ5 t12A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=nMX+58jl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id lr9-20020a17090b4b8900b0026d034f6baesi9585331pjb.117.2023.10.02.15.40.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 15:40:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=nMX+58jl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 4C5818028FA5; Mon, 2 Oct 2023 02:03:31 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235863AbjJBJCr (ORCPT + 99 others); Mon, 2 Oct 2023 05:02:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230033AbjJBJCp (ORCPT ); Mon, 2 Oct 2023 05:02:45 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49D4FA4; Mon, 2 Oct 2023 02:02:42 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9FE7CC433C8; Mon, 2 Oct 2023 09:02:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1696237361; bh=smbdD+CUEQ4ahMF3RqsYVNHHjGroQxTTaWRgCAR/D24=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=nMX+58jl6hq9UFJUHZd1tjzFPgSTOpSlydUnTfJQnD4JkBTo1W3OhKwdiqRz3OSHL 5qGb/GMTdZ1Zi7txcN44MpKcZqjCquccKdPkeOQfVVDMci/1xfBziuQgAa/1GdsgkO fTB8auP7M3L0i1rXICcsdIgBp+nJtQayOSXiZzAY= Date: Mon, 2 Oct 2023 11:02:38 +0200 From: Greg Kroah-Hartman To: Christophe Leroy Cc: Jiri Slaby , "j.granados@samsung.com" , Luis Chamberlain , "willy@infradead.org" , "josh@joshtriplett.org" , Kees Cook , Phillip Potter , Clemens Ladisch , Arnd Bergmann , Juergen Gross , Stefano Stabellini , Oleksandr Tyshchenko , "James E.J. Bottomley" , "Martin K. Petersen" , Doug Gilbert , Sudip Mukherjee , Jason Gunthorpe , Leon Romanovsky , Corey Minyard , Theodore Ts'o , "Jason A. Donenfeld" , David Ahern , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Robin Holt , Steve Wahl , Russ Weight , "Rafael J. Wysocki" , Song Liu , "K. Y. Srinivasan" , Haiyang Zhang , Wei Liu , Dexuan Cui , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , David Airlie , Daniel Vetter , "linux-hyperv@vger.kernel.org" , "linux-scsi@vger.kernel.org" , "linux-rdma@vger.kernel.org" , "netdev@vger.kernel.org" , "intel-gfx@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , "linux-raid@vger.kernel.org" , "linux-serial@vger.kernel.org" , "xen-devel@lists.xenproject.org" , "openipmi-developer@lists.sourceforge.net" , "linuxppc-dev@lists.ozlabs.org" Subject: Re: [PATCH 04/15] tty: Remove now superfluous sentinel element from ctl_table array Message-ID: <2023100252-plod-user-4504@gregkh> References: <20230928-jag-sysctl_remove_empty_elem_drivers-v1-0-e59120fca9f9@samsung.com> <20230928-jag-sysctl_remove_empty_elem_drivers-v1-4-e59120fca9f9@samsung.com> <63e7a4fe-58c9-470e-84c2-dd92e76462ae@kernel.org> <4d7bf39e-e7f9-f497-13aa-73718456a653@csgroup.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4d7bf39e-e7f9-f497-13aa-73718456a653@csgroup.eu> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 02 Oct 2023 02:03:31 -0700 (PDT) On Mon, Oct 02, 2023 at 08:47:53AM +0000, Christophe Leroy wrote: > > > Le 02/10/2023 ? 10:17, Jiri Slaby a ?crit?: > > On 28. 09. 23, 15:21, Joel Granados via B4 Relay wrote: > >> From: Joel Granados > >> > >> This commit comes at the tail end of a greater effort to remove the > >> empty elements at the end of the ctl_table arrays (sentinels) which > >> will reduce the overall build time size of the kernel and run time > >> memory bloat by ~64 bytes per sentinel (further information Link : > >> https://lore.kernel.org/all/ZO5Yx5JFogGi%2FcBo@bombadil.infradead.org/) > >> > >> Remove sentinel from tty_table > >> > >> Signed-off-by: Joel Granados > >> --- > >> ? drivers/tty/tty_io.c | 3 +-- > >> ? 1 file changed, 1 insertion(+), 2 deletions(-) > >> > >> diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c > >> index 8a94e5a43c6d..2f925dc54a20 100644 > >> --- a/drivers/tty/tty_io.c > >> +++ b/drivers/tty/tty_io.c > >> @@ -3607,8 +3607,7 @@ static struct ctl_table tty_table[] = { > >> ????????? .proc_handler??? = proc_dointvec, > >> ????????? .extra1??????? = SYSCTL_ZERO, > >> ????????? .extra2??????? = SYSCTL_ONE, > >> -??? }, > >> -??? { } > >> +??? } > > > > Why to remove the comma? One would need to add one when adding a new entry? > > Does it make any difference at all ? > > In one case you have: > > @xxxx > something old, > }, > + { > + something new, > + }, > } > > In the other case you have: > > @xxxx > something old, > + }, > + { > + something new, > } > } Because that way it is obvious you are only touching the "something new" lines and never have to touch the "something old" ones. It's just a long-standing tradition in Linux, don't have an extra character if you don't need it :) thanks, greg k-h