From patchwork Thu Oct 25 14:10:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 149529 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp1390453ljp; Thu, 25 Oct 2018 07:11:32 -0700 (PDT) X-Google-Smtp-Source: AJdET5fg/zgzfoPJvqpqic+siosjDDIX+3T9jrKBqwNkveMTbslh4P0Yq2pPq+FDXtSFMoO+HlCF X-Received: by 2002:a17:902:d704:: with SMTP id w4-v6mr1724212ply.230.1540476692302; Thu, 25 Oct 2018 07:11:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540476692; cv=none; d=google.com; s=arc-20160816; b=uYW95Vxse8nsZlXmJfoKfuYaxWKWIr95dTqFBOzkd1aNae6+ohWPNVgpbIneMml+p6 Xk7o5SjCcUAUSsXLU4ovkd28CWSFmUy6ZfRDoKqMC6bfQdObvVOY+hglBI9/sfVeCMVe sFNLRtU/a6VxuneQ5vgxGWRXQj4e62sHlRABGZREQrJdY7ozENz/MrS923YOP5Y7IjYb xrusLfvwQw1rC/1ZUpkfBre4W4uA6BsGZTmGNK+GEShH3qk8iqhZe2ZFJuTZxCTL5omI YRYjou6wbWxjcYu10lu5BbbqQT0YokavOShjmoEhfWwO0fLl5McRLxK+Mm/rj+DoceYW oSZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=3McfX6VM4GT6FWy4p7LlBt+mDTyQf0U4s16RACY8JMM=; b=vxWfMWowqpSPgTyRpcfkrL0A37gZiWDwIQ+dYJ7KLmfWd69UJDwgHID0o6y/Trm2Z0 dQ4xIssuhRxSSCGQi9RJfR/nZstmbpJX7T1cza14CEv0Lbt2dUVJ4U2hhE/ofCvqn1hv ufa6BNyMaV37YBn3tLP0k4DwqOO9rWrkZ6zCN8cIU5i6uHXA7p6Cz9PdnsTsYD81XPSS BycsmU+G84/84T575jSN24KuzB1jL3FAa5pbcPzimWSQ+WB/afBC5SARBKTNikhpVohe qq/iXolZLUiDkIBefxWf+UZYJjQZlppXF5JPMSR6GaPl2Z0OSNaulbZIIgtH/0oPM59f tKpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=BMm56oO5; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1-v6si8252504pls.296.2018.10.25.07.11.30; Thu, 25 Oct 2018 07:11:32 -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=@kernel.org header.s=default header.b=BMm56oO5; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727865AbeJYWoB (ORCPT + 32 others); Thu, 25 Oct 2018 18:44:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:52542 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727699AbeJYWoA (ORCPT ); Thu, 25 Oct 2018 18:44:00 -0400 Received: from sasha-vm.mshome.net (unknown [167.98.65.38]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A20262054F; Thu, 25 Oct 2018 14:11:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1540476665; bh=74ySAQMBThih2FK3Rot/66i2+Wp8eF2sA/P/6jvoxGo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BMm56oO5DC881ZtyzHcwUkwY+UgZoTLyWJ9E6pPUJh9x+PUJt7LZjY9e/mZ3R0ybh 50+B/Iw9Pvw8/yNYwYebgFFSr62Kh7QHp4PmSLE13zKWLIpaHBTfUdluEg9mchp3hz n8st+rZxFsyGEUQHXWnRS1FWJkSn6t3OYXlIqkjs= From: Sasha Levin To: stable@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Arnd Bergmann , "Martin K . Petersen" , Sasha Levin Subject: [PATCH AUTOSEL 4.14 07/46] scsi: aacraid: address UBSAN warning regression Date: Thu, 25 Oct 2018 10:10:14 -0400 Message-Id: <20181025141053.213330-7-sashal@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181025141053.213330-1-sashal@kernel.org> References: <20181025141053.213330-1-sashal@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann [ Upstream commit d18539754d97876503275efc7d00a1901bb0cfad ] As reported by Meelis Roos, my previous patch causes an incorrect calculation of the timeout, through an undefined signed integer overflow: [ 12.228155] UBSAN: Undefined behaviour in drivers/scsi/aacraid/commsup.c:2514:49 [ 12.228229] signed integer overflow: [ 12.228283] 964297611 * 250 cannot be represented in type 'long int' The problem is that doing a multiplication with HZ first and then dividing by USEC_PER_SEC worked correctly for 32-bit microseconds, but not for 32-bit nanoseconds, which would require up to 41 bits. This reworks the calculation to first convert the nanoseconds into jiffies, which should give us the same result as before and not overflow. Unfortunately I did not understand the exact intention of the algorithm, in particular the part where we add half a second, so it's possible that there is still a preexisting problem in this function. I added a comment that this would be handled more nicely using usleep_range(), which generally works better for waking up at a particular time than the current schedule_timeout() based implementation. I did not feel comfortable trying to implement that without being sure what the intent is here though. Fixes: 820f18865912 ("scsi: aacraid: use timespec64 instead of timeval") Tested-by: Meelis Roos Signed-off-by: Arnd Bergmann Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/aacraid/commsup.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) -- 2.17.1 diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c index 998788a967be..3e38bae6ecde 100644 --- a/drivers/scsi/aacraid/commsup.c +++ b/drivers/scsi/aacraid/commsup.c @@ -2506,8 +2506,8 @@ int aac_command_thread(void *data) /* Synchronize our watches */ if (((NSEC_PER_SEC - (NSEC_PER_SEC / HZ)) > now.tv_nsec) && (now.tv_nsec > (NSEC_PER_SEC / HZ))) - difference = (((NSEC_PER_SEC - now.tv_nsec) * HZ) - + NSEC_PER_SEC / 2) / NSEC_PER_SEC; + difference = HZ + HZ / 2 - + now.tv_nsec / (NSEC_PER_SEC / HZ); else { if (now.tv_nsec > NSEC_PER_SEC / 2) ++now.tv_sec; @@ -2531,6 +2531,10 @@ int aac_command_thread(void *data) if (kthread_should_stop()) break; + /* + * we probably want usleep_range() here instead of the + * jiffies computation + */ schedule_timeout(difference); if (kthread_should_stop()) From patchwork Thu Oct 25 14:10:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 149530 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp1391655ljp; Thu, 25 Oct 2018 07:12:23 -0700 (PDT) X-Google-Smtp-Source: AJdET5fbPXDaGleRZ58Tto74xvkckEieahTdqpTANOCcR/LE5PFGdmr7QQ8n29SyhlYmyVplOA1p X-Received: by 2002:a63:7418:: with SMTP id p24mr1674625pgc.196.1540476743548; Thu, 25 Oct 2018 07:12:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540476743; cv=none; d=google.com; s=arc-20160816; b=vc+aK8G2Xr/zLUOcCW3rzZ7OE2E5zTWiwfqo9DRmDPz7L6kaM/iTKcj0uuLeV+M229 cVnwPGg+ffEr4uCp/RC30/zs3PTlRhIF7a+UlcO1ElaRA4oD8n/OzZJ/1N2PG+n0/5yd mFilW/JW3ufmlbXYTEOcmmqrNW111sjVkwFkuAOK0J0tiYBWsvVZIJ1Pk9wV3fA7SFge Q4jey+Z3QLACkDoJs/K1Dg70YMnmjduh59p14I8rfOi2PJqT7E7YX9S0l9L6+RbqvlDD /iQejrb1exS/X4wnTXWjCVBrqHYR5RHh+8Gb6Na0MlXjfyImFOAcPZcVA14VQiHHT5xh FGVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=tMJGTDumGAA+VMq4BoFFebXnj/XHqo9sZGseiq0Az5Y=; b=EQICenyw3vMWD32XWBkWgYcGdPEcYk4UV6BJB1H6ReaTLWaVYOW8KwI4F5yFzfN9mA TPBPtunHspdT49WiZwt93gKs1N5/JCvuoXaxnuXNgS7qokjC4Euf8uJ9Wim4tqjqk89K lJjGgYgXU+9NjOfuXA1XQQ9GaAsiaMc01qsA4byYpJEqxnlPtdP/arX0t9HaRW052Yiq mzZqkYDuXOm8kP8TMxsQh9HBG6jGZGUlnZq27XabVn7Hws37jhXLH0xCwOwMl8DQTL8q P6qPIoh4tVxswUYhsuLlqPaXqGaQ95PPF1JyrKp9m8tCNwP05AOEeSRiszoAGqP+/e0v 7AEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=q1Ipl0SS; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1-v6si8252504pls.296.2018.10.25.07.12.23; Thu, 25 Oct 2018 07:12:23 -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=@kernel.org header.s=default header.b=q1Ipl0SS; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728441AbeJYWov (ORCPT + 32 others); Thu, 25 Oct 2018 18:44:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:53930 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728299AbeJYWou (ORCPT ); Thu, 25 Oct 2018 18:44:50 -0400 Received: from sasha-vm.mshome.net (unknown [167.98.65.38]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7C93C20848; Thu, 25 Oct 2018 14:11:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1540476715; bh=B2QTmEZixvlvUtgeh6v/k8Y0XDg4ZjFGjpTt9H+xO/E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=q1Ipl0SSzLCwfLNYIdRwnbnX8BTC8mP8T9yc49JEGw6o5Nrzv/UvUEkAWxqCbAsjL ksYuacRsUy98VCNdHN6gKq+E770Wk3+JdQSSJUi9cLib3BvIFAqo+HzlcXYI79CIaE Pf1B9SEcMXfPrZejZALUZdyBjcGvsH1FKD8vlHJ0= From: Sasha Levin To: stable@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Arnd Bergmann , "David S . Miller" , Sasha Levin Subject: [PATCH AUTOSEL 4.14 43/46] net: stmmac: mark PM functions as __maybe_unused Date: Thu, 25 Oct 2018 10:10:50 -0400 Message-Id: <20181025141053.213330-43-sashal@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181025141053.213330-1-sashal@kernel.org> References: <20181025141053.213330-1-sashal@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann [ Upstream commit 81a8b0799632627b587af31ecd06112397e4ec36 ] The newly added suspend/resume functions cause a build warning when CONFIG_PM is disabled: drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c:324:12: error: 'stmmac_pci_resume' defined but not used [-Werror=unused-function] drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c:306:12: error: 'stmmac_pci_suspend' defined but not used [-Werror=unused-function] Mark them as __maybe_unused so gcc can drop them silently. Fixes: b7d0f08e9129 ("net: stmmac: Fix WoL for PCI-based setups") Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.17.1 diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c index 6a393b16a1fc..c54a50dbd5ac 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c @@ -303,7 +303,7 @@ static void stmmac_pci_remove(struct pci_dev *pdev) pci_disable_device(pdev); } -static int stmmac_pci_suspend(struct device *dev) +static int __maybe_unused stmmac_pci_suspend(struct device *dev) { struct pci_dev *pdev = to_pci_dev(dev); int ret; @@ -321,7 +321,7 @@ static int stmmac_pci_suspend(struct device *dev) return 0; } -static int stmmac_pci_resume(struct device *dev) +static int __maybe_unused stmmac_pci_resume(struct device *dev) { struct pci_dev *pdev = to_pci_dev(dev); int ret; From patchwork Thu Oct 25 14:10:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 149531 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp1391671ljp; Thu, 25 Oct 2018 07:12:24 -0700 (PDT) X-Google-Smtp-Source: AJdET5dg4ttuS3aKwyIF/UHpRjTMJFvfZn34PSegdhK8aX5niQhmSP4oH5JYmO/udmJs5482/k2l X-Received: by 2002:a63:c251:: with SMTP id l17-v6mr1663746pgg.146.1540476744167; Thu, 25 Oct 2018 07:12:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540476744; cv=none; d=google.com; s=arc-20160816; b=qBLseF1c8aDzAptWziQixbEk9vnjB5HuSXlCpwpiEUxa0UYXdoswYvQkhAvz65BJiA wpKuO+8Bsh99Kox6I2IW7v7nNkg2bCcg6UiSBhOPaH/141d/1XT334pu/n1mxcfbb6c0 qqtxcDIhWU2naYm5brMqUbzAkucWOKQhtbWPY5t7pFMgsov3sVjgVyCYsaNvALPA9M97 baUf1KHjicuTRrCfaj9qFpLLJaWwsIPjsvjFShI7rYBkbq6BX8hLPj44HEawMmXmjyCR WsR1dydHPWxT7VF3yvVBEam+COQbCR+CnbKx8rGRnC6cZFrVQaqzM2LfRmCUtcaMS6Zw A3Xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=a80O0D8+/oGS8Shvj5ENmiLNFX0jyRJvvS9oT1ZbIbE=; b=P/OwrE1+2980bs9BHXXvEN4IC4+ZEDwk1TgqN0E/PMChpVQqE13uIy3oJm82RhsjNt 2zIY990S3lXLYUwEfU1Ll3XgRj9sGaEBLvmLMuiGLLYwliNX/h5nuz0iysiJNCM7NR/l 3TMUYs6GGcFwD8cp9b/5FJ9N/ApMJ1AhZMxe2j250K/e9RGayczK95RlZDnc7xMOB+c3 qDgzi6pHKWEOx/60CNPUaYdMHObZTV7HA8FI6lzVQoBRex7PdpuWC1mnb6eGXQOvdwX6 psO/Eh+LQx7zvv1EF9MBeyjBprVMAHw7y4Epd1rQHGWzTP3XD9Awi30rw4AMhWvKYnrd AQiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Ikyxum6m; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1-v6si8252504pls.296.2018.10.25.07.12.23; Thu, 25 Oct 2018 07:12:24 -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=@kernel.org header.s=default header.b=Ikyxum6m; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728458AbeJYWow (ORCPT + 32 others); Thu, 25 Oct 2018 18:44:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:53950 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728299AbeJYWow (ORCPT ); Thu, 25 Oct 2018 18:44:52 -0400 Received: from sasha-vm.mshome.net (unknown [167.98.65.38]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CB9922084A; Thu, 25 Oct 2018 14:11:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1540476716; bh=OfIb3tJbSf8EMUDaBaLd/MmMDMaVmV0GpzbdtVabMgs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ikyxum6mX/q9xaneH39kPn4v23diqWBYQgeIDt8fd4xV9d3czANRRpXfgz/1BhwW5 VHepcveqC6UFIUy/JhAH1OoW9fryyueGwpIWggBWlqcI55Ad54tiWQTBQBKBquUOvC pvJowRAqJtG8+LcpqmC/9MIGThqGwHlost5GIYjo= From: Sasha Levin To: stable@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Masahiro Yamada , Sasha Levin Subject: [PATCH AUTOSEL 4.14 44/46] kconfig: fix the rule of mainmenu_stmt symbol Date: Thu, 25 Oct 2018 10:10:51 -0400 Message-Id: <20181025141053.213330-44-sashal@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181025141053.213330-1-sashal@kernel.org> References: <20181025141053.213330-1-sashal@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Masahiro Yamada [ Upstream commit 56869d45e364244a721de34ce9c5dc9ed022779e ] The rule of mainmenu_stmt does not have debug print of zconf_lineno(), but if it had, it would print a wrong line number for the same reason as commit b2d00d7c61c8 ("kconfig: fix line numbers for if-entries in menu tree"). The mainmenu_stmt does not need to eat following empty lines because they are reduced to common_stmt. Signed-off-by: Masahiro Yamada Signed-off-by: Sasha Levin --- scripts/kconfig/zconf.y | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.17.1 diff --git a/scripts/kconfig/zconf.y b/scripts/kconfig/zconf.y index 126e3f2e1ed7..2b0adeb5fc42 100644 --- a/scripts/kconfig/zconf.y +++ b/scripts/kconfig/zconf.y @@ -31,7 +31,7 @@ struct symbol *symbol_hash[SYMBOL_HASHSIZE]; static struct menu *current_menu, *current_entry; %} -%expect 31 +%expect 30 %union { @@ -112,7 +112,7 @@ start: mainmenu_stmt stmt_list | no_mainmenu_stmt stmt_list; /* mainmenu entry */ -mainmenu_stmt: T_MAINMENU prompt nl +mainmenu_stmt: T_MAINMENU prompt T_EOL { menu_add_prompt(P_MENU, $2, NULL); };