Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2106403yba; Fri, 19 Apr 2019 12:14:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqzIPSjAib1UbOhwR19OQS2HQZo6/T0N/ekZIo0sy3lyoNZZfNZ2yfOFlURCIQyd2FqJbFuS X-Received: by 2002:a62:a515:: with SMTP id v21mr5764624pfm.41.1555701269499; Fri, 19 Apr 2019 12:14:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555701269; cv=none; d=google.com; s=arc-20160816; b=HbxzLgxFH5Kj/hO//+BpIY61SlvT8oUFb6IiNhrP2Cyaf+vH1WheW6RzKFFyETLERC A9A6Ju7/71/hzYMg4v7ZSOqgPrVRwn6bhnOEWKJZjyC74HGkeJ/+0nDGgmhul+v/0Srn nMAG9N0X+XTdcgw+Cv4IdScIoTVUl8J57B2FZRMJtV7J+H5CqpoP/1+nc1yEnNDrwN/L VuQfIydfKU+i0mi7J8NVe6RIm0zuEzxP/Ciov68Fy41lBkYsuUPea2FmCcMMo1xZaJeL 8Xi0PKnipZzTPpvTmL8O2B0iESXsUtVcq88pzA0rMXMTBczTRhWWJjD6KqsrrLlBrIgR Gf2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=9QUm65j9zaqX3NmkwhqrGvg2w2/MqiKzyq38aKFYGFE=; b=xXTFK3UqVHxVYFTOLgiO2K0E6BZm31Knr1ab54rGq1Cla6kC3E6kkRK27RtFPiepnU Z4JD5v9AlMTlG1i15Ajjq1xRYkU1OkheHGjgtN7l8Ul1FXyBBrZFExQpnKaXuqKRutVM 7goeassZSsPcz1LEZ6FZ6mO216Gbmz5NsWDESe9iwKSXukmRL6ImYWa8lSDAk840DUJ8 6lhTG50S8VrGid6tiUxYhX6Ov9QbHMq3oENRe+l4vTdUHp5x6/TuNen3m8cSo4OIlXi/ lICRcEH2JnKIXf9Lry0ZbOEC9/CHGMPOq40U3Ph+VKO9sEOYMEzMzhtz3BEjgeuMoOFM 7+kA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=FyA4yNqI; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p14si5377069pgb.292.2019.04.19.12.14.14; Fri, 19 Apr 2019 12:14:29 -0700 (PDT) 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=@chromium.org header.s=google header.b=FyA4yNqI; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727622AbfDSTNW (ORCPT + 99 others); Fri, 19 Apr 2019 15:13:22 -0400 Received: from mail-vs1-f66.google.com ([209.85.217.66]:47050 "EHLO mail-vs1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726307AbfDSTNW (ORCPT ); Fri, 19 Apr 2019 15:13:22 -0400 Received: by mail-vs1-f66.google.com with SMTP id e2so3284624vsc.13 for ; Fri, 19 Apr 2019 12:13:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9QUm65j9zaqX3NmkwhqrGvg2w2/MqiKzyq38aKFYGFE=; b=FyA4yNqIL4cKH95MMKw4u/A3HUc3RVRvgJELbGY/WBldZ6rdrykfCHJJdZCwLgZ5/b TpTHsZOmpr83Isxt1Vcc/9IuWEfDRwra4T/T8ofh3mChN975HK584QQNFexIo/ojZd3b ShHVQunRSEKIdYgCajppGiO4IENZHzWP38jZM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9QUm65j9zaqX3NmkwhqrGvg2w2/MqiKzyq38aKFYGFE=; b=e5noWpK0dBK/sk+L79g7vcvLdzpUvDqYEZ2xTdy7I6f1ZlXkc239Z1u0P7Ny3dHSvn j1qryFupsMkfozMa0fQbs7wO3jLfQfpf87Iqd+lLMR/AbYaMoxcIk+zHSp/bJIXVTCR2 igGKF2IQf7vuq5hJOuzGvofTTm/JCjV3F/V8nZbm0J+FPoEkGE6hrhocieE8JgukY/Vu t/OmythEwS4URuHgmz3aeUl1Kx5VfBhcDcehFIM3dxQIy0AaKUt3aTxawKom2lo+xKze GlPMqYgs5KRz6NEUhmUOht3aUdmjd7KRI+b5nXBXUkxzkmtkS9HWZporUN6y8AHD2IDu pxFw== X-Gm-Message-State: APjAAAX3s7Oh5R15PyTkKw3jvTHcAYhADjoBIHGMtaW6DNzslb/dVhFl noTueeEzUJsAVBQLu+6F7pHTOi4Wwzo= X-Received: by 2002:a67:fa04:: with SMTP id i4mr2405088vsq.18.1555686162823; Fri, 19 Apr 2019 08:02:42 -0700 (PDT) Received: from mail-ua1-f50.google.com (mail-ua1-f50.google.com. [209.85.222.50]) by smtp.gmail.com with ESMTPSA id q190sm1846675vkd.50.2019.04.19.08.02.41 for (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Fri, 19 Apr 2019 08:02:42 -0700 (PDT) Received: by mail-ua1-f50.google.com with SMTP id c6so1844390uan.1 for ; Fri, 19 Apr 2019 08:02:41 -0700 (PDT) X-Received: by 2002:ab0:72c2:: with SMTP id g2mr2239270uap.112.1555686161245; Fri, 19 Apr 2019 08:02:41 -0700 (PDT) MIME-Version: 1.0 References: <1555669773-9766-1-git-send-email-alex.popov@linux.com> In-Reply-To: <1555669773-9766-1-git-send-email-alex.popov@linux.com> From: Kees Cook Date: Fri, 19 Apr 2019 10:02:29 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/1] kconfig: Terminate menu blocks with a newline in the generated config To: Alexander Popov Cc: Masahiro Yamada , Michal Marek , linux-kbuild , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 19, 2019 at 5:29 AM Alexander Popov wrote: > > Currently menu blocks start with a pretty header but end with nothing in > the generated config. So next config options stick together with the > options from the menu block. > > Let's terminate menu blocks with a newline in the generated config. > > Signed-off-by: Alexander Popov Seems fine to improve readability at a few bytes size increase. Reviewed-by: Kees Cook -Kees > --- > scripts/kconfig/confdata.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c > index 08ba146..1459153 100644 > --- a/scripts/kconfig/confdata.c > +++ b/scripts/kconfig/confdata.c > @@ -888,6 +888,8 @@ int conf_write(const char *name) > if (menu->next) > menu = menu->next; > else while ((menu = menu->parent)) { > + if (!menu->sym && menu_is_visible(menu)) > + fprintf(out, "\n"); > if (menu->next) { > menu = menu->next; > break; > -- > 2.7.4 > -- Kees Cook