Received: by 10.223.164.221 with SMTP id h29csp96342wrb; Wed, 4 Oct 2017 19:38:47 -0700 (PDT) X-Received: by 10.98.209.73 with SMTP id t9mr22232712pfl.52.1507171126976; Wed, 04 Oct 2017 19:38:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507171126; cv=none; d=google.com; s=arc-20160816; b=LsfFwQPIBmOLHGypAnhIEQX3UZalJWTyRfadpAniG6Mm9PaZmdoJjEkiSgj+DzjLh+ kwbxuM07fDWuKxj1+MrDZpcIFdi8N/+aGd48weJne94g1gcjQd6M8GvaLtDzSWM7mzW3 xnNyEtm3CLIbGQDmlNqTkC51z/JtrMZLWDVbzUF5ATup5Npziw+qTuvbNaRjDBT9kSlZ oabWoEo5IEZpLCqvcqUy6SfdV3hMvvPheQreApQosZv9X9QLrc42ADtxvAyXp451WEa2 uoHSdx4+UjBqYISzL00m6bYnear5lySr8byp+I6erRaxoxnAFMdMn4DN9mGdEacy35xH VwpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=ScLnxOreLrxCYbgCj6jdcxr6Yf8N6DgpiXw5Rq9xCrs=; b=K1AAJ72C/PgZsM5/HfN3ATRqqJ0J5gu1nO9vnqLl5B2NlXIA969FeBGSPc3hEoJHAI 11MosK24g9XOydyMRyXgmfazR3TXS9yIEC2iasOy70mnYoHPpZK3gV3xqwIROd6N6z9r dxRXAafqlN+q1YHmOoyvRjb8C0Vo7+eIl1x1vjKHux2nMnMJYRL4Ax/4/RLX9AEnGTQG AkrUbny0d8PJG/60luc+srMA+Fm0z9Xi9nxokdIDUMg65m7GUxJASTIDUOTmhqmdTnLd SQFCvk1ZgqMWZkRY4mo6JEwt/obV+v0Vc/95ldJMBKI8gdZegu/3zXmz8nNNmtD4E9I/ uFYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AsoSn121; 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=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f34si13148506ple.484.2017.10.04.19.38.32; Wed, 04 Oct 2017 19:38:46 -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=@gmail.com header.s=20161025 header.b=AsoSn121; 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=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751342AbdJEChB (ORCPT + 99 others); Wed, 4 Oct 2017 22:37:01 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:50595 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751223AbdJECg7 (ORCPT ); Wed, 4 Oct 2017 22:36:59 -0400 Received: by mail-lf0-f68.google.com with SMTP id a132so7277066lfa.7; Wed, 04 Oct 2017 19:36:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=ScLnxOreLrxCYbgCj6jdcxr6Yf8N6DgpiXw5Rq9xCrs=; b=AsoSn121XlR8SJvzhtGxkReDXRgvW0/gkT5ghYKeHla7WANVgeJrV2pBnDwEbNKCzs 8/I3GJkG+cZVDTuiFWPHe8SooZmJDLMEEa6VEbAJxHHF4yDD+e3YI/ayoJ3D82g0J8t0 qc1Ho9NaHv8+ex5M7paeKDjs0d9IIy84gTi4wc0uFZ7u/0Ba1fjyIOxE5sTN2SI0otwl El+6E1HGg5jhzolOl6kMxiXcMSCloVb94D4rxynzcmgkhEtOmKxdBXfGZ+bqt+F2T2ga Ez+vTfVcIf7UxGH/X5/JPbQoE3alHLixmSp/7zvhcT0zK0iMVIu6QNeOefSNEzMe0vol fmOQ== 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; bh=ScLnxOreLrxCYbgCj6jdcxr6Yf8N6DgpiXw5Rq9xCrs=; b=US1nWIanTw4N+Vhks6wNmpJd1VT1BsYLVkuuNfd6Uopd6+5oLAYiI/Hw+5aGo1Ml+e oXDRtp4f28Sr80gl/YaXhNCpUwkHlyptjA1FsMlwBfPtejVeSOHEpZrBGw4KbFRj20F5 ZxUPDSOq42MWAaE02iG/6wT+NuGE5j00DuCwOeIhgTQlXTGIJwXDNwy91Zqa6dMxjqXJ ZvxdYp8O62r2pXQcYW/EEZT75sFNpmgwZNzEkxGiYBD7e9xIRsB/UabTM4ne7K1PYoSl 1hFIo1Yvy06sEQaCtUFomc+BJhIlIAhjqJcpR6h6/bZYh39rPvf4FXNLqU55U22iOfHT dxRA== X-Gm-Message-State: AHPjjUic1sjparmUUkSYlkGOJszvzf04sxjn6AMKJMm/+hid/NtPiqXw kNV6al2Jfums6SRFfl9VPP4= X-Google-Smtp-Source: AOwi7QD0YxUp8jAzNM3NbqKavX+h3espx5rzv8b3qQ28hicnSx3YVoL7WiUAGhel7Nqb2mN9kPM5lw== X-Received: by 10.25.160.137 with SMTP id j131mr6386488lfe.218.1507171017881; Wed, 04 Oct 2017 19:36:57 -0700 (PDT) Received: from huvuddator.lan (ua-213-112-0-22.cust.bredbandsbolaget.se. [213.112.0.22]) by smtp.gmail.com with ESMTPSA id r84sm3667294ljb.82.2017.10.04.19.36.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 04 Oct 2017 19:36:57 -0700 (PDT) From: Ulf Magnusson To: yann.morin.1998@free.fr, linux-kbuild@vger.kernel.org Cc: mmarek@suse.cz, yamada.m@jp.panasonic.com, lacombar@gmail.com, linux-kernel@vger.kernel.org, Ulf Magnusson Subject: [PATCH] kconfig: Remove menu_end_entry() Date: Thu, 5 Oct 2017 04:36:33 +0200 Message-Id: <1507170993-10458-1-git-send-email-ulfalizer@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org menu_end_entry() is empty and completely unused as far as I can tell: $ git log -G menu_end_entry --oneline a02f057 [PATCH] kconfig: improve error handling in the parser 1da177e Linux-2.6.12-rc2 Last one is the initial Git commit, where menu_end_entry() is empty as well. I couldn't find anything that redefined it on Google either. It might be a debugging helper for setting a breakpoint after each config, menuconfig, and comment is parsed. IMO it hurts more than it helps in that case by making the parsing code look more complicated at a glance than it really is, and I suspect it doesn't get used much. Tested by running the Kconfiglib test suite, which indirectly verifies that the .config files generated by the C implementation for each defconfig file in the kernel stays the same. Signed-off-by: Ulf Magnusson --- scripts/kconfig/lkc.h | 1 - scripts/kconfig/menu.c | 5 ----- scripts/kconfig/zconf.tab.c_shipped | 30 ++++++++++-------------------- scripts/kconfig/zconf.y | 6 +----- 4 files changed, 11 insertions(+), 31 deletions(-) diff --git a/scripts/kconfig/lkc.h b/scripts/kconfig/lkc.h index cdcbe43..16cb62b 100644 --- a/scripts/kconfig/lkc.h +++ b/scripts/kconfig/lkc.h @@ -100,7 +100,6 @@ void menu_warn(struct menu *menu, const char *fmt, ...); struct menu *menu_add_menu(void); void menu_end_menu(void); void menu_add_entry(struct symbol *sym); -void menu_end_entry(void); void menu_add_dep(struct expr *dep); void menu_add_visibility(struct expr *dep); struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep); diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c index e935793..503f3ae 100644 --- a/scripts/kconfig/menu.c +++ b/scripts/kconfig/menu.c @@ -62,13 +62,8 @@ void menu_add_entry(struct symbol *sym) menu_add_symbol(P_SYMBOL, sym, NULL); } -void menu_end_entry(void) -{ -} - struct menu *menu_add_menu(void) { - menu_end_entry(); last_entry_ptr = ¤t_entry->list; return current_menu = current_entry; } diff --git a/scripts/kconfig/zconf.tab.c_shipped b/scripts/kconfig/zconf.tab.c_shipped index a22b285..7938548 100644 --- a/scripts/kconfig/zconf.tab.c_shipped +++ b/scripts/kconfig/zconf.tab.c_shipped @@ -516,16 +516,16 @@ static const yytype_uint16 yyrline[] = 0, 109, 109, 109, 111, 111, 113, 115, 116, 117, 118, 119, 120, 124, 128, 128, 128, 128, 128, 128, 128, 128, 128, 132, 133, 134, 135, 136, 137, 141, - 142, 148, 156, 162, 170, 180, 182, 183, 184, 185, - 186, 187, 190, 198, 204, 214, 220, 226, 232, 235, - 237, 248, 249, 254, 263, 268, 276, 279, 281, 282, - 283, 284, 285, 288, 294, 305, 311, 321, 323, 328, - 336, 344, 347, 349, 350, 351, 356, 363, 370, 375, - 383, 386, 388, 389, 390, 393, 401, 408, 415, 421, - 428, 430, 431, 432, 435, 443, 445, 446, 449, 456, - 458, 463, 464, 467, 468, 469, 473, 474, 477, 478, - 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, - 491, 494, 495, 498, 499 + 142, 148, 156, 161, 169, 178, 180, 181, 182, 183, + 184, 185, 188, 196, 202, 212, 218, 224, 230, 233, + 235, 246, 247, 252, 261, 266, 274, 277, 279, 280, + 281, 282, 283, 286, 292, 303, 309, 319, 321, 326, + 334, 342, 345, 347, 348, 349, 354, 361, 368, 373, + 381, 384, 386, 387, 388, 391, 399, 406, 411, 417, + 424, 426, 427, 428, 431, 439, 441, 442, 445, 452, + 454, 459, 460, 463, 464, 465, 469, 470, 473, 474, + 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, + 487, 490, 491, 494, 495 }; #endif @@ -1552,7 +1552,6 @@ yyreduce: case 32: { - menu_end_entry(); printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno()); } @@ -1576,7 +1575,6 @@ yyreduce: current_entry->prompt->type = P_MENU; else zconfprint("warning: menuconfig statement without prompt"); - menu_end_entry(); printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno()); } @@ -1821,14 +1819,6 @@ yyreduce: break; - case 87: - - { - menu_end_entry(); -} - - break; - case 88: { diff --git a/scripts/kconfig/zconf.y b/scripts/kconfig/zconf.y index c8f396c..3845aa9 100644 --- a/scripts/kconfig/zconf.y +++ b/scripts/kconfig/zconf.y @@ -155,7 +155,6 @@ config_entry_start: T_CONFIG T_WORD T_EOL config_stmt: config_entry_start config_option_list { - menu_end_entry(); printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno()); }; @@ -173,7 +172,6 @@ menuconfig_stmt: menuconfig_entry_start config_option_list current_entry->prompt->type = P_MENU; else zconfprint("warning: menuconfig statement without prompt"); - menu_end_entry(); printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno()); }; @@ -406,9 +404,7 @@ comment: T_COMMENT prompt T_EOL }; comment_stmt: comment depends_list -{ - menu_end_entry(); -}; +; /* help option */ -- 2.7.4 From 1586604597873801668@xxx Tue Dec 12 18:40:55 +0000 2017 X-GM-THRID: 1586604597873801668 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread