From patchwork Tue Feb 20 11:54:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 128872 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp4553098ljc; Tue, 20 Feb 2018 03:57:48 -0800 (PST) X-Google-Smtp-Source: AH8x226iTvlY4cFQSpONr7MV9whkaklICzOQ70BNdi3bZxumx/FPFlcxXU6+nkLYGNwI+BXjwP8W X-Received: by 2002:a17:902:b40d:: with SMTP id x13-v6mr1548882plr.320.1519127868784; Tue, 20 Feb 2018 03:57:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519127868; cv=none; d=google.com; s=arc-20160816; b=a56scBv2vnbq3xDBSBgK/hcbyLIJZIwu2e+k4YYWqE69sLqGU/OXlHQnAVdkbGLJtE mGwrGJPTIeZFVtvXyXGJEqTPVQjLsoIWvzJYdmVViQIGOgkTX9R4V8CvUYdB1tVi5SLd P9yh9/7Yw2tyh5FtuhRutRnzMWjKpEAVsMDaHqYK6AO5VlOgpiede963IdNqe47cOK1q KM+aZcqR2B4eafq3msCroMbNCw9A66mN0+b3m+dswcsCTYqFWnn3KaXO9JVtvox47jdP Uy9NkseRllZ4txfkNEDGcVGofZEk1XmBM0ojNbHBnP9cxb+4MyxGynCVNNKbnOAQTTbG f9rw== 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:arc-authentication-results; bh=O3zQnuMsyJ+iGP/Z7vaTKsP2M3zRctspLbZfNgRN8hU=; b=MgEP4VGAIgjukbQIgY2sBga8c5FVJ0EzqHVqrKd3hESPQh+ChsINxrQEqkIJdzT1Ax KFtDZmHPP0noK4L3hiRFbDY7Rcbzs3zCUfSX59DJSo/MAoyxt1MhmWxPCOpFOh+hz7NI ybccnAz5vpRyZ046O6VAPceX3JZ7SHGTT3DfRnsAdn1Rh+2S7B+HgVDSeYiUdzYUWrT+ ES9WOrZmCYos3j7fZscn0emYC7HWdGqAYNn1b5IvreB9bszM6XPeWRKnY2WRrr5qvQRZ W6wj+G3W15syYuiotuIifIKdM5pZrhMbkidPDVFxFL1KNSCx8/mLZnKxX4ui3OTmPhsS echg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b3si7879586pgc.496.2018.02.20.03.57.48; Tue, 20 Feb 2018 03:57:48 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751661AbeBTL5q (ORCPT + 28 others); Tue, 20 Feb 2018 06:57:46 -0500 Received: from mout.kundenserver.de ([217.72.192.74]:37593 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751566AbeBTL5n (ORCPT ); Tue, 20 Feb 2018 06:57:43 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue105 [212.227.15.145]) with ESMTPA (Nemesis) id 0LxOqw-1eiJ692etO-0170Nb; Tue, 20 Feb 2018 12:57:39 +0100 From: Arnd Bergmann To: stable@vger.kernel.org, Linus Walleij , Alexandre Courbot Cc: Greg KH , linux-kernel@vger.kernel.org, Arnd Bergmann , linux-gpio@vger.kernel.org Subject: [4.4-stable 01/22] gpio: xgene: mark PM functions as __maybe_unused Date: Tue, 20 Feb 2018 12:54:48 +0100 Message-Id: <20180220115527.1806578-2-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180220115527.1806578-1-arnd@arndb.de> References: <20180220115527.1806578-1-arnd@arndb.de> X-Provags-ID: V03:K0:dUGZk+kvCgCJDZBqh0EahzGCYEGuzISKu+YXHXIAusBVL20Z4Hp XGM4OWC+HEIaVw/TlUYRevoGIzSQ3VGbFSHrx0OTgv4WDlJgw6AmIhtdUcuhac7TvLTfHsy 7yzti1L2CQPVh0iSIZzRR5aU6Ng3Hg9+DXZ1P0VnsVKOLcSi+unUTI9eCajYTxGvWhahDT5 TtF+DIQ+XEnpEn7jN073w== X-UI-Out-Filterresults: notjunk:1; V01:K0:AUYM+Ufq0BQ=:fZjJtv+sGbkVMzg27+C2ba F5aPEWk3FAofrAOS+QzdHPk7l1P65hhaP9kKG06aWgRmbrjSf34w9psXAsCG4+sqAhG+YWu1S De1dt/lVBdDX+pOd74q6AYGE2yJat8ns3XreK7wSJBD+n2FEb2EQjNwOytSCpon73V6Aqtotz 9O6tbDpnH6aAr5bwEW8tkw6mCNMSRp27TmBMNaeeEMWbNd7thTFWEt8OatCzjnXkgVdQihqGf +TMVOeDw3IVHpTlMHL/IhS1iGHDixU/kCZ1ClhtFdFiF5DyJpE52deIcrHFqjvQbj16FLOHDT fEb8iVd4GDRNlWlYS26nGX8ABI0CKKizTlLaiaUFtG6yFjq2yCDYkcVemaa6jsiCMBtug//u9 j7KScaC593TLsYupQKtg2QvQVpnM/LHpK78CwrNpuq/IOQeIWJrfVHu8pNrKr/Ql+gP6AmO5u Fbnm0y31s6cF9jKTABF/EXhHeENr6R6Y4vdflq9KiGXBEeOxazYaoLByOA2SEDmZ4MfgYyo6Q O6gEQDACQzdEtc812wBDkaidaI3JQ+cwmC0JxpYoTPq7bjieFCrkR8sdol/Egqm+Z1kCW7PHx 9c+Tz0rFQPdkz7gcj8AtFUgmUQ/S93M/VtZlVnMTgyz8ttYjtWv+CIVSCLRsRv1nuu4uYKtcL jlWtOeSoEGDUJIUNEult2VOs7ayjX+J+gwBZv0Z6Qp4Sc1HjWaUGI3xPPqjuRyRc9TMS36fF8 r6hOP9bUGhNg0sinfRI+wR3x1U1DYcUvHjdBPA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When CONFIG_PM_SLEEP is disabled, we get a warning about unused functions: drivers/gpio/gpio-xgene.c:155:12: warning: 'xgene_gpio_resume' defined but not used [-Wunused-function] static int xgene_gpio_resume(struct device *dev) ^~~~~~~~~~~~~~~~~ drivers/gpio/gpio-xgene.c:142:12: warning: 'xgene_gpio_suspend' defined but not used [-Wunused-function] static int xgene_gpio_suspend(struct device *dev) The warnings are harmless and can be avoided by simplifying the code and marking the functions as __maybe_unused. Signed-off-by: Arnd Bergmann Signed-off-by: Linus Walleij (cherry picked from commit b115bebc07f282067eccc06fd5aa3060ab1426da) [arnd: backported to 4.4-stable] Signed-off-by: Arnd Bergmann --- drivers/gpio/gpio-xgene.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) -- 2.9.0 diff --git a/drivers/gpio/gpio-xgene.c b/drivers/gpio/gpio-xgene.c index 18a8182d4fec..7f1f32324504 100644 --- a/drivers/gpio/gpio-xgene.c +++ b/drivers/gpio/gpio-xgene.c @@ -42,9 +42,7 @@ struct xgene_gpio { struct gpio_chip chip; void __iomem *base; spinlock_t lock; -#ifdef CONFIG_PM u32 set_dr_val[XGENE_MAX_GPIO_BANKS]; -#endif }; static inline struct xgene_gpio *to_xgene_gpio(struct gpio_chip *chip) @@ -132,8 +130,7 @@ static int xgene_gpio_dir_out(struct gpio_chip *gc, return 0; } -#ifdef CONFIG_PM -static int xgene_gpio_suspend(struct device *dev) +static __maybe_unused int xgene_gpio_suspend(struct device *dev) { struct xgene_gpio *gpio = dev_get_drvdata(dev); unsigned long bank_offset; @@ -146,7 +143,7 @@ static int xgene_gpio_suspend(struct device *dev) return 0; } -static int xgene_gpio_resume(struct device *dev) +static __maybe_unused int xgene_gpio_resume(struct device *dev) { struct xgene_gpio *gpio = dev_get_drvdata(dev); unsigned long bank_offset; @@ -160,10 +157,6 @@ static int xgene_gpio_resume(struct device *dev) } static SIMPLE_DEV_PM_OPS(xgene_gpio_pm, xgene_gpio_suspend, xgene_gpio_resume); -#define XGENE_GPIO_PM_OPS (&xgene_gpio_pm) -#else -#define XGENE_GPIO_PM_OPS NULL -#endif static int xgene_gpio_probe(struct platform_device *pdev) { @@ -230,7 +223,7 @@ static struct platform_driver xgene_gpio_driver = { .driver = { .name = "xgene-gpio", .of_match_table = xgene_gpio_of_match, - .pm = XGENE_GPIO_PM_OPS, + .pm = &xgene_gpio_pm, }, .probe = xgene_gpio_probe, .remove = xgene_gpio_remove, From patchwork Tue Feb 20 11:54:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 128875 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp4553426ljc; Tue, 20 Feb 2018 03:58:14 -0800 (PST) X-Google-Smtp-Source: AH8x225SXxc+T4H9WU8lHHiI92lEaQV0EV+zPuIBy8IMP+iJeXHnJGIDC6N7efvJDVZw0kWoQEzW X-Received: by 2002:a17:902:68cb:: with SMTP id x11-v6mr17195226plm.198.1519127894744; Tue, 20 Feb 2018 03:58:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519127894; cv=none; d=google.com; s=arc-20160816; b=Ivc+bHgxRi4RUQSglft7X1OwLjl2/ssQxiFevVuyzgzw/Z9zBrOHvavM4ETPa6p4x3 wQizYuwh0Z3DIYb3NsIByy9mwIH95uF8Yv1j0DbqIP6B8IyhLa/GILnxQBnd42z12clp dQVuySwD6wp2/Y+H0QdRLYGeIzYwxGk0IsG1YMNqEkn59COssp+HBSYtIqMecJmsC4Ue YCSORw+dRPjqdH2du259T7E4p9dtcyxEzKr1P9809pHcdgHh5mMT9003SVO1SV6f+YFT gK5Agj/eZ+6WpytGYlJWQPpB7QBiqzMXH5sZJHJvhttQHKYwD4gMJvS4O+VqszVrW+PH dMiA== 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:arc-authentication-results; bh=NJpLM2intY1Vs+vRx7qqXZsYvbqX6zZ/N19Kx12V7Nc=; b=luEgCuIfULC4tJb/8prkOLAwlYxfAm9/CKY0QztUpZq5ppdSVkuTlVVD5Ki7maU9bM yAp6R9iMqtZwc3RiGpEBfGvetNneK9I29U1XRb35pn2hNebjOmMW5/y+rwhuy/wE0SOD HvgHr+ISNwcEk5Hiu2xCvpUQGyJuO0MJKrwayuq94bKJbZzL54IYjzmjASUOHvSWm/xE Ml3dtIixLfBDfedrPJu7QEzCHtt8/YiDys+T6ZMzVNN/GP0rcwSrZtZKjMRUB8o1k1OC vlaRUqAgPBhb9sg3c/AghtacD1mEVXg2LTZXNyUoskTcpvNea/7ueaEyVUtajXz9oPdg afGA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 31-v6si5588483plk.532.2018.02.20.03.58.13; Tue, 20 Feb 2018 03:58:14 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751790AbeBTL6K (ORCPT + 28 others); Tue, 20 Feb 2018 06:58:10 -0500 Received: from mout.kundenserver.de ([217.72.192.75]:37191 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751734AbeBTL6F (ORCPT ); Tue, 20 Feb 2018 06:58:05 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue105 [212.227.15.145]) with ESMTPA (Nemesis) id 0MTP5b-1fEKP03No7-00SRQw; Tue, 20 Feb 2018 12:57:45 +0100 From: Arnd Bergmann To: stable@vger.kernel.org Cc: Greg KH , linux-kernel@vger.kernel.org, Arnd Bergmann , Sebastian Reichel , Dmitry Eremin-Solenikov , David Woodhouse , linux-pm@vger.kernel.org Subject: [4.4-stable 02/22] Revert "power: bq27xxx_battery: Remove unneeded dependency in Kconfig" Date: Tue, 20 Feb 2018 12:54:49 +0100 Message-Id: <20180220115527.1806578-3-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180220115527.1806578-1-arnd@arndb.de> References: <20180220115527.1806578-1-arnd@arndb.de> X-Provags-ID: V03:K0:fllPO80jCZ+F54OUmU7MR6OWSYE1PbE5z1RJMQBnV4lbPB5twQl soTb9z8qXgDSs6fAxJHniVtjjmDhSr74hM9i/apWqNxbAi0k/s1/kOUq6gCGrxM4eRpyiS9 TGUZJNVFzEmBTwQpWQbyAhDnxtEqFnPtvPm75RoUttb90XXTdufel1+/zuoUXh/fNsjAqW8 fjWv8IBKIP+up8CdKlt/Q== X-UI-Out-Filterresults: notjunk:1; V01:K0:ZtlU2u5vjFo=:0dHbBF3twp7uwfZYaobd2W 5QO50GSdiFMjvwx5Ok5pPrGewi+6UuCcquwoYDlB+fu3Bvun7oeMT9vyo1l3VCkzrlZQ44xD2 D/K+T1Dyk/aOGbQM20mcCuQ/RP/CMkazJD8hv920nRVll0aiGKo6Wj/B9Bq1reDUOngG24wWK XtFZdWI9UOrR5/CJLeK0sVMe6by0GXBNz5s/QSKGzTrw6MSFAgpQ32Du5HPfD+MEFcTkNQVa7 oXJitSShE13QSQ0OUmCtN4SWXyj4N66w7q8XEQ6dPXuLpVdSClQQ4/UOoYeZKy4WgBqK04TtX piclhSikUzL6QfFsHWzwZGmwNvtshX0h57yvMQYXZOYEkQEZMSvE+MjuUxet9rI6Kpup4P52N 6Hf14BZ9taIIFVxSYFfgBcb0WcbAla7YYk0LrkjTHjrI1uLx/t0aCYRqTcP1PszBAyHt80nCr 4U0/TXEg8erygbgoCyzZ8qEYpldYRkrnru6sTIreGAtTING24PHDE3LoI6J9DCi3y3ck02y4C OA0XBzyEB5N8IGaP5ZMe51XHcnpYgpUrfH3bY2+9zQ8fKncuD5eHJWCKTuwn433/KkuyBbD8l k0DFJrXz9EdhLUVkdIzqa2tdTs6+u22ueioiIFoGND3enfbxPb8i4qQ3SeKRCn1qbB+gMtwbU A5fjK0K+sCYqp5ojkQpUbEL1IrgNFME1TCFZ1T3ALnKF4ExTRxq8juE5sXuN0T8qyf6ZbtLmc vqOVFj29RafvuOe5oeegA00308jEiPdvzp+E2w== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This reverts commit 6bd03ce3c12a22d86f59070f1da15aaa2bde8a51, it was applied in error and cuased this link failure drivers/built-in.o: In function `bq27xxx_battery_i2c_read': core.c:(.text+0xa6da8): undefined reference to `i2c_transfer' drivers/built-in.o: In function `bq27xxx_battery_init': core.c:(.init.text+0x68e0): undefined reference to `i2c_register_driver' drivers/built-in.o: In function `bq27xxx_battery_exit': core.c:(.exit.text+0xc6c): undefined reference to `i2c_del_driver' Later upstream kernels fixed this with a larger rework in commit 703df6c09795 ("power: bq27xxx_battery: Reorganize I2C into a module"), but we cannot backport that to 4.4. Signed-off-by: Arnd Bergmann --- drivers/power/Kconfig | 1 + 1 file changed, 1 insertion(+) -- 2.9.0 diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig index 237d7aa73e8c..9f53fb74ae6f 100644 --- a/drivers/power/Kconfig +++ b/drivers/power/Kconfig @@ -159,6 +159,7 @@ config BATTERY_SBS config BATTERY_BQ27XXX tristate "BQ27xxx battery driver" + depends on I2C || I2C=n help Say Y here to enable support for batteries with BQ27xxx (I2C/HDQ) chips. From patchwork Tue Feb 20 11:54:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 128878 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp4554017ljc; Tue, 20 Feb 2018 03:58:55 -0800 (PST) X-Google-Smtp-Source: AH8x226xKbZy0afAEKmBDAYLgKMzqcRI5U1AC3mRiRG67FBkbfOAVrWYlCXBrK2xEbSIte8MqSkm X-Received: by 10.98.70.198 with SMTP id o67mr13965427pfi.173.1519127935606; Tue, 20 Feb 2018 03:58:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519127935; cv=none; d=google.com; s=arc-20160816; b=jqS17QG8dGapDj/ZA0mrVcZ1EGQUtv2VH9/lsTa/x3aiLXl3QqwMTxRdkki/nh4Q28 b/LcIicoq6yQFQhoStUiYZby60CPxMsV0KtPrLUqEYbqtJQaoXhBI2mNfqb+JJGKDN/8 MJgnZnp1HlG0sjr+jC9eq4yDf/bLNJXcRb3kMcM64Ih8zy4paeBfk8CAgUtnbbMSBhfH JXlOlFOdaIoMKZoORdCHpbbLc8WGTntGD4pbz50k8kpj57BXY+TfL0UBUXKyHO/2LSgE A+UEd/2d9P6M0pGWVhepK0UeSp1LT0Qb5uCvpt7NsLMpvOEVzkkjxv7EVVD/+HFwIQEr 3RcA== 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:arc-authentication-results; bh=TsQbhM6llL7bRy/pwFUnSs079+HvHOB8CRLe1iYWtIk=; b=ZBPGPskRwOPIDHx/vpZKxYcTsbXVzIceu7aC4xNnzQ9qofe6WdhL59uP5AD4pDdZiT gJzH9QYDjx8yU5cLR0EdtvVNrgGmPDgN7kISvUxa5aJVuT7mSUfT63mF1Izntex57GBU fC0J03NfUwlJlH/oPAfDXvfSyC26G6F6JMpw0lO+B40Ik1BO7QVYtrm4F2SUvzpNgEJC VaGV8IP/9O42oH30FutJCk5jFnR0KVO9szRfjGpXtSn8gS08rl6eQgmGNZ/EqNR8ZqQN pfQjbVOLIwegaDGeCxkWThPmXE640b3MpPyWia049KaDYUQoaRfbN1Dl3PtspDAtf318 o+YQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c1-v6si1422290pld.401.2018.02.20.03.58.55; Tue, 20 Feb 2018 03:58:55 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751634AbeBTL6w (ORCPT + 28 others); Tue, 20 Feb 2018 06:58:52 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:51837 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751560AbeBTL6I (ORCPT ); Tue, 20 Feb 2018 06:58:08 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue105 [212.227.15.145]) with ESMTPA (Nemesis) id 0LmLB4-1eFb5A29pK-00Ztbz; Tue, 20 Feb 2018 12:57:50 +0100 From: Arnd Bergmann To: stable@vger.kernel.org Cc: Greg KH , linux-kernel@vger.kernel.org, Arnd Bergmann , =?utf-8?q?Pali_Roh=C3=A1r?= , Sebastian Reichel , Dmitry Eremin-Solenikov , David Woodhouse , linux-pm@vger.kernel.org Subject: [4.4-stable 03/22] power: bq27xxx_battery: mark some symbols __maybe_unused Date: Tue, 20 Feb 2018 12:54:50 +0100 Message-Id: <20180220115527.1806578-4-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180220115527.1806578-1-arnd@arndb.de> References: <20180220115527.1806578-1-arnd@arndb.de> X-Provags-ID: V03:K0:Tq0dvcL5vtituVD2A19RseXktrCZb+tqGpX/7/6gkIfooUZDhNw og0Y+yK0FCXpJuKCoj6rbFeHDmGwAlIjHvS+ivfhp/gSJErAHVxPI1Yjz3wrDyPjYbtogzV x+rhY9JSBQ/OaC81cXe61eWFHvcgT30Lj67kaLJbksvLZ2pUUfktEz3alVusXnMZ1QClqFg dW+vxg7aaeYMtaM9p9Law== X-UI-Out-Filterresults: notjunk:1; V01:K0:3I55pnsjVAY=:UrBUrNuCs7yMA3NVlmd111 3dwwJuKU+21l55TaRio460GMOLtAwnvxV0nxmRIV7a2iSg5BpEhH746V3yLlklromNO2HXqwk t/eaOm39O+3+i58QBFhHMMRp3Latl5TINBol0DcDFkjjYZf4kY9mbHwSaJicF3VCO3GtqRd5h UTfLhBdCn4qfPbS58ZS/XGJKtoUkdWUdWLtYArZMgOQh1bRIqQhUQlP2ndShBtRL6FvssY7Ib 0OWHUcYH/juNuXPfGQdV2B4p5Z4pHIDE+0kxhhWKae4NcpN+piGspkldKHdrOKL3wYPD3tePd 8Jnno8PtOWNp0z/AE8UxpD32KQ2QMda7IvnNvtjm/3rHRtEuvt45Pd3sFtLD+8FL6bldnoeeu Fd+tCxylfef8hcR5zhpB6NLSkh/gtOXX7ozl9Vx7OlyN2g6/nMT0uSknH76CA7BjPb2Tgxrh5 raLJGcJxQYu00iJd2HngA6OXfO9iBNfNp5DonydaXMg4aCNFv5d1hkFRSJybwDBCui0RexT2n SwKRk3j6AQ3I/aeeLYkHE+YHNZ8eDLqi5ddM6hTYFh7KpYpIeKUMk7fagp3B48VZrLEZdwpCn 4rMS3m6c/2ONoApOz0F61oEPitMJYDaNZ3CLSbwtjRDvFXrFkK8en79BBGi5dYzXdA4VvOkrd LkZGfEaA+Au8+6RLoE31D9HK0sSgE9ZSPP4+HfxjZHCy9uvIiJC5POql1p5yT34n8bCNjNTCj ZqYteusBj4VsIEnMa38ZE+vU7tBJSduJctj7+w== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Without the I2C driver, we get a few warnings: drivers/power/bq27xxx_battery.c:288:12: error: 'bq27xxx_regs' defined but not used [-Werror=unused-variable] static u8 *bq27xxx_regs[] = { ^ drivers/power/bq27xxx_battery.c:994:12: error: 'bq27xxx_powersupply_init' defined but not used [-Werror=unused-function] static int bq27xxx_powersupply_init(struct bq27xxx_device_info *di, ^ drivers/power/bq27xxx_battery.c:1029:13: error: 'bq27xxx_powersupply_unregister' defined but not used [-Werror=unused-function] static void bq27xxx_powersupply_unregister(struct bq27xxx_device_info *di) ^ In mainline kernels, this was addressed by a larger rework in 703df6c09795 ("power: bq27xxx_battery: Reorganize I2C into a module"). We probably don't want this backported into stable kernels, so instead let's shut up the warnings by marking the symbols as __maybe_unused. Signed-off-by: Arnd Bergmann --- drivers/power/bq27xxx_battery.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.9.0 diff --git a/drivers/power/bq27xxx_battery.c b/drivers/power/bq27xxx_battery.c index 880233ce9343..6c3a447f378b 100644 --- a/drivers/power/bq27xxx_battery.c +++ b/drivers/power/bq27xxx_battery.c @@ -285,7 +285,7 @@ static u8 bq27421_regs[] = { 0x18, /* AP */ }; -static u8 *bq27xxx_regs[] = { +static u8 *bq27xxx_regs[] __maybe_unused = { [BQ27000] = bq27000_regs, [BQ27010] = bq27010_regs, [BQ27500] = bq27500_regs, @@ -991,7 +991,7 @@ static void bq27xxx_external_power_changed(struct power_supply *psy) schedule_delayed_work(&di->work, 0); } -static int bq27xxx_powersupply_init(struct bq27xxx_device_info *di, +static int __maybe_unused bq27xxx_powersupply_init(struct bq27xxx_device_info *di, const char *name) { int ret; @@ -1026,7 +1026,7 @@ static int bq27xxx_powersupply_init(struct bq27xxx_device_info *di, return 0; } -static void bq27xxx_powersupply_unregister(struct bq27xxx_device_info *di) +static void __maybe_unused bq27xxx_powersupply_unregister(struct bq27xxx_device_info *di) { /* * power_supply_unregister call bq27xxx_battery_get_property which From patchwork Tue Feb 20 11:54:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 128873 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp4553305ljc; Tue, 20 Feb 2018 03:58:05 -0800 (PST) X-Google-Smtp-Source: AH8x227iMl55QjKjKqyn9qqV/IJt4fcxlOqcPmIhK3sTH35dE4albQrYzysAWvtMCqWS7mMF61NJ X-Received: by 2002:a17:902:2bc5:: with SMTP id l63-v6mr17522232plb.108.1519127885712; Tue, 20 Feb 2018 03:58:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519127885; cv=none; d=google.com; s=arc-20160816; b=Um/7WFxKcPTPeSqJ6vgvTGHlhdnlhVZIO2HSxYs/hh767oF72s6GJyXbahIPijhZGK gjNM63YqgFRZv8PD/f3rT5p9aR5wioRpX3qszUFkQxx4Jj/RVRONGLbJ5sXx63m17rR6 Nt716xro8MHIh0i8c1Iyd/NjkmxD0JuvjrT45Ph2q9mHqoU5hosc04Phfu2A7sgSvkTc pckI67TBLypi/7F+vGMtWDsyBWIuc3HpzblWruCiayqXwElXEJpKHgh3s237n/XdeQWF 9fuRHKExhd3Js4StpIAyjYR3YbRXqKmg143HyydUXHe559KrmbEf7TMG4ANRuzb8CA+8 nwRg== 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:arc-authentication-results; bh=Fl7fdk2G+f0AMLPfy21mEwUJ81kbdXfmKKtoeRJptLo=; b=f5r9ng8buJ3D3XlsDPdA3z512vz6Z6NgQtgm97nNh1Mq+TEGNEUAg0VdObdDoKX/hQ +JjZAGzWSEWf4bcMR83LZ1snLf2laB7MwcPrJxvA57bI4zpD+dBA9Pi0tr4f9PL8cnPZ iTv5EXcM8FkQLEVmlgqwlBY0TqaxjW0TOYvwDyHS7KW5OHgTSvodu6OUQlyP+uoxlVDP Yyz52iQle4p11CcxpCvZeRlCpHY5m1ajlybDLK3jYj1f8pbRbC9MjKhVjkTqox53eo27 4jgp2076AnUHMB2o5v3FGCTyzBky8Z/5zl2Lsa5i6bxhJx2lWGNmphpdCsnzKpOYwDXC DLvw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e9si4976682pga.146.2018.02.20.03.58.05; Tue, 20 Feb 2018 03:58:05 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751726AbeBTL6B (ORCPT + 28 others); Tue, 20 Feb 2018 06:58:01 -0500 Received: from mout.kundenserver.de ([217.72.192.75]:58945 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751678AbeBTL55 (ORCPT ); Tue, 20 Feb 2018 06:57:57 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue105 [212.227.15.145]) with ESMTPA (Nemesis) id 0M4a7A-1eXohK31Se-00yivB; Tue, 20 Feb 2018 12:57:54 +0100 From: Arnd Bergmann To: stable@vger.kernel.org Cc: Greg KH , linux-kernel@vger.kernel.org, Arnd Bergmann , Karsten Keil , netdev@vger.kernel.org Subject: [4.4-stable 04/22] isdn: sc: work around type mismatch warning Date: Tue, 20 Feb 2018 12:54:51 +0100 Message-Id: <20180220115527.1806578-5-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180220115527.1806578-1-arnd@arndb.de> References: <20180220115527.1806578-1-arnd@arndb.de> X-Provags-ID: V03:K0:zIwe370LQLXA/9Kx1TyVFIRhjAMoHSQUdlpMtjs1cKFkA5yhYWn IPcY9t6RPE2MTSUkCeLYfwT2BBWYsBj7XJ0zaLh79Uk6ZtwKg+63v0J7iK7qlpzR9puF0se ivF4NTMCZ4xHNMoZV9jiVGk4lmPX1nlKnCf8uanfwhQWWIosQWooW6NfraPGvDhx6GKdTYW SWpc6noMgsNqKrYlBo1aQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:BsNSwTrm9U4=:/1B547Sw7qpdamF+dRgdp/ aRKswH94fMMoNIZkUQzqrzCc+i5exEZKVyZuCKWUBbg3cvDsAghripce3ZwJUzTQ/BbP/eflp N/L9so5bLiSvlpAclCP75gWs/EN22KBBz8/Gg2bksNJslQOJJkbc3i/wMyx5Y2oB5PeT4WYym TzRLJPgJIgzxA+mH+Du53Jugy9Vip/kzDKnzFdm14DQFiuHHwxEA1is6ikGFFs5Lzm6DRuwhw AqjVTlT3UPr1DucSqjIJCRj67/brD6vsKcSJrfMJkFHwH1qJ8oDH13g0iEaMgPNGQRbsNT6Tf VRPeDc8n/MVqz2JpiJj99NwMB7uq+K4OkDRRthJNweTnyBPtv8vsFt+/MlkBbdRiSbUFcekpS JK8kKoAEQ0mh3GfOYmorUxUg5Q7CbmnIWsnvR1e4NHLorAxLxD6shQ8uPHu09FC6916RuxN9u H8kI5FfMYJa5MKJBdmVNOWg+IqYmAaVq4oDJsuT9Ew0MEVN10PM7vDoqymn2VFjeEaGnYiZF5 oDfU5nvKnt6GBwCbNC+W7jV55TLYCBjQfgZUjjSWc1QL4y35km14ufIyVXxieqeU8IwYK21LU WDmTTPnlo21O1l3pvz2i7EMh4aDq8O1L3I9WxUnb95KFZhKxmTAzvAGmYN0A9562CPu8I6sh6 MLTDRyYIUaP/2xIn4WDOJN9YjzEWCIDW+Bt8PAMcgWtPyf4M8gzAXo9Sog31g4k0el7yFmMQ6 AGTVm04snQSk6cTYYD7QqpI/0DmvdYuhQmisDA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This driver shows warnings on many architectures: drivers/isdn/sc/init.c: In function 'identify_board': drivers/isdn/sc/init.c:484:2: error: passing argument 1 of 'readl' makes pointer from integer without a cast [-Werror] In newer kernels, it was completely removed, but for the 4.4-stable series, let's just shut up that warning by adding an extra variable to do the necessary type cast. Signed-off-by: Arnd Bergmann --- drivers/isdn/sc/init.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) -- 2.9.0 diff --git a/drivers/isdn/sc/init.c b/drivers/isdn/sc/init.c index 3597ef47b28a..09fc129ef2fa 100644 --- a/drivers/isdn/sc/init.c +++ b/drivers/isdn/sc/init.c @@ -441,6 +441,7 @@ static int identify_board(unsigned long rambase, unsigned int iobase) RspMessage rcvmsg; ReqMessage sndmsg; HWConfig_pl hwci; + void __iomem *rambase_sig = (void __iomem *)rambase + SIG_OFFSET; int x; pr_debug("Attempting to identify adapter @ 0x%lx io 0x%x\n", @@ -481,7 +482,7 @@ static int identify_board(unsigned long rambase, unsigned int iobase) */ outb(PRI_BASEPG_VAL, pgport); msleep_interruptible(1000); - sig = readl(rambase + SIG_OFFSET); + sig = readl(rambase_sig); pr_debug("Looking for a signature, got 0x%lx\n", sig); if (sig == SIGNATURE) return PRI_BOARD; @@ -491,7 +492,7 @@ static int identify_board(unsigned long rambase, unsigned int iobase) */ outb(BRI_BASEPG_VAL, pgport); msleep_interruptible(1000); - sig = readl(rambase + SIG_OFFSET); + sig = readl(rambase_sig); pr_debug("Looking for a signature, got 0x%lx\n", sig); if (sig == SIGNATURE) return BRI_BOARD; @@ -501,7 +502,7 @@ static int identify_board(unsigned long rambase, unsigned int iobase) /* * Try to spot a card */ - sig = readl(rambase + SIG_OFFSET); + sig = readl(rambase_sig); pr_debug("Looking for a signature, got 0x%lx\n", sig); if (sig != SIGNATURE) return -1; From patchwork Tue Feb 20 11:54:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 128874 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp4553378ljc; Tue, 20 Feb 2018 03:58:10 -0800 (PST) X-Google-Smtp-Source: AH8x225eDzA+L/6apHp1/1ZoU4yZ43A5Lkih0izpZ7c75l43TlC+y+M4b0X/BvDl7/zpOCJCfS0D X-Received: by 10.101.90.130 with SMTP id c2mr15090553pgt.310.1519127890232; Tue, 20 Feb 2018 03:58:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519127890; cv=none; d=google.com; s=arc-20160816; b=suNwj3p2PpWOa6kFTzGGsa/T5VDv5ucXM4ey+OHBFATS/aJShBInlBe7x9BzNnuR6e qpCNjjulgMy0yktBFkQxZd1V9WPdJyvIYsylWQSO5YhOZCso758uqKVsxAzPkiqSX+ac JRxERFx9NNu8quiU18TJ8MesoiYkUNW4KNHtWB5PfdV8buNc+wAvJqMbwY0qjRzm+F2e Foga02fCtj1Dfw5Ou414ClTyUXvx8quyGSHsXRIRm6jSjc6vG4va/mi0FzaX1ERJ1ew5 X6BolzG32lecmt6j305+TBOuuiQ/Du7g/JNCbJJxnlB8vsHG63VGuPliXdWqDgd3za5P U3CQ== 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:arc-authentication-results; bh=3EXdaR8klswLR8IkrfgcsX4O2930oPg7dMD1Fm2rf48=; b=oZBN/IwqdVbUgRTCSmN6JsqBt+F9o3rbPXPFMtcm6xZuH3dgaeZjbiD0CU4cvnrZjq VM5FkxX+1gi8iMGdp4uTz4iPiv8lA4er17phyfjP8Y88vGGNbozcA9H9QheG/Kie/kEG QVy+T0N/9J8HJPr36uMYVZyUO53UpLyilvpPnIVkrW7foKsCM1wznfV1R9xB9F3zoKdr 0u8VcTxjzc09gjIrP0D17kE6rBOVoL6SaP3KtBb4Kj7LoDzV1SoVw87frPgQxpUZbTtX l2W+Zwv5zHn2clELuB4zR3YfgZ0BQf6YSkcYn66ffwNC3KZcC0slPWn9dV1OUdFnuh2q kA+g== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 44-v6si5549563pld.724.2018.02.20.03.58.09; Tue, 20 Feb 2018 03:58:10 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751756AbeBTL6E (ORCPT + 28 others); Tue, 20 Feb 2018 06:58:04 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:49671 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751678AbeBTL6C (ORCPT ); Tue, 20 Feb 2018 06:58:02 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue105 [212.227.15.145]) with ESMTPA (Nemesis) id 0LjbM8-1eCpvr3nzM-00bXEz; Tue, 20 Feb 2018 12:58:00 +0100 From: Arnd Bergmann To: stable@vger.kernel.org Cc: Greg KH , linux-kernel@vger.kernel.org, Arnd Bergmann , Alexander Viro , linux-fsdevel@vger.kernel.org Subject: [4.4-stable 05/22] binfmt_elf: compat: avoid unused function warning Date: Tue, 20 Feb 2018 12:54:52 +0100 Message-Id: <20180220115527.1806578-6-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180220115527.1806578-1-arnd@arndb.de> References: <20180220115527.1806578-1-arnd@arndb.de> X-Provags-ID: V03:K0:AQmQf7SU2ti+TA1dVDcOP0BrHcYYG4evrZ/sdFZm0KTWOpgYV7Z a6tyucQmqG+l63+TLuoFpUINwxUavsNI+66m2ej7sysNljkYzwVS8bwiv2+tuSww0GBSL+N M4Jcd2ml6ks3wlh9t8s2INe0tzF0uGqyjekZUsf6mIBO6oGUhmjScBfZzjfoGRUMQvM3aRl jwe2+nlsxGHLBxO1DobEA== X-UI-Out-Filterresults: notjunk:1; V01:K0:BbghsELhevc=:2zB/VW8D21kisme6mBC0x3 raryyLwCn++w8c598KsLBvWDVfIKl6L9hgcDEoBjDmytDq/w19a1vccLhYQozQKvaZtTq8r+o Zd/k80DGooDW97KnSf90SweWuuHz97MB1P/bVHeKUolP5nGZkQq3leDhge0ba2LLynl1iLOHf B3aUH8jRTQCtReMXIFUAQnrnDJOwJ0FCORwfnOry65/MQE2ZzG05hkAkYGh9IIaUW6OSnhvxd mdl45APJDYVayudVvGdWvtowgUwGvvZmfS5L2UhrsdOi9Sn/XSVQ/n/oCY2uGASnuqCRdJPQf 2EdFJCJWV0I/+u0y+YuRlHbYwTBXKYKiFyxgppShru0qdwE+hB8tvY2UGlMeA9udR+pPCl6oN sTWCxdkWRRPYkRlP8nKFXNNfa+c9Do+eRenKBZIYkMlxGrKvVEUxYvZamA/P/67k7lYRqwFy/ T/2XwouGK6r3t1xAnWKmFtWGk5M6eOnX/FfdBeGBlg1qrV5vIvmb/vWibdVtjk6dk1rQpCZfc JSLZmwk5MnMF+zMEUEGc1ELgQSVORv30xAI6MXqYXTnhYKRyFtCM25MRbcG9YoDiW3jnjXJuC uHExB35utVIHCLiubCw+OQwJCp3RIKqzuwNO5npK+vHLlOMYMsXsWNKpQg2qRYFdyFRcmTiGD TkCPyQiEj4u3yvCAxVROZQQRp/ObplpR3CkwCTAVqeY31kfS3DMPcl0vXd+haGpTJ6MrkwGw1 YoJ3VCQoY7DBP3AvSCA7itrdMWA++gNRbToDTQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When CONFIG_ELF_CORE is disabled, we get a harmless warning in the compat version of binfmt_elf: fs/compat_binfmt_elf.c:58:13: error: 'cputime_to_compat_timeval' defined but not used [-Werror=unused-function] This was addressed in mainline Linux as part of a larger rework with commit cd19c364b313 ("fs/binfmt: Convert obsolete cputime type to nsecs"). For 4.9 and earlier, this just shuts up the warning by adding an #ifdef around the function definition. Signed-off-by: Arnd Bergmann --- fs/compat_binfmt_elf.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.9.0 diff --git a/fs/compat_binfmt_elf.c b/fs/compat_binfmt_elf.c index 4d24d17bcfc1..943be5ecfcd9 100644 --- a/fs/compat_binfmt_elf.c +++ b/fs/compat_binfmt_elf.c @@ -51,6 +51,7 @@ #define elf_prstatus compat_elf_prstatus #define elf_prpsinfo compat_elf_prpsinfo +#ifdef CONFIG_ELF_CORE /* * Compat version of cputime_to_compat_timeval, perhaps this * should be an inline in . @@ -63,6 +64,7 @@ static void cputime_to_compat_timeval(const cputime_t cputime, value->tv_sec = tv.tv_sec; value->tv_usec = tv.tv_usec; } +#endif #undef cputime_to_timeval #define cputime_to_timeval cputime_to_compat_timeval From patchwork Tue Feb 20 11:54:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 128879 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp4554322ljc; Tue, 20 Feb 2018 03:59:18 -0800 (PST) X-Google-Smtp-Source: AH8x224gW2U9zneqoHJY+zgXSqjZojrwXEFBKggJ2yl0MvnMVOL2EeQlU5yh6Hl3GIoVqfQ0EXHZ X-Received: by 2002:a17:902:2702:: with SMTP id c2-v6mr17315493plb.342.1519127958379; Tue, 20 Feb 2018 03:59:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519127958; cv=none; d=google.com; s=arc-20160816; b=t7FMxO3SflpStAH7/3fxRIBuP906EBXL+T+KKzDlzDn5udnDNb5fDheWEh/1i2wfAR xgifqh6MBRsczX4TkkBy/Co+9gWSlqgLDZ5xYka/UGSEbj8NRNA0xOnlzJgIIFGfDogV onClLvWNRihvpX3fXzLtbaEMXEPuHIMUsdUId6iEJc/ZvjbK3qZKKpNK7XCDZ2XFqYM2 wfljjSS5lkhhyoLwOp4wRJ8uHnMgn0UOl/y/mrkB/N5o5v93lbFx2fuXekNbjYNX69YY bPTYSKEiGot7bstxEYmj82OJWtu4JHeyH8ORgbGCYTo7yB7hSJL/uN1Ez/hEfTL48v9U MduQ== 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:arc-authentication-results; bh=Z0S1j3hz8v2hsL211MhMKIP9Xvjd89cEAimb7ZObk00=; b=fUr+ln4vKfNSarMmbH1MVGxzPV3NyX2Io6M6SwnS4tdHxaCbjL+Gt7RCqZXw07eM+k v5TyV1y1YRm/CheFnndd1SeR5skFM1Rpv0ZngTQmkBBQRxWeTv2zdF6eJBGCMrC4VkWk urzv2t1ZBC9FmLvbfzl3qmAe07lTuphGLljn8uudSFIFvY06SUozSjH4wBrC5Nt/+JSJ Y+0pFOLs73kH1AVD7H5KCaAjlzmse6KYeA7ggDMRgpiiRuzeAcbLBOeX6sM8WTVPu9hf VTkkEzVPQPVsdXvsc3J/6YsZxJ2JjyWr0RxO1GhZyOeGArOWXi9toioGtZYxCa9XXSza QTww== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o25si1928129pgv.520.2018.02.20.03.59.18; Tue, 20 Feb 2018 03:59:18 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751858AbeBTL7L (ORCPT + 28 others); Tue, 20 Feb 2018 06:59:11 -0500 Received: from mout.kundenserver.de ([212.227.17.10]:53621 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751482AbeBTL6I (ORCPT ); Tue, 20 Feb 2018 06:58:08 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue105 [212.227.15.145]) with ESMTPA (Nemesis) id 0MF4A7-1ezyP01InT-00GHIk; Tue, 20 Feb 2018 12:58:05 +0100 From: Arnd Bergmann To: stable@vger.kernel.org Cc: Greg KH , linux-kernel@vger.kernel.org, Arnd Bergmann Subject: [4.4-stable 06/22] idle: i7300: add PCI dependency Date: Tue, 20 Feb 2018 12:54:53 +0100 Message-Id: <20180220115527.1806578-7-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180220115527.1806578-1-arnd@arndb.de> References: <20180220115527.1806578-1-arnd@arndb.de> X-Provags-ID: V03:K0:audqB6t/TKtFuP7xXeMHPpE15je6SNsN6H29ASBsGwcioxtYxRx INUR8GjMlOm43y10rc36MBBp7GfQm/mg4igCeVntvN+ThKmVstnxtiWGKB/XbWgXsO6m7sB eFojdYSVLtaX67YAJBESmc7f3hSMnDEZhTbsu830GvG2TtkjKLP7g0pXarRAioASPdmYkiD OSChE2TjHQmK2tC3eAobg== X-UI-Out-Filterresults: notjunk:1; V01:K0:lZtYoJsoWZA=:BJeO4JbQV4m8JykqZ6CqS7 KwXBYO2ehmblhpNY8gpFCiZ+Yj8eZIpDdatDkLInfcvGpLc6zBWLJ0H+q81uTwOwuX8xoa5lu Zfk7ej+cg0qo52+Gi23le81/FVrNMC0yAdUt9DA2vV4UhZdK4la6fUCJIHt4YaebYPIff66hz eo7jo6SNJtUBCdhlqb5TL/DpocZeKo0/qSYsA6D0X/llUlneq9744vTrm87qo96sYqKaf71b7 5/M1PgBL70EdjnksKNXAIkhw1XUzpdnieaiqwyAyLJuN8vfwAZYKSHGU+RBoGIhjlzx4jb190 U5qRAeLw+En+4Hdd+lkf23gqiiQaWd7/es/h8l1GF9GpB/Rz0Q7b7RwIz9JsLDPX2m2kXTErk WBo95NA3jpxRJ1VxbO4LGkBKNscVIxPBcYwkwxNa4ENMB63tBet71pKZPQOQ0+10v5NnY3qWH V2Fqa7IrUoLH+voV4t/U7wmizQ9piecMbjWpwxQMkFqW3R+WEfHiOmt4+YN7oA8oDfVuTgidi RUaNJmM3CIiu4QbbDdchdAhqWH3qMZYgSfQcCbb4WLQEYJRvaCoC43Vf/PRR72WO7J0E4Ls7U ZYtjB4gPzzthK1ZlxXpJYBMMepc+ZJ/PUyHBbRrj/DlO/KFwXixjJlP10QYhlT/y2DlFIty4V hkM3378n3r80lP8LHHwvbfLY2+KVqBRWiHSRuoX3hSnGQlFfONQlqfZHMitwEb1eHt6Old3qq o2V/aJM+lLLLVsG5tBPeUGjAf/27ujKRUwNw5Q== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org GCC correctly points out an uninitialized variable use when CONFIG_PCI is disabled. drivers/idle/i7300_idle.c: In function 'i7300_idle_notifier': include/asm-generic/bug.h:119:5: error: 'got_ctl' may be used uninitialized in this function [-Werror=maybe-uninitialized] if (unlikely(__ret_warn_once && !__warned)) { \ ^ drivers/idle/i7300_idle.c:415:5: note: 'got_ctl' was declared here u8 got_ctl; ^~~~~~~ The driver no longer exists in later kernels, so this patch only appplies to linux-4.9.y and earlier. Signed-off-by: Arnd Bergmann --- drivers/idle/Kconfig | 1 + 1 file changed, 1 insertion(+) -- 2.9.0 diff --git a/drivers/idle/Kconfig b/drivers/idle/Kconfig index 4732dfc15447..331adc509f3a 100644 --- a/drivers/idle/Kconfig +++ b/drivers/idle/Kconfig @@ -17,6 +17,7 @@ config I7300_IDLE_IOAT_CHANNEL config I7300_IDLE tristate "Intel chipset idle memory power saving driver" + depends on PCI select I7300_IDLE_IOAT_CHANNEL help Enable memory power savings when idle with certain Intel server From patchwork Tue Feb 20 11:54:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 128876 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp4553537ljc; Tue, 20 Feb 2018 03:58:21 -0800 (PST) X-Google-Smtp-Source: AH8x2253wblqPKSWPEYvz2+0m6VpsnlLHovSP+pK4FUfdOECZd1egVc9PHGChkG8jhY+3I9UGPjl X-Received: by 10.98.73.4 with SMTP id w4mr12977490pfa.227.1519127901697; Tue, 20 Feb 2018 03:58:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519127901; cv=none; d=google.com; s=arc-20160816; b=R9oAw3BLUbHzC+6cO+MOEH6q7WV5k1t2urfNlCRsNfLKiqfkL0JPD1TYifCFJ2mNPu 7G9MUd3J0UmkpoqtWciKWH/VPQwVsQ8WXkPTlKr7JrVjzF/0c0k90+JxmKIRvXxiVwfJ T0oqdNyehQdk4UIGBCZ3OoMym3YYyD/EYNl2TxueONw+qb25kAe61iTwNOsyQeqpaV9M NuiNreFcWq+JLpJ1yNkc2wi5Yt0Fin+oh9k2WEOMHPcGkomENjkQ/6a2dEOPjyUZl3Fp bIbHJScP45x5LYEKZ1i9JQ+3MiTtiJMiMQlUPRogjcwf/UCGQTrgcE2VhgBz+yOLzhlU x+uw== 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:arc-authentication-results; bh=STSrsdSZmoUlUAqVwDcFIBAqos3dA4rp7T4aA2+T7O4=; b=JYq36YU4skKIAXyV0TljRfLnTzPCMwWEL4ZnOkr4gOLMUOHYsg7xCvEHt1kR/XTz17 JhVullwud8f5HKrsVu4c/8W8TzQi9FpIxc1F/dbbBlci9/GLz7HcsK4ucPvaWKqs6f6y Ng1rqNX9k6VLQDskAdf84BXY8EnGVY1kVOvh6GLFlGiIWlGHhAMN636atqFsHPGG9df5 HVuL71FGAhpm2Uyk0z0S9cIoWLGNR/RxbQVyNPUaC8vTM2iztFKi9t/4xGnd0+8XeN5u gUTWe7EEigUjKwVlffCS8BDiZpd7AkH+cplCpyv5Kp04E99iPH5fO0RYTRyoQrLMuyhC LQMg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h132si2645311pfe.12.2018.02.20.03.58.21; Tue, 20 Feb 2018 03:58:21 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751813AbeBTL6S (ORCPT + 28 others); Tue, 20 Feb 2018 06:58:18 -0500 Received: from mout.kundenserver.de ([217.72.192.73]:56953 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751733AbeBTL6O (ORCPT ); Tue, 20 Feb 2018 06:58:14 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue105 [212.227.15.145]) with ESMTPA (Nemesis) id 0Lwqt6-1ehkrK1CO0-016S9F; Tue, 20 Feb 2018 12:58:10 +0100 From: Arnd Bergmann To: stable@vger.kernel.org Cc: Greg KH , linux-kernel@vger.kernel.org, Arnd Bergmann , Felipe Balbi , linux-usb@vger.kernel.org Subject: [4.4-stable 07/22] usb: phy: msm add regulator dependency Date: Tue, 20 Feb 2018 12:54:54 +0100 Message-Id: <20180220115527.1806578-8-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180220115527.1806578-1-arnd@arndb.de> References: <20180220115527.1806578-1-arnd@arndb.de> X-Provags-ID: V03:K0:miWI7lIqEySruyoPC5QOab508UIXOc5C36Aq6xCvquT+69B4jFs ouZeQIm9pKPio9VfFNJM1U9WfJLi3N1vvgrWS2Hm4GB58HzlQtXMkZV+poCvoL/9ehpJz0m B/D81jGIE51ws9joOcFJjJZd2STkb7f0qaz1EiOuOT3+uimFSI2dsWqTeEcj1sxzuKPZr7N D5A+VuLiSXc4nGuVO5RYg== X-UI-Out-Filterresults: notjunk:1; V01:K0:7m2px9/9L0M=:VObOA2bj8KFL4+s/3LQghN S6YdxPk8dshAE5IA6joO70VrSv7tLOhs8R9KsHpkOe/FzOl1CUIjHr4m/3wwf/VW2XUUJuDK7 4nONGhH+kChAUi42QExqmSWWCsE+cM+LUmkaEyC+f7xmrsi9YB+mrh/tNiKk5h+hoNyfFrXSw ljKLegdFWhxqu2vK7TYV+s72N+8fi+FaZ8uAI61tCWsSXI7TV59ER5XkFMmLLRB8KH05hcapD 9EGq+Qfko9krvgc7MetpqDkjVPs1/MjK2mv1DNgrgf+7NCt7bbS3qIig6sANr4e958B0DpCHG 34NE6LYI4ClLsYFqiASjCRmxOyKrzb0LJr24WV9P4fWGsebM9KWFeCZ9SbI00+edWP+/g/3GS u0wkcM6Ko8uf5uADMGkKGlC03L7CzWXRJRJiY0oC1+S0Ag/Nhr0ejs57DZZpTWZr515r2HsoO lQQjcjZTFPgiheevLw0o4XdNsEEXh5cVhJwzqq0LQ79je4v0CnDyu/nhqH70zpzJLM2mh6Ga5 yi/mAu8t64h3D9gNPjGo4mzQuugQcWkCIdk/Lq1aSXo7r33bokE95kiaXnAqQYsa3zQxUvA6f S53FFVwQYA3vHbyomvrME+e6pLVSCbn1Fj23s7NrZyjYxMRK7ggX590IK6cJFxNsUmG7hEg4U iuvKZsqgWdSe7ekUaW+GIhkG4Nt7CfsK/sbmJIUJelrvd3q27AacrLkQqFg/f9lFOT2Umt8VL I25YNTjJISG39461qkgW//Z2fBDsiLjpMGT0+A== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On linux-4.4 and linux-4.9 we get a warning about an array that is never initialized when CONFIG_REGULATOR is disabled: drivers/usb/phy/phy-msm-usb.c: In function 'msm_otg_probe': drivers/usb/phy/phy-msm-usb.c:1911:14: error: 'regs[0].consumer' may be used uninitialized in this function [-Werror=maybe-uninitialized] motg->vddcx = regs[0].consumer; ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ drivers/usb/phy/phy-msm-usb.c:1912:14: error: 'regs[1].consumer' may be used uninitialized in this function [-Werror=maybe-uninitialized] motg->v3p3 = regs[1].consumer; ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ drivers/usb/phy/phy-msm-usb.c:1913:14: error: 'regs[2].consumer' may be used uninitialized in this function [-Werror=maybe-uninitialized] motg->v1p8 = regs[2].consumer; This adds a Kconfig dependency for it. In newer kernels, the driver no longer exists, so this is only needed for stable kernels. Signed-off-by: Arnd Bergmann --- drivers/usb/phy/Kconfig | 1 + 1 file changed, 1 insertion(+) -- 2.9.0 diff --git a/drivers/usb/phy/Kconfig b/drivers/usb/phy/Kconfig index 22e8ecb6bfbd..7a72bef35acf 100644 --- a/drivers/usb/phy/Kconfig +++ b/drivers/usb/phy/Kconfig @@ -140,6 +140,7 @@ config USB_MSM_OTG tristate "Qualcomm on-chip USB OTG controller support" depends on (USB || USB_GADGET) && (ARCH_QCOM || COMPILE_TEST) depends on RESET_CONTROLLER + depends on REGULATOR depends on EXTCON select USB_PHY help From patchwork Tue Feb 20 11:54:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 128884 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp4554806ljc; Tue, 20 Feb 2018 04:00:00 -0800 (PST) X-Google-Smtp-Source: AH8x2275qX9pj7TsA+NMt+D6H0aZ88rIEfz54hVVYi7ffNvopCX1XlAmvlu6AaV0f1KeHaML6Evf X-Received: by 10.101.76.143 with SMTP id m15mr15251036pgt.445.1519128000178; Tue, 20 Feb 2018 04:00:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519128000; cv=none; d=google.com; s=arc-20160816; b=fupejc2bTge2IrxWKqmKRyULHYWMo0lSZN07IMtr+e7srZXPFZ25YTTLHrfd8fAJox 1btQbH0V75lmstjyT0nDXvi8YEZcYuIm6Hq+A1RI8zqYAwE/dTqSlCYnR5RQrFBG8zxd Y2emK6d/yVUUGPqj67CYUy7jonEKJh6yB3siyIFZnfEjANNO3b/BztRjAlkxkNcnSe8o PczK54e9rbd0RdLQQ7Ro0z28ORiZmLgAcB2iK5tGMKMp3BfsnJ5QpUj8oWuAMUivp2dA 5HIxt4k24VHL7oXZyv+Olokr2O1eqIC65AYlvJVE9yxVsdEpChro9PMm344mVVTpDI5y mfNg== 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:arc-authentication-results; bh=0Yp9wLbDFpr71FOE0lz24WGMmXSOsBN7UdooN2sLTAE=; b=snRmqv6gEqYMy4gqKwU75GspF2a38INUY6/NpmXeg8PoeOEsWBHMOQZE5tjImwlOXA sKPf+ZhCe1KCYUba93HiTOxooje/tDOXyhmw37tMV4LnShIHcSjc9ZaGvsjZOsI0Of67 N2bn2odwNk5v+zWKejdb0YXkylgKCuOZAmzR56IYwCbUka3EXNK4DoCL21zuWch9ayHD HVE9nfNiqXCCxRApXGHvh7zcQ5bI3c/Aj8420qbQYlYlrFCp1C50PTtDeZwb67S4iZsa NxNPFjpg7OVx5WF4V985ziIpe3SHaZ0MPcSTMvr4LoRDOEI/A9HOydIXay/f201BEjAo 0MFg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u19si5709827pfh.326.2018.02.20.03.59.59; Tue, 20 Feb 2018 04:00:00 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751961AbeBTL7y (ORCPT + 28 others); Tue, 20 Feb 2018 06:59:54 -0500 Received: from mout.kundenserver.de ([212.227.17.10]:38843 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751450AbeBTL7u (ORCPT ); Tue, 20 Feb 2018 06:59:50 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue105 [212.227.15.145]) with ESMTPA (Nemesis) id 0LgosA-1eRk8518Ew-00oFbX; Tue, 20 Feb 2018 12:58:59 +0100 From: Arnd Bergmann To: stable@vger.kernel.org Cc: Greg KH , linux-kernel@vger.kernel.org, Vinod Koul , Mark Brown , Arnd Bergmann , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org Subject: [4.4-stable 10/22] ASoC: Intel: Kconfig: fix build when ACPI is not enabled Date: Tue, 20 Feb 2018 12:54:57 +0100 Message-Id: <20180220115527.1806578-11-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180220115527.1806578-1-arnd@arndb.de> References: <20180220115527.1806578-1-arnd@arndb.de> X-Provags-ID: V03:K0:+OGUARZvbYaC61ThZMhc0pohW4ZOlbZQTsUpwbQCZDBN3j5JN1R eOzhxO/zIGB6b7+jiiySKXXBWhx1b0w9ryWyAzr8tk1277zvDvU2Y/nBt6SSCSzuOR2ciGz WHDJl5yl+HP0Z/nfFhcEffUNd2u5wklV0u+K2d16a1IqP1iowYbuwjxCZEaEQP2z9zzj745 0CMAnc7Um2L/7FO1fedDA== X-UI-Out-Filterresults: notjunk:1; V01:K0:+XuUA9Rv3+0=:4D1gNETQp8DqiKbRqWW4/p /Uo/UnxipSUi7IqzIm+LlUYSamP+RghEifOUetC0dWyjS++RmoTccMG38Ieffzk3is2RM2QNQ zzhu1h39hhf4Zu/4r1rNMw2cKzZM28GpjuwB9oZm6GcDmf90MGRi+D2km1SLNM3guEAZg0Jkc OlaSw+4o+DCB2Dg8JIH+Nvzj56wlb7vgNX8srvoWc6YrTmLo65NljwUdjTGnEY+3vyB230C84 1y0v57YRVJ0pYPlJfAAh1gU1wKm10q+BOh3n6EsR3fYBPlVk1Pe3DIK64de/SoZTIbrRhzVtr oWAWMSrc5VH2K/rW5/UTamh0fbz1IurPqTVTOkk7jWiUnoi6LnHgCexHiO/59figsf9nIq1c5 Nq6PIyZg0Lx6K5SFJQo3YOvkxNQFGzBuqB22X8AOOSWqWevtK6LRjNOJfe6MRZBI576hFkrI0 M7AjNjdPoKSz/F/CfUUJ/QAJO2ed0MEQpMcXxekZA+AuWZRK1d+H8bx7wn9NQY60X2XXMJCA/ vt70OEWtxozDprrfIPNc9JjBG6GNS6O+r+yTWt6vKuhybq/dhjozXGpecjs/X7BXHPhUZXDlF gChDSS0xUVYeEyw6+9l/kj2joSxX6RB7tSxMG3dHT6ompsxU6ssmWIqia/flSZvzU9GEZx3yR ExGdWE4HiW7S2x0DVl7pgRVUQaeRB49tCnROwhsonuzevnkgW4HlzZm1s/uHCI++dO/X0pbCf 8/sXgAqG8vnUBW3rC4RNCAJkjRbOoRrg/h7nVg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vinod Koul commit 3493d4a86457c7de9f1e602b4267c9b0f9ec1c9f upstream. Randy reported following error when ACPI is not enabled: warning: (SND_SOC_INTEL_BYTCR_RT5640_MACH && SND_SOC_INTEL_BYTCR_RT5651_MACH && SND_SOC_INTEL_CHT_BSW_RT5672_MACH && SND_SOC_INTEL_CHT_BSW_RT5645_MACH && SND_SOC_INTEL_CHT_BSW_MAX98090_TI_MACH) selects SND_SST_IPC_ACPI +which has unmet direct dependencies (SOUND && !M68K && !UML && SND && SND_SOC && ACPI) causing these build errors: In file included from ../sound/soc/intel/atom/sst/sst_acpi.c:40:0: ../include/acpi/acpi_bus.h:65:20: error: conflicting types for 'acpi_evaluate_dsm' union acpi_object *acpi_evaluate_dsm(acpi_handle handle, const u8 *uuid, In file included from ../sound/soc/intel/atom/sst/sst_acpi.c:31:0: ../include/linux/acpi.h:676:34: note: previous definition of 'acpi_evaluate_dsm' was here static inline union acpi_object *acpi_evaluate_dsm(acpi_handle handle, CONFIG_SND_SST_IPC_ACPI was already dependent upon ACPI, but that was not solving it. So move the depends up to machine drivers and remove from CONFIG_SND_SST_IPC_ACPI. Reported-by: Randy Dunlap Signed-off-by: Vinod Koul Signed-off-by: Mark Brown [arnd: rebased to 4.4-stable kernel] Signed-off-by: Arnd Bergmann --- sound/soc/intel/Kconfig | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) -- 2.9.0 diff --git a/sound/soc/intel/Kconfig b/sound/soc/intel/Kconfig index d430ef5a4f38..79c29330c56a 100644 --- a/sound/soc/intel/Kconfig +++ b/sound/soc/intel/Kconfig @@ -24,7 +24,6 @@ config SND_SST_IPC_PCI config SND_SST_IPC_ACPI tristate select SND_SST_IPC - depends on ACPI config SND_SOC_INTEL_SST tristate @@ -91,7 +90,7 @@ config SND_SOC_INTEL_BROADWELL_MACH config SND_SOC_INTEL_BYTCR_RT5640_MACH tristate "ASoC Audio DSP Support for MID BYT Platform" - depends on X86 && I2C + depends on X86 && I2C && ACPI select SND_SOC_RT5640 select SND_SST_MFLD_PLATFORM select SND_SST_IPC_ACPI @@ -103,7 +102,7 @@ config SND_SOC_INTEL_BYTCR_RT5640_MACH config SND_SOC_INTEL_CHT_BSW_RT5672_MACH tristate "ASoC Audio driver for Intel Cherrytrail & Braswell with RT5672 codec" - depends on X86_INTEL_LPSS && I2C + depends on X86_INTEL_LPSS && I2C && ACPI select SND_SOC_RT5670 select SND_SST_MFLD_PLATFORM select SND_SST_IPC_ACPI @@ -115,7 +114,7 @@ config SND_SOC_INTEL_CHT_BSW_RT5672_MACH config SND_SOC_INTEL_CHT_BSW_RT5645_MACH tristate "ASoC Audio driver for Intel Cherrytrail & Braswell with RT5645/5650 codec" - depends on X86_INTEL_LPSS && I2C + depends on X86_INTEL_LPSS && I2C && ACPI select SND_SOC_RT5645 select SND_SST_MFLD_PLATFORM select SND_SST_IPC_ACPI From patchwork Tue Feb 20 11:54:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 128881 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp4554445ljc; Tue, 20 Feb 2018 03:59:28 -0800 (PST) X-Google-Smtp-Source: AH8x227X4b9PPpgx5D3y4FJ37pf/okefWtqlwrf63/nBhxwHVIj+51GHEzHUUFbunijPiP5vwWm/ X-Received: by 10.99.165.71 with SMTP id r7mr15111833pgu.60.1519127968752; Tue, 20 Feb 2018 03:59:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519127968; cv=none; d=google.com; s=arc-20160816; b=MOwTfczmMs3rgnxjX7qipElCHgSvWvjY43WmXeEYx6Riy/SoMro+ipX9YDlYwnOL+z u4CT+zDSVuOt7dpQNoHOHYTayAiyKew90xeSHMEOCgkpNpZ6MvK5g5/T0edom0OYRR21 nWIxYgg8eRX9x3O1YP5VaGBeZZ52E4jMnI2fTZZQdr2CuOJnCXMg+RIeWJqxeVa6Kz2m q5HQdbbDXdXNBRo/+kXcIOdiz61esAZZ57kykOJS3oCDaZTCBPPbxvlBiplerfytCe8k dyQ570oJXMi65L4QAowiNJ7vbzsm9tTZu0z1LmBPYcwLfrM7YuU/NZOJwGkryiiRWJI8 P2tA== 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:arc-authentication-results; bh=w/kY3moN5fjW4Ri+T2lNxreXwUdwZ9LA7wrDaiuBch4=; b=vXBVydD67UJVEDP2FPejszraUr5lDCY6o756Z4Ixi7D8F/CVdiDObAXPjzx0iQH+5P 2HeJwpQxSmQ9BnKMskcFZOK56e7BSPxUIH645du7LAJFQS6mdhgsc5zxpqqjM59r8yaI oo2EE7MkFoMgw0XHlwSvBRxbZ5vo2f1Cbc0OsNld0lbvmDkiLFTtPLpdlu0NO1jA5ENQ xhzKW2FY5g3HPdWjzc2KwzzgyyDBiHpJTps+6KOgHTv/O2GyaSIJZ8r8woCYEadoBuiS gI1T7dfAwBmVMfwBptCU6TP5OAKc2oB4SAPfgGHKemmNtGS7UFbN8+JI2ZpAvBDn4F0u NqkA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u6si2165284pfd.236.2018.02.20.03.59.28; Tue, 20 Feb 2018 03:59:28 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751910AbeBTL7Y (ORCPT + 28 others); Tue, 20 Feb 2018 06:59:24 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:58791 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751868AbeBTL7T (ORCPT ); Tue, 20 Feb 2018 06:59:19 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue105 [212.227.15.145]) with ESMTPA (Nemesis) id 0MTgbQ-1fEbgn38Hw-00QVcr; Tue, 20 Feb 2018 12:59:13 +0100 From: Arnd Bergmann To: stable@vger.kernel.org Cc: Greg KH , linux-kernel@vger.kernel.org, Arnd Bergmann , Ladi Prosek , "Michael S . Tsirkin" , virtualization@lists.linux-foundation.org Subject: [4.4-stable 12/22] virtio_balloon: prevent uninitialized variable use Date: Tue, 20 Feb 2018 12:54:59 +0100 Message-Id: <20180220115527.1806578-13-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180220115527.1806578-1-arnd@arndb.de> References: <20180220115527.1806578-1-arnd@arndb.de> X-Provags-ID: V03:K0:0VKTfdRl6SaYrJSHj7Om8/QLHR38aWGMcre6ZIb4quAvbOxCECo pVBp4jC/p3dkLIoYJom3agahCD9y33MMA09eFeJ5YdfyVY3eFyIT3SVXbewD5eXdiHjEvxI 12Dw1GX720ZU3GGt6sAhmcTNq48sUEq5b6bxzxBqvi4PGdoUc0oo3ObEg2ybuZNmxOzNJpE eXeeyMMGaCjoc0ffRc2wg== X-UI-Out-Filterresults: notjunk:1; V01:K0:j4tCJBnc6dA=:VoU56uRUIBmij9nA9AeV0/ xpNmbA9p4+fexTqlY1q5kpLSkI9u9ygfSk9GhTRLlDvbDbCS/RMAmsr5mZpntZluBG/7jnK1a pVuSj2gIG40wpAu1mI+Wl+AJuUw3mSzMG8A5AlwUjJKDNYA4s1bfSHtwYBVpE4lmgI+aYknyj bjf3m30yQWwlp8OdKogvr62VTD78PtqIiNeZY6FtdjsPWnwP7xGm6w+nsaaob0yFEus5RJDIA a/wFeeshcajciDdFqtLjgdW2/dqj/HFnpzh0UNFPqN+ENLC11HVNcnJRvAeH+bJ12///O7OKk GktK529+zh3AGuTViMAkojKxExzLlr80SJ6qi/FPUzN+vngtMVEC9zCa2UXjyLU5sN9DsSNDl jb5CWGm67ZjyZzfo2iRczC5qxuW+RK5JXU7oaHXyERz93n7g6607IOHE8JvzAxh/lVzrh61Nl UXGghAByuv91JdVx9ChGcj5FajieLQXayUPLufUnLtob5Yo53QzNF2PcqN3zucT7REa9Oegem 37AnI1jQk9PrLvnI8dWrduPRzzqVE6efp/p20ibrge9bA5wTTL2rPrdJD7BABmtaQPWIwzvqh P/r07SDRpQ51XOVGuvEiGPeE9ISHLm/fcuxZOlMxun4eoC6UtmRXb0ZJB3YASOcM/xXERD1Yb YZqU8u5Q33+Pt7+PIFhmzUxSUcEYWu09EP5op63v3WMwDWgjD0IPLXxHoHHewesMSX+K1rWjV yAIgFvnvVjqdDD2uRIRc5Vt0Zmi9Xz5f47bfcw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org commit f0bb2d50dfcc519f06f901aac88502be6ff1df2c upstream. The latest gcc-7.0.1 snapshot reports a new warning: virtio/virtio_balloon.c: In function 'update_balloon_stats': virtio/virtio_balloon.c:258:26: error: 'events[2]' is used uninitialized in this function [-Werror=uninitialized] virtio/virtio_balloon.c:260:26: error: 'events[3]' is used uninitialized in this function [-Werror=uninitialized] virtio/virtio_balloon.c:261:56: error: 'events[18]' is used uninitialized in this function [-Werror=uninitialized] virtio/virtio_balloon.c:262:56: error: 'events[17]' is used uninitialized in this function [-Werror=uninitialized] This seems absolutely right, so we should add an extra check to prevent copying uninitialized stack data into the statistics. >From all I can tell, this has been broken since the statistics code was originally added in 2.6.34. Fixes: 9564e138b1f6 ("virtio: Add memory statistics reporting to the balloon driver (V4)") Signed-off-by: Arnd Bergmann Signed-off-by: Ladi Prosek Signed-off-by: Michael S. Tsirkin [arnd: backported to 4.4] Signed-off-by: Arnd Bergmann --- drivers/virtio/virtio_balloon.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.9.0 diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c index 01d15dca940e..26d0dff069f0 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c @@ -239,12 +239,15 @@ static void update_balloon_stats(struct virtio_balloon *vb) all_vm_events(events); si_meminfo(&i); + +#ifdef CONFIG_VM_EVENT_COUNTERS update_stat(vb, idx++, VIRTIO_BALLOON_S_SWAP_IN, pages_to_bytes(events[PSWPIN])); update_stat(vb, idx++, VIRTIO_BALLOON_S_SWAP_OUT, pages_to_bytes(events[PSWPOUT])); update_stat(vb, idx++, VIRTIO_BALLOON_S_MAJFLT, events[PGMAJFAULT]); update_stat(vb, idx++, VIRTIO_BALLOON_S_MINFLT, events[PGFAULT]); +#endif update_stat(vb, idx++, VIRTIO_BALLOON_S_MEMFREE, pages_to_bytes(i.freeram)); update_stat(vb, idx++, VIRTIO_BALLOON_S_MEMTOT, From patchwork Tue Feb 20 11:55:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 128883 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp4554704ljc; Tue, 20 Feb 2018 03:59:51 -0800 (PST) X-Google-Smtp-Source: AH8x2254kYhcS4jmDqjNMqdQT16vbIpZvF6BeQELLdFc6n/gAkuD1EkSf5xbynmnxmQ6C/FuSpdD X-Received: by 2002:a17:902:a512:: with SMTP id s18-v6mr17150889plq.296.1519127991245; Tue, 20 Feb 2018 03:59:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519127991; cv=none; d=google.com; s=arc-20160816; b=f4thGj5x88wLGdAdUqbJTvnX2tc9FYPUqZ/p7H/9hKLat26el2N0Pf6A7eg4Z+JF9F DB8aiF6bCHeBwds5IRa6B0S0HttlEudCRZgUaLVim+iill0VGgBkQqszPDLhupXfhM5G NqZD4rZd64xF4YB/Gnb5vLbsB4NHbLr16cDiYx8NFQzsThJy6NMnpP8GkQCx2IXoNrot mK0zFL9ui69enhWfvWavkAKZmOYRYta/Q9xknHYQseu1YDDpDP/5tsqPhWYkGjYno1dF IQqzN/pyxzs7mxqJNCGrDbrZNIaBDyR3/3XFh4r9XOpAPaZZmAaHXm0P64JAV9a17wgW Y08A== 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:date:subject:cc:to:from :arc-authentication-results; bh=lO1xwjw2ZFborsuj45l1IraIuw4lQoXCHOvHVM+TlcM=; b=hRe6Ic6DFI/otdz79do21m8HqcDa5vKoivmspNbiHGIl4U5d0m2un1kq9c9ndi+2Ol yEP/x0u1ijBwVPklkGEEtrHCRGFcQZtiOIibLAzKrImqn45FwfxyFmjbKXqyDw2Mu5TV fsNXwyCBMtUv+VuJI5r2C7qmLfH9osb2uUzNOIugd1EwFbIB67Oj3ZplL9oXmOusP3Ha RUM41iETS/0TZzM9/L+ut0vBMfP+caSeNpSqS32iYxHbB9syFQwdVTdAYtJYHynWF5zs qhUnBbo9FvymOGyJ05a1iF9rCIFt87SVdAwbKqfTMvva7ggJLKuRD8S57uG5tm/yZHeZ 5GHQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m68si6501731pgm.88.2018.02.20.03.59.50; Tue, 20 Feb 2018 03:59:51 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751945AbeBTL7r (ORCPT + 28 others); Tue, 20 Feb 2018 06:59:47 -0500 Received: from mout.kundenserver.de ([217.72.192.74]:59105 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751460AbeBTL7o (ORCPT ); Tue, 20 Feb 2018 06:59:44 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue105 [212.227.15.145]) with ESMTPA (Nemesis) id 0MBBkT-1ew6nt1Mqz-00ADpI; Tue, 20 Feb 2018 12:59:20 +0100 From: Arnd Bergmann To: stable@vger.kernel.org Cc: Greg KH , linux-kernel@vger.kernel.org, Andy Lutomirski , Arnd Bergmann , Darren Hart , Darren Hart , =?utf-8?q?Pali_Roh=C3=A1r?= , platform-driver-x86@vger.kernel.org Subject: [4.4-stable 13/22] dell-wmi, dell-laptop: depends DMI Date: Tue, 20 Feb 2018 12:55:00 +0100 Message-Id: <20180220115527.1806578-14-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180220115527.1806578-1-arnd@arndb.de> References: <20180220115527.1806578-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K0:b5Ut8s2T8htKC4DXQSbr4hpszt1ZXSQvKIVA6tcYtKDA/JQ9Otp naErxc9sDT6bL5rjg9J7T9P8xpcg1cKZLY/o07MojvyLatHOrVPnXPp0ENmXnbs1quDfrX2 daOR9TvLHyl6xii8m/qvA8Q+ACgFZo3VkYSg/eyLL41dm+IbU65LVhFXbhnrkU4BQ7Lqwyf NH28GlcqFYjXTyaghMINA== X-UI-Out-Filterresults: notjunk:1; V01:K0:QuHlbSaF4B4=:e78zY1H+b9WnLcOJNUbvTm vv1J2ZfZxFvrduvO6WkDplhZjYKT8NmMQRR9Ir90T6CT5rtVDJjnz8tzsSN7yHu0jx849LVMP WYjGhw86oil/NC0oHGH14U55XLNbiCdvHZiI3rDfy/7XENnvBEGR/1cNHG0eovDGdqpho3yPW fRTUHEYabnk5GQqOPRW8cHzzKxFI+K4qjSIedP3LTeoutIjlYHsFKffDMj7iIYckGTBiysLcN 5OcT4+C4g7z5X8NyA0MRj0mCYBBaRu3GxVpXQXjEIwF04rtqlFWbI3NaYEfmt5UaNZZGRjAMj uCELyCvhWw6V2GcCFBBSUaugbCQv8AyNDASZiPAi+hSxds1vyXDdkXkzM9gWAvF5k7mr/hiJo 6/AG3Z73fXsBjPJWr/lqpPQ8xZ5Dt6A7H2xksA/gHXT2J9LXboooDdPYnhRnwL+C2gmUmq3IO TGsg4pTZRWQat7UCo26WYM1UK03bS4VDXWUo//JK3II6Th0/sd/bZX8s2eSaDrXPFVA0ikCDl 4Qb9gaiW0I87XOr8abmYn5viExEgv99nY2z8suarkhvW41dizoE64dju2JJtLR4H1KTxpQ0LD N1/TVCB/zzgzP9xqkpLSosNH0HnFY+89SkwaEgYpqKKwOXlB1RyVIO2o8lDuAWitmfXP5j1ky dpXBg9dBh+1IHmMDXdpuHwxTO5R7s1B9R9qHabvZfb206ND/nLyRnIMNuc8xEn/7mc1C7zlC0 8tMxVtEC5Uo2EkZ/7FqnuQw5qujiLzlTweePLt8YPNnbg/54gctHfmU5nzg= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Andy Lutomirski commit a570af4850043260b87fb1b8aa27a4484e648878 upstream. dell-wmi and dell-laptop will compile but won't work right if DMI isn't selected. Signed-off-by: Andy Lutomirski Acked-by: Pali Rohár [arnd: Use depends instead of selects to avoid recursive dependencies] Signed-off-by: Arnd Bergmann Signed-off-by: Darren Hart [arnd: rebase to 4.4-stable] Signed-off-by: Arnd Bergmann --- drivers/platform/x86/Kconfig | 2 ++ 1 file changed, 2 insertions(+) -- 2.9.0 diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig index 1089eaa02b00..988ebe9a6b90 100644 --- a/drivers/platform/x86/Kconfig +++ b/drivers/platform/x86/Kconfig @@ -95,6 +95,7 @@ config DELL_LAPTOP tristate "Dell Laptop Extras" depends on X86 depends on DCDBAS + depends on DMI depends on BACKLIGHT_CLASS_DEVICE depends on ACPI_VIDEO || ACPI_VIDEO = n depends on RFKILL || RFKILL = n @@ -110,6 +111,7 @@ config DELL_LAPTOP config DELL_WMI tristate "Dell WMI extras" depends on ACPI_WMI + depends on DMI depends on INPUT depends on ACPI_VIDEO || ACPI_VIDEO = n select INPUT_SPARSEKMAP From patchwork Tue Feb 20 11:55:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 128882 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp4554608ljc; Tue, 20 Feb 2018 03:59:42 -0800 (PST) X-Google-Smtp-Source: AH8x227sZ9/X0kSWChbgaRTwOM90YsXExJfqSkmwa035+U8u09crUk/QZdDBpG0+lcFdQkugIhMp X-Received: by 2002:a17:902:8501:: with SMTP id bj1-v6mr5324548plb.110.1519127982102; Tue, 20 Feb 2018 03:59:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519127982; cv=none; d=google.com; s=arc-20160816; b=zK3jRz4S2fGk+YmZeu9O+ul3VU2hfRFpcgSsrSajyuqLK+jmSNpNL/uzdbhWXoeO0D sk6F8rnDonmI/0sQNdVQlNsrp3N7Hc2ASNlfMsBWj86KePQnh9teqdiY7tjPoDZBBqdl QYcHsFGu8lMtNSJvrZUgvlNkTawKKUxit5GDKjKW+hUfspGVKBpEqH9J3qt3RuiEBvH9 Hm2l+YSqaHTS0MzA5LJUDERE6hWhX3WMKhdbBOLIVwn2M3o8T1lF3ObvAeuztHJO9u+1 7DL37O70tnf9D9GSeolO+OaIOkNBmm7CyVrDDByIMvm9wWOzG/lycPTbz6Co4azSfphW PXrQ== 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:arc-authentication-results; bh=gpeMkmjpflTYj2TKuEzPlWtr/zuDfzLtcqpOqaLL7oc=; b=UbCYXranJs2tmQsjfDosP/PJykov3d8YDY4MfdabYVy06plg+YFxZteq5UhqFxauG+ YLxnK+x4YgrsrgVzZI+YIqSyz6hA9/2/Y9cogfvllR2YFqWsNtZI0auJGcKktBIKDuCh LhYvVFq1W8zuL8imHnP3k8MYadPt3Q4kT8JQ7Hoa9dIQdSUpdRC/dseWmktxAQhS0InQ GVRsiEXVYv/uc9p1mF/Yz9EVNlmdrZ2V9XGLgEOkHr8AXT9NUUdQt6JCT9u5SgLqXyUi xYpGpkYtmNvz786ubuTDbdua8z/xFO44dv0srDgYIjb8HdaSIENGXCPbg8YlMr3prjfr nARw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g67si6150793pgc.690.2018.02.20.03.59.41; Tue, 20 Feb 2018 03:59:42 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751922AbeBTL7g (ORCPT + 28 others); Tue, 20 Feb 2018 06:59:36 -0500 Received: from mout.kundenserver.de ([217.72.192.75]:35809 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751469AbeBTL7c (ORCPT ); Tue, 20 Feb 2018 06:59:32 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue105 [212.227.15.145]) with ESMTPA (Nemesis) id 0LcxWa-1eNsVx2UPg-00iB4H; Tue, 20 Feb 2018 12:59:25 +0100 From: Arnd Bergmann To: stable@vger.kernel.org Cc: Greg KH , linux-kernel@vger.kernel.org, Michal Marek , Arnd Bergmann Subject: [4.4-stable 14/22] genksyms: Fix segfault with invalid declarations Date: Tue, 20 Feb 2018 12:55:01 +0100 Message-Id: <20180220115527.1806578-15-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180220115527.1806578-1-arnd@arndb.de> References: <20180220115527.1806578-1-arnd@arndb.de> X-Provags-ID: V03:K0:xzJDQbcH8ZxxajbeWZ6A9k1Bi3udhYQeh141dzh7ZDtw6AEwcz2 AnZ7Km6Y1i0NlB+ABAxyTpxi/1XDdjXSxe4hhMdL+ty1n79fWlFDK1eqq2abWvRPgvfiY7O gZpczRyVJu2hvDqqo6CMBRkFTNgmQKpj8lPHBk9OFB+m3LSAX2E1FMLkX1obQK8bmtoloF1 uGIn0MkduNcW605jxA5VQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:H4xy0j5O9m8=:ywO5UtswCHGVJvFH0oJrR8 CXL3HNqt6jxuqlaURZOAktVFuMHIVEvgbtQg24Bhas0UwbtVXLO/yvzeJ2yh7yQ8O+ebJ/sJV zR/cLyjuVfDPqEddWyRxeF/vSR5jAslE5rU0Ntj/mOfx6JcJubVxmHmWgezhe5LJZiYrALuuz 7hcQLfhF2aeIzZcSPj7bzO3hJ9VDC7WcbmnCMagp2vWzGE4Qdwj6eNFECmEgmAXDmixf2AnHl wc47QcJY3SEoGAtvc8EiLwJghKBMdBTPI1qWZ7D11jTsk5gaJvtymZlDVZxKsjiNLvCdh8RNp WT2vb++VLIafY0VWUsMpHSITKgAoR0YBgJjfwTG0Kj2CuwD2/qjFaxDQC3JrCXhKHzx2Fh7M1 PgFCyKb0hHaxtA5mGYGL3O9Gl6wQv1+YUHIA8wt6L+kXizwJJPxDwaSHCleZcaFjGZHKaQCFS 8VPBna3hpsreTLFJjZYB9Hie+8sngVc4Kyb4RiV3sqghwFjGY8l3OZ4coNKRyrDVeYA1N7rRm MbCgK9CA+KZ4t+Xp8uOk10Y1BUqPG7fClLEM+cWEKydLvQmF2RJ8zdcxBKfjIi2U4XDJN4e9h VUq1pJbwhztNsxqSbbYHMTnrPTMdOSJHUn9Tf6ATgdZtTNad5lmwo62csr3NOgAONTyBJ1PIe MCnms3antOHsLKID1ClqnnFzfxNa6ux926PuzXE4VsN5QMYOoi/KTnPnqXr1z4RhrEOw6aV0u XxVFx/4M20HD3Sxc2hG2yNrxvIt5iCV8YTUo5A== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Michal Marek commit d920f7c6628c63a390009c237fb80a203c2e400a upstream. Do not try to recover too early and segfault when parsing invalid declarations such as echo 'int (int);' | scripts/genksyms/genksyms echo 'int a, (int);' | scripts/genksyms/genksyms echo 'extern void *__inline_memcpy((void *), (const void *), (__kernel_size_t));' | scripts/genksyms/genksyms The last one was a real-life bug with include/asm-generic/asm-prototypes.h on x86_64. Reported-and-tested-by: Borislav Petkov Signed-off-by: Michal Marek [arnd: rebase to 4.4, regenerate parse.tab.{c,h}] Signed-off-by: Arnd Bergmann --- scripts/genksyms/parse.tab.c_shipped | 1682 ++++++++++++++++------------------ scripts/genksyms/parse.tab.h_shipped | 133 ++- scripts/genksyms/parse.y | 2 - 3 files changed, 853 insertions(+), 964 deletions(-) -- 2.9.0 diff --git a/scripts/genksyms/parse.tab.c_shipped b/scripts/genksyms/parse.tab.c_shipped index 99950b5afb0d..632f6d66982d 100644 --- a/scripts/genksyms/parse.tab.c_shipped +++ b/scripts/genksyms/parse.tab.c_shipped @@ -1,19 +1,19 @@ -/* A Bison parser, made by GNU Bison 2.7. */ +/* A Bison parser, made by GNU Bison 3.0.4. */ /* Bison implementation for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc. - + + Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program. If not, see . */ @@ -26,7 +26,7 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ @@ -44,7 +44,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.7" +#define YYBISON_VERSION "3.0.4" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -62,7 +62,7 @@ /* Copy the first part of user declarations. */ - +#line 24 "parse.y" /* yacc.c:339 */ #include @@ -113,13 +113,13 @@ static void record_compound(struct string_list **keyw, } +#line 117 "parse.tab.c" /* yacc.c:339 */ - -# ifndef YY_NULL +# ifndef YY_NULLPTR # if defined __cplusplus && 201103L <= __cplusplus -# define YY_NULL nullptr +# define YY_NULLPTR nullptr # else -# define YY_NULL 0 +# define YY_NULLPTR 0 # endif # endif @@ -131,8 +131,11 @@ static void record_compound(struct string_list **keyw, # define YYERROR_VERBOSE 0 #endif - -/* Enabling traces. */ +/* In a future release of Bison, this section will be replaced + by #include "parse.tab.h". */ +#ifndef YY_YY_PARSE_TAB_H_INCLUDED +# define YY_YY_PARSE_TAB_H_INCLUDED +/* Debug traces. */ #ifndef YYDEBUG # define YYDEBUG 1 #endif @@ -140,86 +143,73 @@ static void record_compound(struct string_list **keyw, extern int yydebug; #endif -/* Tokens. */ +/* Token type. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - ASM_KEYW = 258, - ATTRIBUTE_KEYW = 259, - AUTO_KEYW = 260, - BOOL_KEYW = 261, - CHAR_KEYW = 262, - CONST_KEYW = 263, - DOUBLE_KEYW = 264, - ENUM_KEYW = 265, - EXTERN_KEYW = 266, - EXTENSION_KEYW = 267, - FLOAT_KEYW = 268, - INLINE_KEYW = 269, - INT_KEYW = 270, - LONG_KEYW = 271, - REGISTER_KEYW = 272, - RESTRICT_KEYW = 273, - SHORT_KEYW = 274, - SIGNED_KEYW = 275, - STATIC_KEYW = 276, - STRUCT_KEYW = 277, - TYPEDEF_KEYW = 278, - UNION_KEYW = 279, - UNSIGNED_KEYW = 280, - VOID_KEYW = 281, - VOLATILE_KEYW = 282, - TYPEOF_KEYW = 283, - EXPORT_SYMBOL_KEYW = 284, - ASM_PHRASE = 285, - ATTRIBUTE_PHRASE = 286, - TYPEOF_PHRASE = 287, - BRACE_PHRASE = 288, - BRACKET_PHRASE = 289, - EXPRESSION_PHRASE = 290, - CHAR = 291, - DOTS = 292, - IDENT = 293, - INT = 294, - REAL = 295, - STRING = 296, - TYPE = 297, - OTHER = 298, - FILENAME = 299 - }; + enum yytokentype + { + ASM_KEYW = 258, + ATTRIBUTE_KEYW = 259, + AUTO_KEYW = 260, + BOOL_KEYW = 261, + CHAR_KEYW = 262, + CONST_KEYW = 263, + DOUBLE_KEYW = 264, + ENUM_KEYW = 265, + EXTERN_KEYW = 266, + EXTENSION_KEYW = 267, + FLOAT_KEYW = 268, + INLINE_KEYW = 269, + INT_KEYW = 270, + LONG_KEYW = 271, + REGISTER_KEYW = 272, + RESTRICT_KEYW = 273, + SHORT_KEYW = 274, + SIGNED_KEYW = 275, + STATIC_KEYW = 276, + STRUCT_KEYW = 277, + TYPEDEF_KEYW = 278, + UNION_KEYW = 279, + UNSIGNED_KEYW = 280, + VOID_KEYW = 281, + VOLATILE_KEYW = 282, + TYPEOF_KEYW = 283, + EXPORT_SYMBOL_KEYW = 284, + ASM_PHRASE = 285, + ATTRIBUTE_PHRASE = 286, + TYPEOF_PHRASE = 287, + BRACE_PHRASE = 288, + BRACKET_PHRASE = 289, + EXPRESSION_PHRASE = 290, + CHAR = 291, + DOTS = 292, + IDENT = 293, + INT = 294, + REAL = 295, + STRING = 296, + TYPE = 297, + OTHER = 298, + FILENAME = 299 + }; #endif - +/* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef int YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif + extern YYSTYPE yylval; -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int yyparse (void *YYPARSE_PARAM); -#else -int yyparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus int yyparse (void); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ - +#endif /* !YY_YY_PARSE_TAB_H_INCLUDED */ /* Copy the second part of user declarations. */ - +#line 213 "parse.tab.c" /* yacc.c:358 */ #ifdef short # undef short @@ -233,11 +223,8 @@ typedef unsigned char yytype_uint8; #ifdef YYTYPE_INT8 typedef YYTYPE_INT8 yytype_int8; -#elif (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -typedef signed char yytype_int8; #else -typedef short int yytype_int8; +typedef signed char yytype_int8; #endif #ifdef YYTYPE_UINT16 @@ -257,8 +244,7 @@ typedef short int yytype_int16; # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t -# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# elif ! defined YYSIZE_T # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else @@ -280,6 +266,33 @@ typedef short int yytype_int16; # endif #endif +#ifndef YY_ATTRIBUTE +# if (defined __GNUC__ \ + && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ + || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C +# define YY_ATTRIBUTE(Spec) __attribute__(Spec) +# else +# define YY_ATTRIBUTE(Spec) /* empty */ +# endif +#endif + +#ifndef YY_ATTRIBUTE_PURE +# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) +#endif + +#ifndef YY_ATTRIBUTE_UNUSED +# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) +#endif + +#if !defined _Noreturn \ + && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) +# if defined _MSC_VER && 1200 <= _MSC_VER +# define _Noreturn __declspec (noreturn) +# else +# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) +# endif +#endif + /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ # define YYUSE(E) ((void) (E)) @@ -287,24 +300,26 @@ typedef short int yytype_int16; # define YYUSE(E) /* empty */ #endif -/* Identity function, used to suppress warnings about constant conditions. */ -#ifndef lint -# define YYID(N) (N) -#else -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static int -YYID (int yyi) +#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ +/* Suppress an incorrect diagnostic about yylval being uninitialized. */ +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") #else -static int -YYID (yyi) - int yyi; +# define YY_INITIAL_VALUE(Value) Value #endif -{ - return yyi; -} +#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END +#endif +#ifndef YY_INITIAL_VALUE +# define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif + #if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ @@ -322,8 +337,7 @@ YYID (yyi) # define alloca _alloca # else # define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS # include /* INFRINGES ON USER NAME SPACE */ /* Use EXIT_SUCCESS as a witness for stdlib.h. */ # ifndef EXIT_SUCCESS @@ -335,8 +349,8 @@ YYID (yyi) # endif # ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) + /* Pacify GCC's 'empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely @@ -352,7 +366,7 @@ YYID (yyi) # endif # if (defined __cplusplus && ! defined EXIT_SUCCESS \ && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) + && (defined YYFREE || defined free))) # include /* INFRINGES ON USER NAME SPACE */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 @@ -360,15 +374,13 @@ YYID (yyi) # endif # ifndef YYMALLOC # define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined malloc && ! defined EXIT_SUCCESS void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free -# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined free && ! defined EXIT_SUCCESS void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif @@ -378,7 +390,7 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ #if (! defined yyoverflow \ && (! defined __cplusplus \ - || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc @@ -403,16 +415,16 @@ union yyalloc elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (YYID (0)) +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (0) #endif @@ -431,7 +443,7 @@ union yyalloc for (yyi = 0; yyi < (Count); yyi++) \ (Dst)[yyi] = (Src)[yyi]; \ } \ - while (YYID (0)) + while (0) # endif # endif #endif /* !YYCOPY_NEEDED */ @@ -439,25 +451,27 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 4 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 515 +#define YYLAST 513 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 54 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 49 /* YYNRULES -- Number of rules. */ -#define YYNRULES 133 -/* YYNRULES -- Number of states. */ -#define YYNSTATES 188 +#define YYNRULES 132 +/* YYNSTATES -- Number of states. */ +#define YYNSTATES 186 -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned + by yylex, with out-of-bounds checking. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 299 -#define YYTRANSLATE(YYX) \ +#define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM + as returned by yylex, without out-of-bounds checking. */ static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -493,69 +507,7 @@ static const yytype_uint8 yytranslate[] = }; #if YYDEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const yytype_uint16 yyprhs[] = -{ - 0, 0, 3, 5, 8, 9, 12, 13, 18, 19, - 23, 25, 27, 29, 31, 34, 37, 41, 42, 44, - 46, 50, 55, 56, 58, 60, 63, 65, 67, 69, - 71, 73, 75, 77, 79, 81, 86, 88, 91, 94, - 97, 101, 105, 109, 112, 115, 118, 120, 122, 124, - 126, 128, 130, 132, 134, 136, 138, 140, 143, 144, - 146, 148, 151, 153, 155, 157, 159, 162, 164, 166, - 168, 173, 178, 181, 185, 189, 192, 194, 196, 198, - 203, 208, 211, 215, 219, 222, 224, 228, 229, 231, - 233, 237, 240, 243, 245, 246, 248, 250, 255, 260, - 263, 267, 271, 275, 276, 278, 281, 285, 289, 290, - 292, 294, 297, 301, 304, 305, 307, 309, 313, 316, - 319, 321, 324, 325, 328, 332, 337, 339, 343, 345, - 349, 352, 353, 355 -}; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yytype_int8 yyrhs[] = -{ - 55, 0, -1, 56, -1, 55, 56, -1, -1, 57, - 58, -1, -1, 12, 23, 59, 61, -1, -1, 23, - 60, 61, -1, 61, -1, 85, -1, 100, -1, 102, - -1, 1, 45, -1, 1, 46, -1, 65, 62, 45, - -1, -1, 63, -1, 64, -1, 63, 47, 64, -1, - 75, 101, 96, 86, -1, -1, 66, -1, 67, -1, - 66, 67, -1, 68, -1, 69, -1, 5, -1, 17, - -1, 21, -1, 11, -1, 14, -1, 70, -1, 74, - -1, 28, 48, 82, 49, -1, 32, -1, 22, 38, - -1, 24, 38, -1, 10, 38, -1, 22, 38, 88, - -1, 24, 38, 88, -1, 10, 38, 97, -1, 10, - 97, -1, 22, 88, -1, 24, 88, -1, 7, -1, - 19, -1, 15, -1, 16, -1, 20, -1, 25, -1, - 13, -1, 9, -1, 26, -1, 6, -1, 42, -1, - 50, 72, -1, -1, 73, -1, 74, -1, 73, 74, - -1, 8, -1, 27, -1, 31, -1, 18, -1, 71, - 75, -1, 76, -1, 38, -1, 42, -1, 76, 48, - 79, 49, -1, 76, 48, 1, 49, -1, 76, 34, - -1, 48, 75, 49, -1, 48, 1, 49, -1, 71, - 77, -1, 78, -1, 38, -1, 42, -1, 78, 48, - 79, 49, -1, 78, 48, 1, 49, -1, 78, 34, - -1, 48, 77, 49, -1, 48, 1, 49, -1, 80, - 37, -1, 80, -1, 81, 47, 37, -1, -1, 81, - -1, 82, -1, 81, 47, 82, -1, 66, 83, -1, - 71, 83, -1, 84, -1, -1, 38, -1, 42, -1, - 84, 48, 79, 49, -1, 84, 48, 1, 49, -1, - 84, 34, -1, 48, 83, 49, -1, 48, 1, 49, - -1, 65, 75, 33, -1, -1, 87, -1, 51, 35, - -1, 52, 89, 46, -1, 52, 1, 46, -1, -1, - 90, -1, 91, -1, 90, 91, -1, 65, 92, 45, - -1, 1, 45, -1, -1, 93, -1, 94, -1, 93, - 47, 94, -1, 77, 96, -1, 38, 95, -1, 95, - -1, 53, 35, -1, -1, 96, 31, -1, 52, 98, - 46, -1, 52, 98, 47, 46, -1, 99, -1, 98, - 47, 99, -1, 38, -1, 38, 51, 35, -1, 30, - 45, -1, -1, 30, -1, 29, 48, 38, 49, 45, - -1 -}; - -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ + /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { 0, 124, 124, 125, 129, 129, 135, 135, 137, 137, @@ -565,13 +517,13 @@ static const yytype_uint16 yyrline[] = 237, 239, 241, 246, 249, 250, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 268, 273, 274, 278, 279, 283, 283, 283, 284, 292, 293, 297, 306, - 315, 317, 319, 321, 323, 330, 331, 335, 336, 337, - 339, 341, 343, 345, 350, 351, 352, 356, 357, 361, - 362, 367, 372, 374, 378, 379, 387, 391, 393, 395, - 397, 399, 404, 413, 414, 419, 424, 425, 429, 430, - 434, 435, 439, 441, 446, 447, 451, 452, 456, 457, - 458, 462, 466, 467, 471, 472, 476, 477, 480, 485, - 493, 497, 498, 502 + 315, 317, 319, 321, 328, 329, 333, 334, 335, 337, + 339, 341, 343, 348, 349, 350, 354, 355, 359, 360, + 365, 370, 372, 376, 377, 385, 389, 391, 393, 395, + 397, 402, 411, 412, 417, 422, 423, 427, 428, 432, + 433, 437, 439, 444, 445, 449, 450, 454, 455, 456, + 460, 464, 465, 469, 470, 474, 475, 478, 483, 491, + 495, 496, 500 }; #endif @@ -606,13 +558,13 @@ static const char *const yytname[] = "member_declarator_list_opt", "member_declarator_list", "member_declarator", "member_bitfield_declarator", "attribute_opt", "enum_body", "enumerator_list", "enumerator", "asm_definition", - "asm_phrase_opt", "export_definition", YY_NULL + "asm_phrase_opt", "export_definition", YY_NULLPTR }; #endif # ifdef YYPRINT -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to - token YYLEX-NUM. */ +/* YYTOKNUM[NUM] -- (External) token number corresponding to the + (internal) symbol number NUM (which must be that of a token). */ static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, @@ -624,47 +576,44 @@ static const yytype_uint16 yytoknum[] = }; # endif -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = -{ - 0, 54, 55, 55, 57, 56, 59, 58, 60, 58, - 58, 58, 58, 58, 58, 58, 61, 62, 62, 63, - 63, 64, 65, 65, 66, 66, 67, 67, 68, 68, - 68, 68, 68, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 69, 69, 69, 70, 70, 70, 70, - 70, 70, 70, 70, 70, 70, 70, 71, 72, 72, - 73, 73, 74, 74, 74, 74, 75, 75, 76, 76, - 76, 76, 76, 76, 76, 77, 77, 78, 78, 78, - 78, 78, 78, 78, 79, 79, 79, 80, 80, 81, - 81, 82, 83, 83, 84, 84, 84, 84, 84, 84, - 84, 84, 85, 86, 86, 87, 88, 88, 89, 89, - 90, 90, 91, 91, 92, 92, 93, 93, 94, 94, - 94, 95, 96, 96, 97, 97, 98, 98, 99, 99, - 100, 101, 101, 102 -}; +#define YYPACT_NINF -135 -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = +#define yypact_value_is_default(Yystate) \ + (!!((Yystate) == (-135))) + +#define YYTABLE_NINF -109 + +#define yytable_value_is_error(Yytable_value) \ + 0 + + /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +static const yytype_int16 yypact[] = { - 0, 2, 1, 2, 0, 2, 0, 4, 0, 3, - 1, 1, 1, 1, 2, 2, 3, 0, 1, 1, - 3, 4, 0, 1, 1, 2, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 4, 1, 2, 2, 2, - 3, 3, 3, 2, 2, 2, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, - 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, - 4, 4, 2, 3, 3, 2, 1, 1, 1, 4, - 4, 2, 3, 3, 2, 1, 3, 0, 1, 1, - 3, 2, 2, 1, 0, 1, 1, 4, 4, 2, - 3, 3, 3, 0, 1, 2, 3, 3, 0, 1, - 1, 2, 3, 2, 0, 1, 1, 3, 2, 2, - 1, 2, 0, 2, 3, 4, 1, 3, 1, 3, - 2, 0, 1, 5 + -135, 38, -135, 206, -135, -135, 22, -135, -135, -135, + -135, -135, -24, -135, 20, -135, -135, -135, -135, -135, + -135, -135, -135, -135, -23, -135, 6, -135, -135, -135, + -2, 15, 24, -135, -135, -135, -135, -135, 41, 471, + -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, + 13, 36, -135, -135, 35, 106, -135, 471, 35, -135, + 471, 44, -135, -135, -135, 41, 39, 45, 48, -135, + 41, -10, 25, -135, -135, 47, 34, -135, 471, -135, + 26, -26, 53, 156, -135, -135, 41, -135, 387, 52, + 57, 59, -135, 39, -135, -135, 41, -135, -135, -135, + -135, -135, 252, 67, -135, -21, -135, -135, -135, 51, + -135, 12, 83, 46, -135, 27, 84, 88, -135, -135, + -135, 91, -135, 109, -135, -135, 3, 55, -135, 30, + -135, 95, -135, -135, -135, -20, 92, 93, 108, 96, + -135, -135, -135, -135, -135, 97, -135, 98, -135, -135, + 118, -135, 297, -135, -26, 101, -135, 104, -135, -135, + 342, -135, -135, 120, -135, -135, -135, -135, -135, 433, + -135, -135, 111, 119, -135, -135, -135, 130, 136, -135, + -135, -135, -135, -135, -135, -135 }; -/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE doesn't specify something else to do. Zero - means the default is an error. */ + /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE does not specify something else to do. Zero + means the default is an error. */ static const yytype_uint8 yydefact[] = { 4, 4, 2, 0, 1, 3, 0, 28, 55, 46, @@ -673,191 +622,158 @@ static const yytype_uint8 yydefact[] = 0, 0, 0, 64, 36, 56, 5, 10, 17, 23, 24, 26, 27, 33, 34, 11, 12, 13, 14, 15, 39, 0, 43, 6, 37, 0, 44, 22, 38, 45, - 0, 0, 130, 68, 69, 0, 58, 0, 18, 19, - 0, 131, 67, 25, 42, 128, 0, 126, 22, 40, - 0, 114, 0, 0, 110, 9, 17, 41, 94, 0, - 0, 0, 0, 57, 59, 60, 16, 0, 66, 132, - 102, 122, 72, 0, 0, 124, 0, 7, 113, 107, - 77, 78, 0, 0, 0, 122, 76, 0, 115, 116, - 120, 106, 0, 111, 131, 95, 56, 0, 94, 91, - 93, 35, 0, 74, 73, 61, 20, 103, 0, 0, - 85, 88, 89, 129, 125, 127, 119, 0, 77, 0, - 121, 75, 118, 81, 0, 112, 0, 0, 96, 0, - 92, 99, 0, 133, 123, 0, 21, 104, 71, 70, - 84, 0, 83, 82, 0, 0, 117, 101, 100, 0, - 0, 105, 86, 90, 80, 79, 98, 97 -}; - -/* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int16 yydefgoto[] = -{ - -1, 1, 2, 3, 36, 78, 57, 37, 67, 68, - 69, 81, 39, 40, 41, 42, 43, 70, 93, 94, - 44, 124, 72, 115, 116, 139, 140, 141, 142, 129, - 130, 45, 166, 167, 56, 82, 83, 84, 117, 118, - 119, 120, 137, 52, 76, 77, 46, 101, 47 + 0, 0, 129, 68, 69, 0, 58, 0, 18, 19, + 0, 130, 67, 25, 42, 127, 0, 125, 22, 40, + 0, 113, 0, 0, 109, 9, 17, 41, 93, 0, + 0, 0, 57, 59, 60, 16, 0, 66, 131, 101, + 121, 72, 0, 0, 123, 0, 7, 112, 106, 76, + 77, 0, 0, 0, 121, 75, 0, 114, 115, 119, + 105, 0, 110, 130, 94, 56, 0, 93, 90, 92, + 35, 0, 73, 61, 20, 102, 0, 0, 84, 87, + 88, 128, 124, 126, 118, 0, 76, 0, 120, 74, + 117, 80, 0, 111, 0, 0, 95, 0, 91, 98, + 0, 132, 122, 0, 21, 103, 71, 70, 83, 0, + 82, 81, 0, 0, 116, 100, 99, 0, 0, 104, + 85, 89, 79, 78, 97, 96 }; -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -#define YYPACT_NINF -92 -static const yytype_int16 yypact[] = + /* YYPGOTO[NTERM-NUM]. */ +static const yytype_int16 yypgoto[] = { - -92, 19, -92, 208, -92, -92, 39, -92, -92, -92, - -92, -92, -27, -92, 23, -92, -92, -92, -92, -92, - -92, -92, -92, -92, -22, -92, 9, -92, -92, -92, - -6, 16, 25, -92, -92, -92, -92, -92, 31, 473, - -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, - 49, 37, -92, -92, 51, 108, -92, 473, 51, -92, - 473, 59, -92, -92, -92, 12, -3, 60, 57, -92, - 31, -7, 24, -92, -92, 55, 42, -92, 473, -92, - 46, -21, 61, 158, -92, -92, 31, -92, 389, 71, - 82, 88, 89, -92, -3, -92, -92, 31, -92, -92, - -92, -92, -92, 254, 73, -92, -24, -92, -92, -92, - 90, -92, 17, 75, 45, -92, 32, 96, 95, -92, - -92, -92, 99, -92, 115, -92, -92, 3, 48, -92, - 34, -92, 102, -92, -92, -92, -92, -11, 100, 103, - 111, 104, -92, -92, -92, -92, -92, 106, -92, 113, - -92, -92, 126, -92, 299, -92, -21, 121, -92, 132, - -92, -92, 344, -92, -92, 125, -92, -92, -92, -92, - -92, 435, -92, -92, 138, 139, -92, -92, -92, 142, - 143, -92, -92, -92, -92, -92, -92, -92 + -135, -135, 157, -135, -135, -135, -135, -48, -135, -135, + 90, -1, -60, -33, -135, -135, -135, -78, -135, -135, + -61, -31, -135, -92, -135, -134, -135, -135, -59, -41, + -135, -135, -135, -135, -18, -135, -135, 107, -135, -135, + 37, 80, 78, 143, -135, 94, -135, -135, -135 }; -/* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = + /* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int16 yydefgoto[] = { - -92, -92, 192, -92, -92, -92, -92, -47, -92, -92, - 97, 0, -60, -32, -92, -92, -92, -79, -92, -92, - -58, -26, -92, -38, -92, -91, -92, -92, -59, -28, - -92, -92, -92, -92, -20, -92, -92, 112, -92, -92, - 41, 91, 83, 149, -92, 101, -92, -92, -92 + -1, 1, 2, 3, 36, 78, 57, 37, 67, 68, + 69, 81, 39, 40, 41, 42, 43, 70, 92, 93, + 44, 123, 72, 114, 115, 137, 138, 139, 140, 128, + 129, 45, 164, 165, 56, 82, 83, 84, 116, 117, + 118, 119, 135, 52, 76, 77, 46, 100, 47 }; -/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule which - number is the opposite. If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -110 + /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule whose + number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 88, 89, 114, 38, 157, 10, 59, 73, 95, 128, - 85, 50, 71, 91, 75, 20, 54, 110, 147, 4, - 164, 111, 144, 99, 29, 51, 100, 112, 33, 66, - 55, 107, 113, 114, 79, 114, 135, -94, 87, 92, - 165, 125, 60, 88, 98, 158, 53, 58, 128, 128, - 63, 127, -94, 66, 64, 148, 73, 86, 102, 111, - 65, 55, 66, 175, 61, 112, 153, 66, 161, 63, - 62, 180, 103, 64, 149, 75, 151, 114, 86, 65, - 154, 66, 162, 148, 48, 49, 125, 111, 105, 106, - 158, 108, 109, 112, 88, 66, 127, 90, 66, 159, - 160, 51, 88, 55, 97, 96, 104, 121, 143, 80, - 150, 88, 183, 7, 8, 9, 10, 11, 12, 13, - 131, 15, 16, 17, 18, 19, 20, 21, 22, 23, - 24, 132, 26, 27, 28, 29, 30, 133, 134, 33, - 34, 155, 156, 113, 108, 99, -22, 163, 170, 168, - 35, 171, 169, -22, -108, 172, -22, 164, -22, 122, - 181, -22, 173, 7, 8, 9, 10, 11, 12, 13, - 177, 15, 16, 17, 18, 19, 20, 21, 22, 23, - 24, 178, 26, 27, 28, 29, 30, 184, 185, 33, - 34, 186, 187, 5, 136, 123, -22, 176, 152, 74, - 35, 146, 0, -22, -109, 0, -22, 145, -22, 6, - 0, -22, 0, 7, 8, 9, 10, 11, 12, 13, - 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 0, 0, 0, 0, 0, -22, 0, 0, 0, - 35, 0, 0, -22, 0, 138, -22, 0, -22, 7, - 8, 9, 10, 11, 12, 13, 0, 15, 16, 17, - 18, 19, 20, 21, 22, 23, 24, 0, 26, 27, - 28, 29, 30, 0, 0, 33, 34, 0, 0, 0, - 0, -87, 0, 0, 0, 0, 35, 0, 0, 0, - 174, 0, 0, -87, 7, 8, 9, 10, 11, 12, - 13, 0, 15, 16, 17, 18, 19, 20, 21, 22, - 23, 24, 0, 26, 27, 28, 29, 30, 0, 0, - 33, 34, 0, 0, 0, 0, -87, 0, 0, 0, - 0, 35, 0, 0, 0, 179, 0, 0, -87, 7, - 8, 9, 10, 11, 12, 13, 0, 15, 16, 17, - 18, 19, 20, 21, 22, 23, 24, 0, 26, 27, - 28, 29, 30, 0, 0, 33, 34, 0, 0, 0, - 0, -87, 0, 0, 0, 0, 35, 0, 0, 0, - 0, 0, 0, -87, 7, 8, 9, 10, 11, 12, - 13, 0, 15, 16, 17, 18, 19, 20, 21, 22, - 23, 24, 0, 26, 27, 28, 29, 30, 0, 0, - 33, 34, 0, 0, 0, 0, 0, 125, 0, 0, - 0, 126, 0, 0, 0, 0, 0, 127, 0, 66, - 7, 8, 9, 10, 11, 12, 13, 0, 15, 16, - 17, 18, 19, 20, 21, 22, 23, 24, 0, 26, - 27, 28, 29, 30, 0, 0, 33, 34, 0, 0, - 0, 0, 182, 0, 0, 0, 0, 35, 7, 8, + 88, 89, 38, 113, 155, 94, 73, 71, 59, 85, + 127, 162, 109, 145, 50, 54, 110, 75, 173, 147, + 98, 149, 111, 99, 66, 142, 178, 112, 51, 55, + 106, 163, 133, 113, 91, 113, 79, -93, 4, 97, + 87, 124, 88, 53, 58, 156, 60, 10, 127, 127, + 146, 126, -93, 66, 110, 73, 86, 20, 55, 101, + 111, 151, 66, 61, 159, 51, 29, 48, 49, 62, + 33, 107, 108, 102, 75, 152, 113, 86, 160, 63, + 104, 105, 90, 64, 146, 157, 158, 55, 110, 65, + 95, 66, 88, 124, 111, 96, 66, 156, 103, 120, + 88, 130, 141, 126, 112, 66, 131, 80, 132, 88, + 181, 7, 8, 9, 10, 11, 12, 13, 148, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 153, + 26, 27, 28, 29, 30, 154, 107, 33, 34, 98, + 161, 166, 167, 169, -22, 168, 170, 171, 35, 162, + 175, -22, -107, 176, -22, 179, -22, 121, 5, -22, + 182, 7, 8, 9, 10, 11, 12, 13, 183, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 184, + 26, 27, 28, 29, 30, 185, 134, 33, 34, 144, + 122, 174, 150, 74, -22, 0, 0, 0, 35, 143, + 0, -22, -108, 0, -22, 0, -22, 6, 0, -22, + 0, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 0, + 0, 0, 0, 0, -22, 0, 0, 0, 35, 0, + 0, -22, 0, 136, -22, 0, -22, 7, 8, 9, + 10, 11, 12, 13, 0, 15, 16, 17, 18, 19, + 20, 21, 22, 23, 24, 0, 26, 27, 28, 29, + 30, 0, 0, 33, 34, 0, 0, 0, 0, -86, + 0, 0, 0, 0, 35, 0, 0, 0, 172, 0, + 0, -86, 7, 8, 9, 10, 11, 12, 13, 0, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 0, 26, 27, 28, 29, 30, 0, 0, 33, 34, + 0, 0, 0, 0, -86, 0, 0, 0, 0, 35, + 0, 0, 0, 177, 0, 0, -86, 7, 8, 9, + 10, 11, 12, 13, 0, 15, 16, 17, 18, 19, + 20, 21, 22, 23, 24, 0, 26, 27, 28, 29, + 30, 0, 0, 33, 34, 0, 0, 0, 0, -86, + 0, 0, 0, 0, 35, 0, 0, 0, 0, 0, + 0, -86, 7, 8, 9, 10, 11, 12, 13, 0, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 0, 26, 27, 28, 29, 30, 0, 0, 33, 34, + 0, 0, 0, 0, 0, 124, 0, 0, 0, 125, + 0, 0, 0, 0, 0, 126, 0, 66, 7, 8, 9, 10, 11, 12, 13, 0, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 0, 26, 27, 28, 29, 30, 0, 0, 33, 34, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 35 + 180, 0, 0, 0, 0, 35, 7, 8, 9, 10, + 11, 12, 13, 0, 15, 16, 17, 18, 19, 20, + 21, 22, 23, 24, 0, 26, 27, 28, 29, 30, + 0, 0, 33, 34, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 35 }; -#define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-92))) - -#define yytable_value_is_error(Yytable_value) \ - YYID (0) - static const yytype_int16 yycheck[] = { - 60, 60, 81, 3, 1, 8, 26, 39, 66, 88, - 57, 38, 38, 1, 38, 18, 38, 38, 1, 0, - 31, 42, 46, 30, 27, 52, 33, 48, 31, 50, - 52, 78, 53, 112, 54, 114, 94, 34, 58, 65, - 51, 38, 48, 103, 70, 42, 23, 38, 127, 128, - 38, 48, 49, 50, 42, 38, 88, 57, 34, 42, - 48, 52, 50, 154, 48, 48, 34, 50, 34, 38, - 45, 162, 48, 42, 112, 38, 114, 156, 78, 48, - 48, 50, 48, 38, 45, 46, 38, 42, 46, 47, - 42, 45, 46, 48, 154, 50, 48, 38, 50, 127, - 128, 52, 162, 52, 47, 45, 51, 46, 35, 1, - 35, 171, 171, 5, 6, 7, 8, 9, 10, 11, - 49, 13, 14, 15, 16, 17, 18, 19, 20, 21, - 22, 49, 24, 25, 26, 27, 28, 49, 49, 31, - 32, 45, 47, 53, 45, 30, 38, 45, 37, 49, - 42, 47, 49, 45, 46, 49, 48, 31, 50, 1, - 35, 53, 49, 5, 6, 7, 8, 9, 10, 11, - 49, 13, 14, 15, 16, 17, 18, 19, 20, 21, - 22, 49, 24, 25, 26, 27, 28, 49, 49, 31, - 32, 49, 49, 1, 97, 83, 38, 156, 115, 50, - 42, 110, -1, 45, 46, -1, 48, 106, 50, 1, - -1, 53, -1, 5, 6, 7, 8, 9, 10, 11, - 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, - 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, -1, -1, -1, -1, -1, 38, -1, -1, -1, - 42, -1, -1, 45, -1, 1, 48, -1, 50, 5, - 6, 7, 8, 9, 10, 11, -1, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, -1, 24, 25, - 26, 27, 28, -1, -1, 31, 32, -1, -1, -1, - -1, 37, -1, -1, -1, -1, 42, -1, -1, -1, - 1, -1, -1, 49, 5, 6, 7, 8, 9, 10, - 11, -1, 13, 14, 15, 16, 17, 18, 19, 20, - 21, 22, -1, 24, 25, 26, 27, 28, -1, -1, - 31, 32, -1, -1, -1, -1, 37, -1, -1, -1, - -1, 42, -1, -1, -1, 1, -1, -1, 49, 5, - 6, 7, 8, 9, 10, 11, -1, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, -1, 24, 25, - 26, 27, 28, -1, -1, 31, 32, -1, -1, -1, - -1, 37, -1, -1, -1, -1, 42, -1, -1, -1, - -1, -1, -1, 49, 5, 6, 7, 8, 9, 10, - 11, -1, 13, 14, 15, 16, 17, 18, 19, 20, - 21, 22, -1, 24, 25, 26, 27, 28, -1, -1, - 31, 32, -1, -1, -1, -1, -1, 38, -1, -1, - -1, 42, -1, -1, -1, -1, -1, 48, -1, 50, - 5, 6, 7, 8, 9, 10, 11, -1, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, -1, 24, - 25, 26, 27, 28, -1, -1, 31, 32, -1, -1, - -1, -1, 37, -1, -1, -1, -1, 42, 5, 6, + 60, 60, 3, 81, 1, 66, 39, 38, 26, 57, + 88, 31, 38, 1, 38, 38, 42, 38, 152, 111, + 30, 113, 48, 33, 50, 46, 160, 53, 52, 52, + 78, 51, 93, 111, 65, 113, 54, 34, 0, 70, + 58, 38, 102, 23, 38, 42, 48, 8, 126, 127, + 38, 48, 49, 50, 42, 88, 57, 18, 52, 34, + 48, 34, 50, 48, 34, 52, 27, 45, 46, 45, + 31, 45, 46, 48, 38, 48, 154, 78, 48, 38, + 46, 47, 38, 42, 38, 126, 127, 52, 42, 48, + 45, 50, 152, 38, 48, 47, 50, 42, 51, 46, + 160, 49, 35, 48, 53, 50, 49, 1, 49, 169, + 169, 5, 6, 7, 8, 9, 10, 11, 35, 13, + 14, 15, 16, 17, 18, 19, 20, 21, 22, 45, + 24, 25, 26, 27, 28, 47, 45, 31, 32, 30, + 45, 49, 49, 47, 38, 37, 49, 49, 42, 31, + 49, 45, 46, 49, 48, 35, 50, 1, 1, 53, + 49, 5, 6, 7, 8, 9, 10, 11, 49, 13, + 14, 15, 16, 17, 18, 19, 20, 21, 22, 49, + 24, 25, 26, 27, 28, 49, 96, 31, 32, 109, + 83, 154, 114, 50, 38, -1, -1, -1, 42, 105, + -1, 45, 46, -1, 48, -1, 50, 1, -1, 53, + -1, 5, 6, 7, 8, 9, 10, 11, 12, 13, + 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, -1, + -1, -1, -1, -1, 38, -1, -1, -1, 42, -1, + -1, 45, -1, 1, 48, -1, 50, 5, 6, 7, + 8, 9, 10, 11, -1, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, -1, 24, 25, 26, 27, + 28, -1, -1, 31, 32, -1, -1, -1, -1, 37, + -1, -1, -1, -1, 42, -1, -1, -1, 1, -1, + -1, 49, 5, 6, 7, 8, 9, 10, 11, -1, + 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, + -1, 24, 25, 26, 27, 28, -1, -1, 31, 32, + -1, -1, -1, -1, 37, -1, -1, -1, -1, 42, + -1, -1, -1, 1, -1, -1, 49, 5, 6, 7, + 8, 9, 10, 11, -1, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, -1, 24, 25, 26, 27, + 28, -1, -1, 31, 32, -1, -1, -1, -1, 37, + -1, -1, -1, -1, 42, -1, -1, -1, -1, -1, + -1, 49, 5, 6, 7, 8, 9, 10, 11, -1, + 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, + -1, 24, 25, 26, 27, 28, -1, -1, 31, 32, + -1, -1, -1, -1, -1, 38, -1, -1, -1, 42, + -1, -1, -1, -1, -1, 48, -1, 50, 5, 6, 7, 8, 9, 10, 11, -1, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, -1, 24, 25, 26, 27, 28, -1, -1, 31, 32, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 42 + 37, -1, -1, -1, -1, 42, 5, 6, 7, 8, + 9, 10, 11, -1, 13, 14, 15, 16, 17, 18, + 19, 20, 21, 22, -1, 24, 25, 26, 27, 28, + -1, -1, 31, 32, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 42 }; -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ + /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { 0, 55, 56, 57, 0, 56, 1, 5, 6, 7, @@ -869,42 +785,66 @@ static const yytype_uint8 yystos[] = 48, 48, 45, 38, 42, 48, 50, 62, 63, 64, 71, 75, 76, 67, 97, 38, 98, 99, 59, 88, 1, 65, 89, 90, 91, 61, 65, 88, 66, 82, - 38, 1, 75, 72, 73, 74, 45, 47, 75, 30, - 33, 101, 34, 48, 51, 46, 47, 61, 45, 46, - 38, 42, 48, 53, 71, 77, 78, 92, 93, 94, - 95, 46, 1, 91, 75, 38, 42, 48, 71, 83, - 84, 49, 49, 49, 49, 74, 64, 96, 1, 79, - 80, 81, 82, 35, 46, 99, 95, 1, 38, 77, - 35, 77, 96, 34, 48, 45, 47, 1, 42, 83, - 83, 34, 48, 45, 31, 51, 86, 87, 49, 49, - 37, 47, 49, 49, 1, 79, 94, 49, 49, 1, - 79, 35, 37, 82, 49, 49, 49, 49 + 38, 75, 72, 73, 74, 45, 47, 75, 30, 33, + 101, 34, 48, 51, 46, 47, 61, 45, 46, 38, + 42, 48, 53, 71, 77, 78, 92, 93, 94, 95, + 46, 1, 91, 75, 38, 42, 48, 71, 83, 84, + 49, 49, 49, 74, 64, 96, 1, 79, 80, 81, + 82, 35, 46, 99, 95, 1, 38, 77, 35, 77, + 96, 34, 48, 45, 47, 1, 42, 83, 83, 34, + 48, 45, 31, 51, 86, 87, 49, 49, 37, 47, + 49, 49, 1, 79, 94, 49, 49, 1, 79, 35, + 37, 82, 49, 49, 49, 49 }; -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab - - -/* Like YYERROR except do call yyerror. This remains here temporarily - to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. However, - YYFAIL appears to be in use. Nevertheless, it is formally deprecated - in Bison 2.4.2's NEWS entry, where a plan to phase it out is - discussed. */ - -#define YYFAIL goto yyerrlab -#if defined YYFAIL - /* This is here to suppress warnings from the GCC cpp's - -Wunused-macros. Normally we don't worry about that warning, but - some users do, and we want to make it easy for users to remove - YYFAIL uses, which will produce warnings from Bison 2.5. */ -#endif + /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint8 yyr1[] = +{ + 0, 54, 55, 55, 57, 56, 59, 58, 60, 58, + 58, 58, 58, 58, 58, 58, 61, 62, 62, 63, + 63, 64, 65, 65, 66, 66, 67, 67, 68, 68, + 68, 68, 68, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 71, 72, 72, + 73, 73, 74, 74, 74, 74, 75, 75, 76, 76, + 76, 76, 76, 76, 77, 77, 78, 78, 78, 78, + 78, 78, 78, 79, 79, 79, 80, 80, 81, 81, + 82, 83, 83, 84, 84, 84, 84, 84, 84, 84, + 84, 85, 86, 86, 87, 88, 88, 89, 89, 90, + 90, 91, 91, 92, 92, 93, 93, 94, 94, 94, + 95, 96, 96, 97, 97, 98, 98, 99, 99, 100, + 101, 101, 102 +}; + + /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = +{ + 0, 2, 1, 2, 0, 2, 0, 4, 0, 3, + 1, 1, 1, 1, 2, 2, 3, 0, 1, 1, + 3, 4, 0, 1, 1, 2, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 4, 1, 2, 2, 2, + 3, 3, 3, 2, 2, 2, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, + 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, + 4, 4, 2, 3, 2, 1, 1, 1, 4, 4, + 2, 3, 3, 2, 1, 3, 0, 1, 1, 3, + 2, 2, 1, 0, 1, 1, 4, 4, 2, 3, + 3, 3, 0, 1, 2, 3, 3, 0, 1, 1, + 2, 3, 2, 0, 1, 1, 3, 2, 2, 1, + 2, 0, 2, 3, 4, 1, 3, 1, 3, 2, + 0, 1, 5 +}; + + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab + #define YYRECOVERING() (!!yyerrstatus) @@ -921,27 +861,15 @@ do \ else \ { \ yyerror (YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (YYID (0)) + YYERROR; \ + } \ +while (0) /* Error token number */ -#define YYTERROR 1 -#define YYERRCODE 256 +#define YYTERROR 1 +#define YYERRCODE 256 -/* This macro is provided for backward compatibility. */ -#ifndef YY_LOCATION_PRINT -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -#endif - - -/* YYLEX -- calling `yylex' with the right arguments. */ -#ifdef YYLEX_PARAM -# define YYLEX yylex (YYLEX_PARAM) -#else -# define YYLEX yylex () -#endif /* Enable debugging if requested. */ #if YYDEBUG @@ -951,40 +879,36 @@ while (YYID (0)) # define YYFPRINTF fprintf # endif -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (YYID (0)) +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) + +/* This macro is provided for backward compatibility. */ +#ifndef YY_LOCATION_PRINT +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +#endif + -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (YYID (0)) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ +/*----------------------------------------. +| Print this symbol's value on YYOUTPUT. | +`----------------------------------------*/ -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) -#else -static void -yy_symbol_value_print (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; -#endif { FILE *yyo = yyoutput; YYUSE (yyo); @@ -993,14 +917,8 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep) # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# else - YYUSE (yyoutput); # endif - switch (yytype) - { - default: - break; - } + YYUSE (yytype); } @@ -1008,22 +926,11 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep) | Print this symbol on YYOUTPUT. | `--------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) -#else -static void -yy_symbol_print (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; -#endif { - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + YYFPRINTF (yyoutput, "%s %s (", + yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); yy_symbol_value_print (yyoutput, yytype, yyvaluep); YYFPRINTF (yyoutput, ")"); @@ -1034,16 +941,8 @@ yy_symbol_print (yyoutput, yytype, yyvaluep) | TOP (included). | `------------------------------------------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) -#else -static void -yy_stack_print (yybottom, yytop) - yytype_int16 *yybottom; - yytype_int16 *yytop; -#endif { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) @@ -1054,49 +953,42 @@ yy_stack_print (yybottom, yytop) YYFPRINTF (stderr, "\n"); } -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (YYID (0)) +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (0) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void -yy_reduce_print (YYSTYPE *yyvsp, int yyrule) -#else -static void -yy_reduce_print (yyvsp, yyrule) - YYSTYPE *yyvsp; - int yyrule; -#endif +yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule) { + unsigned long int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; - unsigned long int yylno = yyrline[yyrule]; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); + yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], - &(yyvsp[(yyi + 1) - (yynrhs)]) - ); + yy_symbol_print (stderr, + yystos[yyssp[yyi + 1 - yynrhs]], + &(yyvsp[(yyi + 1) - (yynrhs)]) + ); YYFPRINTF (stderr, "\n"); } } -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyvsp, Rule); \ -} while (YYID (0)) +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyssp, yyvsp, Rule); \ +} while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ @@ -1110,7 +1002,7 @@ int yydebug; /* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH +#ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif @@ -1133,15 +1025,8 @@ int yydebug; # define yystrlen strlen # else /* Return the length of YYSTR. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static YYSIZE_T yystrlen (const char *yystr) -#else -static YYSIZE_T -yystrlen (yystr) - const char *yystr; -#endif { YYSIZE_T yylen; for (yylen = 0; yystr[yylen]; yylen++) @@ -1157,16 +1042,8 @@ yystrlen (yystr) # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static char * yystpcpy (char *yydest, const char *yysrc) -#else -static char * -yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -#endif { char *yyd = yydest; const char *yys = yysrc; @@ -1196,27 +1073,27 @@ yytnamerr (char *yyres, const char *yystr) char const *yyp = yystr; for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } do_not_strip_quotes: ; } @@ -1239,11 +1116,11 @@ static int yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken) { - YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); + YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); YYSIZE_T yysize = yysize0; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; /* Internationalized format string. */ - const char *yyformat = YY_NULL; + const char *yyformat = YY_NULLPTR; /* Arguments of yyformat. */ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; /* Number of reported tokens (one for the "unexpected", one per @@ -1251,10 +1128,6 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, int yycount = 0; /* There are many possibilities here to consider: - - Assume YYFAIL is not used. It's too flawed to consider. See - - for details. YYERROR is fine as it does not invoke this - function. - If this state is a consistent state with a default action, then the only way this function was invoked is if the default action is an error action. In that case, don't check for expected @@ -1304,7 +1177,7 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, } yyarg[yycount++] = yytname[yyx]; { - YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); + YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) return 2; @@ -1371,31 +1244,17 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, | Release the memory associated to this symbol. | `-----------------------------------------------*/ -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) -#else -static void -yydestruct (yymsg, yytype, yyvaluep) - const char *yymsg; - int yytype; - YYSTYPE *yyvaluep; -#endif { YYUSE (yyvaluep); - if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - switch (yytype) - { - - default: - break; - } + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + YYUSE (yytype); + YY_IGNORE_MAYBE_UNINITIALIZED_END } @@ -1404,18 +1263,8 @@ yydestruct (yymsg, yytype, yyvaluep) /* The lookahead symbol. */ int yychar; - -#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_END -#endif -#ifndef YY_INITIAL_VALUE -# define YY_INITIAL_VALUE(Value) /* Nothing. */ -#endif - /* The semantic value of the lookahead symbol. */ -YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); - +YYSTYPE yylval; /* Number of syntax errors so far. */ int yynerrs; @@ -1424,35 +1273,16 @@ int yynerrs; | yyparse. | `----------*/ -#ifdef YYPARSE_PARAM -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void *YYPARSE_PARAM) -#else -int -yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -#endif -#else /* ! YYPARSE_PARAM */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) int yyparse (void) -#else -int -yyparse () - -#endif -#endif { int yystate; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* The stacks and their tools: - `yyss': related to states. - `yyvs': related to semantic values. + 'yyss': related to states. + 'yyvs': related to semantic values. Refer to the stacks through separate pointers, to allow yyoverflow to reallocate them elsewhere. */ @@ -1520,23 +1350,23 @@ yyparse () #ifdef yyoverflow { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yystacksize); - - yyss = yyss1; - yyvs = yyvs1; + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + &yystacksize); + + yyss = yyss1; + yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE @@ -1544,22 +1374,22 @@ yyparse () # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; + goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; + yystacksize = YYMAXDEPTH; { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ @@ -1568,10 +1398,10 @@ yyparse () yyvsp = yyvs + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); + (unsigned long int) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) - YYABORT; + YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); @@ -1600,7 +1430,7 @@ yybackup: if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; + yychar = yylex (); } if (yychar <= YYEOF) @@ -1665,7 +1495,7 @@ yyreduce: yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. + '$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison @@ -1679,483 +1509,560 @@ yyreduce: switch (yyn) { case 4: - +#line 129 "parse.y" /* yacc.c:1646 */ { is_typedef = 0; is_extern = 0; current_name = NULL; decl_spec = NULL; } +#line 1515 "parse.tab.c" /* yacc.c:1646 */ break; case 5: - - { free_list(*(yyvsp[(2) - (2)]), NULL); *(yyvsp[(2) - (2)]) = NULL; } +#line 131 "parse.y" /* yacc.c:1646 */ + { free_list(*(yyvsp[0]), NULL); *(yyvsp[0]) = NULL; } +#line 1521 "parse.tab.c" /* yacc.c:1646 */ break; case 6: - +#line 135 "parse.y" /* yacc.c:1646 */ { is_typedef = 1; } +#line 1527 "parse.tab.c" /* yacc.c:1646 */ break; case 7: - - { (yyval) = (yyvsp[(4) - (4)]); } +#line 136 "parse.y" /* yacc.c:1646 */ + { (yyval) = (yyvsp[0]); } +#line 1533 "parse.tab.c" /* yacc.c:1646 */ break; case 8: - +#line 137 "parse.y" /* yacc.c:1646 */ { is_typedef = 1; } +#line 1539 "parse.tab.c" /* yacc.c:1646 */ break; case 9: - - { (yyval) = (yyvsp[(3) - (3)]); } +#line 138 "parse.y" /* yacc.c:1646 */ + { (yyval) = (yyvsp[0]); } +#line 1545 "parse.tab.c" /* yacc.c:1646 */ break; case 14: - - { (yyval) = (yyvsp[(2) - (2)]); } +#line 143 "parse.y" /* yacc.c:1646 */ + { (yyval) = (yyvsp[0]); } +#line 1551 "parse.tab.c" /* yacc.c:1646 */ break; case 15: - - { (yyval) = (yyvsp[(2) - (2)]); } +#line 144 "parse.y" /* yacc.c:1646 */ + { (yyval) = (yyvsp[0]); } +#line 1557 "parse.tab.c" /* yacc.c:1646 */ break; case 16: - +#line 149 "parse.y" /* yacc.c:1646 */ { if (current_name) { - struct string_list *decl = (*(yyvsp[(3) - (3)]))->next; - (*(yyvsp[(3) - (3)]))->next = NULL; + struct string_list *decl = (*(yyvsp[0]))->next; + (*(yyvsp[0]))->next = NULL; add_symbol(current_name, is_typedef ? SYM_TYPEDEF : SYM_NORMAL, decl, is_extern); current_name = NULL; } - (yyval) = (yyvsp[(3) - (3)]); + (yyval) = (yyvsp[0]); } +#line 1572 "parse.tab.c" /* yacc.c:1646 */ break; case 17: - +#line 162 "parse.y" /* yacc.c:1646 */ { (yyval) = NULL; } +#line 1578 "parse.tab.c" /* yacc.c:1646 */ break; case 19: - - { struct string_list *decl = *(yyvsp[(1) - (1)]); - *(yyvsp[(1) - (1)]) = NULL; +#line 168 "parse.y" /* yacc.c:1646 */ + { struct string_list *decl = *(yyvsp[0]); + *(yyvsp[0]) = NULL; add_symbol(current_name, is_typedef ? SYM_TYPEDEF : SYM_NORMAL, decl, is_extern); current_name = NULL; - (yyval) = (yyvsp[(1) - (1)]); + (yyval) = (yyvsp[0]); } +#line 1590 "parse.tab.c" /* yacc.c:1646 */ break; case 20: - - { struct string_list *decl = *(yyvsp[(3) - (3)]); - *(yyvsp[(3) - (3)]) = NULL; - free_list(*(yyvsp[(2) - (3)]), NULL); - *(yyvsp[(2) - (3)]) = decl_spec; +#line 176 "parse.y" /* yacc.c:1646 */ + { struct string_list *decl = *(yyvsp[0]); + *(yyvsp[0]) = NULL; + free_list(*(yyvsp[-1]), NULL); + *(yyvsp[-1]) = decl_spec; add_symbol(current_name, is_typedef ? SYM_TYPEDEF : SYM_NORMAL, decl, is_extern); current_name = NULL; - (yyval) = (yyvsp[(3) - (3)]); + (yyval) = (yyvsp[0]); } +#line 1604 "parse.tab.c" /* yacc.c:1646 */ break; case 21: - - { (yyval) = (yyvsp[(4) - (4)]) ? (yyvsp[(4) - (4)]) : (yyvsp[(3) - (4)]) ? (yyvsp[(3) - (4)]) : (yyvsp[(2) - (4)]) ? (yyvsp[(2) - (4)]) : (yyvsp[(1) - (4)]); } +#line 189 "parse.y" /* yacc.c:1646 */ + { (yyval) = (yyvsp[0]) ? (yyvsp[0]) : (yyvsp[-1]) ? (yyvsp[-1]) : (yyvsp[-2]) ? (yyvsp[-2]) : (yyvsp[-3]); } +#line 1610 "parse.tab.c" /* yacc.c:1646 */ break; case 22: - +#line 194 "parse.y" /* yacc.c:1646 */ { decl_spec = NULL; } +#line 1616 "parse.tab.c" /* yacc.c:1646 */ break; case 24: - - { decl_spec = *(yyvsp[(1) - (1)]); } +#line 199 "parse.y" /* yacc.c:1646 */ + { decl_spec = *(yyvsp[0]); } +#line 1622 "parse.tab.c" /* yacc.c:1646 */ break; case 25: - - { decl_spec = *(yyvsp[(2) - (2)]); } +#line 200 "parse.y" /* yacc.c:1646 */ + { decl_spec = *(yyvsp[0]); } +#line 1628 "parse.tab.c" /* yacc.c:1646 */ break; case 26: - +#line 205 "parse.y" /* yacc.c:1646 */ { /* Version 2 checksumming ignores storage class, as that is really irrelevant to the linkage. */ - remove_node((yyvsp[(1) - (1)])); - (yyval) = (yyvsp[(1) - (1)]); + remove_node((yyvsp[0])); + (yyval) = (yyvsp[0]); } +#line 1638 "parse.tab.c" /* yacc.c:1646 */ break; case 31: - - { is_extern = 1; (yyval) = (yyvsp[(1) - (1)]); } +#line 217 "parse.y" /* yacc.c:1646 */ + { is_extern = 1; (yyval) = (yyvsp[0]); } +#line 1644 "parse.tab.c" /* yacc.c:1646 */ break; case 32: - - { is_extern = 0; (yyval) = (yyvsp[(1) - (1)]); } +#line 218 "parse.y" /* yacc.c:1646 */ + { is_extern = 0; (yyval) = (yyvsp[0]); } +#line 1650 "parse.tab.c" /* yacc.c:1646 */ break; case 37: - - { remove_node((yyvsp[(1) - (2)])); (*(yyvsp[(2) - (2)]))->tag = SYM_STRUCT; (yyval) = (yyvsp[(2) - (2)]); } +#line 230 "parse.y" /* yacc.c:1646 */ + { remove_node((yyvsp[-1])); (*(yyvsp[0]))->tag = SYM_STRUCT; (yyval) = (yyvsp[0]); } +#line 1656 "parse.tab.c" /* yacc.c:1646 */ break; case 38: - - { remove_node((yyvsp[(1) - (2)])); (*(yyvsp[(2) - (2)]))->tag = SYM_UNION; (yyval) = (yyvsp[(2) - (2)]); } +#line 232 "parse.y" /* yacc.c:1646 */ + { remove_node((yyvsp[-1])); (*(yyvsp[0]))->tag = SYM_UNION; (yyval) = (yyvsp[0]); } +#line 1662 "parse.tab.c" /* yacc.c:1646 */ break; case 39: - - { remove_node((yyvsp[(1) - (2)])); (*(yyvsp[(2) - (2)]))->tag = SYM_ENUM; (yyval) = (yyvsp[(2) - (2)]); } +#line 234 "parse.y" /* yacc.c:1646 */ + { remove_node((yyvsp[-1])); (*(yyvsp[0]))->tag = SYM_ENUM; (yyval) = (yyvsp[0]); } +#line 1668 "parse.tab.c" /* yacc.c:1646 */ break; case 40: - - { record_compound((yyvsp[(1) - (3)]), (yyvsp[(2) - (3)]), (yyvsp[(3) - (3)]), SYM_STRUCT); (yyval) = (yyvsp[(3) - (3)]); } +#line 238 "parse.y" /* yacc.c:1646 */ + { record_compound((yyvsp[-2]), (yyvsp[-1]), (yyvsp[0]), SYM_STRUCT); (yyval) = (yyvsp[0]); } +#line 1674 "parse.tab.c" /* yacc.c:1646 */ break; case 41: - - { record_compound((yyvsp[(1) - (3)]), (yyvsp[(2) - (3)]), (yyvsp[(3) - (3)]), SYM_UNION); (yyval) = (yyvsp[(3) - (3)]); } +#line 240 "parse.y" /* yacc.c:1646 */ + { record_compound((yyvsp[-2]), (yyvsp[-1]), (yyvsp[0]), SYM_UNION); (yyval) = (yyvsp[0]); } +#line 1680 "parse.tab.c" /* yacc.c:1646 */ break; case 42: - - { record_compound((yyvsp[(1) - (3)]), (yyvsp[(2) - (3)]), (yyvsp[(3) - (3)]), SYM_ENUM); (yyval) = (yyvsp[(3) - (3)]); } +#line 242 "parse.y" /* yacc.c:1646 */ + { record_compound((yyvsp[-2]), (yyvsp[-1]), (yyvsp[0]), SYM_ENUM); (yyval) = (yyvsp[0]); } +#line 1686 "parse.tab.c" /* yacc.c:1646 */ break; case 43: - - { add_symbol(NULL, SYM_ENUM, NULL, 0); (yyval) = (yyvsp[(2) - (2)]); } +#line 247 "parse.y" /* yacc.c:1646 */ + { add_symbol(NULL, SYM_ENUM, NULL, 0); (yyval) = (yyvsp[0]); } +#line 1692 "parse.tab.c" /* yacc.c:1646 */ break; case 44: - - { (yyval) = (yyvsp[(2) - (2)]); } +#line 249 "parse.y" /* yacc.c:1646 */ + { (yyval) = (yyvsp[0]); } +#line 1698 "parse.tab.c" /* yacc.c:1646 */ break; case 45: - - { (yyval) = (yyvsp[(2) - (2)]); } +#line 250 "parse.y" /* yacc.c:1646 */ + { (yyval) = (yyvsp[0]); } +#line 1704 "parse.tab.c" /* yacc.c:1646 */ break; case 56: - - { (*(yyvsp[(1) - (1)]))->tag = SYM_TYPEDEF; (yyval) = (yyvsp[(1) - (1)]); } +#line 264 "parse.y" /* yacc.c:1646 */ + { (*(yyvsp[0]))->tag = SYM_TYPEDEF; (yyval) = (yyvsp[0]); } +#line 1710 "parse.tab.c" /* yacc.c:1646 */ break; case 57: - - { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); } +#line 269 "parse.y" /* yacc.c:1646 */ + { (yyval) = (yyvsp[0]) ? (yyvsp[0]) : (yyvsp[-1]); } +#line 1716 "parse.tab.c" /* yacc.c:1646 */ break; case 58: - +#line 273 "parse.y" /* yacc.c:1646 */ { (yyval) = NULL; } +#line 1722 "parse.tab.c" /* yacc.c:1646 */ break; case 61: - - { (yyval) = (yyvsp[(2) - (2)]); } +#line 279 "parse.y" /* yacc.c:1646 */ + { (yyval) = (yyvsp[0]); } +#line 1728 "parse.tab.c" /* yacc.c:1646 */ break; case 65: - +#line 285 "parse.y" /* yacc.c:1646 */ { /* restrict has no effect in prototypes so ignore it */ - remove_node((yyvsp[(1) - (1)])); - (yyval) = (yyvsp[(1) - (1)]); + remove_node((yyvsp[0])); + (yyval) = (yyvsp[0]); } +#line 1737 "parse.tab.c" /* yacc.c:1646 */ break; case 66: - - { (yyval) = (yyvsp[(2) - (2)]); } +#line 292 "parse.y" /* yacc.c:1646 */ + { (yyval) = (yyvsp[0]); } +#line 1743 "parse.tab.c" /* yacc.c:1646 */ break; case 68: - +#line 298 "parse.y" /* yacc.c:1646 */ { if (current_name != NULL) { error_with_pos("unexpected second declaration name"); YYERROR; } else { - current_name = (*(yyvsp[(1) - (1)]))->string; - (yyval) = (yyvsp[(1) - (1)]); + current_name = (*(yyvsp[0]))->string; + (yyval) = (yyvsp[0]); } } +#line 1756 "parse.tab.c" /* yacc.c:1646 */ break; case 69: - +#line 307 "parse.y" /* yacc.c:1646 */ { if (current_name != NULL) { error_with_pos("unexpected second declaration name"); YYERROR; } else { - current_name = (*(yyvsp[(1) - (1)]))->string; - (yyval) = (yyvsp[(1) - (1)]); + current_name = (*(yyvsp[0]))->string; + (yyval) = (yyvsp[0]); } } +#line 1769 "parse.tab.c" /* yacc.c:1646 */ break; case 70: - - { (yyval) = (yyvsp[(4) - (4)]); } +#line 316 "parse.y" /* yacc.c:1646 */ + { (yyval) = (yyvsp[0]); } +#line 1775 "parse.tab.c" /* yacc.c:1646 */ break; case 71: - - { (yyval) = (yyvsp[(4) - (4)]); } +#line 318 "parse.y" /* yacc.c:1646 */ + { (yyval) = (yyvsp[0]); } +#line 1781 "parse.tab.c" /* yacc.c:1646 */ break; case 72: - - { (yyval) = (yyvsp[(2) - (2)]); } +#line 320 "parse.y" /* yacc.c:1646 */ + { (yyval) = (yyvsp[0]); } +#line 1787 "parse.tab.c" /* yacc.c:1646 */ break; case 73: - - { (yyval) = (yyvsp[(3) - (3)]); } +#line 322 "parse.y" /* yacc.c:1646 */ + { (yyval) = (yyvsp[0]); } +#line 1793 "parse.tab.c" /* yacc.c:1646 */ break; case 74: - - { (yyval) = (yyvsp[(3) - (3)]); } +#line 328 "parse.y" /* yacc.c:1646 */ + { (yyval) = (yyvsp[0]); } +#line 1799 "parse.tab.c" /* yacc.c:1646 */ break; - case 75: - - { (yyval) = (yyvsp[(2) - (2)]); } + case 78: +#line 336 "parse.y" /* yacc.c:1646 */ + { (yyval) = (yyvsp[0]); } +#line 1805 "parse.tab.c" /* yacc.c:1646 */ break; case 79: - - { (yyval) = (yyvsp[(4) - (4)]); } +#line 338 "parse.y" /* yacc.c:1646 */ + { (yyval) = (yyvsp[0]); } +#line 1811 "parse.tab.c" /* yacc.c:1646 */ break; case 80: - - { (yyval) = (yyvsp[(4) - (4)]); } +#line 340 "parse.y" /* yacc.c:1646 */ + { (yyval) = (yyvsp[0]); } +#line 1817 "parse.tab.c" /* yacc.c:1646 */ break; case 81: - - { (yyval) = (yyvsp[(2) - (2)]); } +#line 342 "parse.y" /* yacc.c:1646 */ + { (yyval) = (yyvsp[0]); } +#line 1823 "parse.tab.c" /* yacc.c:1646 */ break; case 82: - - { (yyval) = (yyvsp[(3) - (3)]); } +#line 344 "parse.y" /* yacc.c:1646 */ + { (yyval) = (yyvsp[0]); } +#line 1829 "parse.tab.c" /* yacc.c:1646 */ break; case 83: - - { (yyval) = (yyvsp[(3) - (3)]); } +#line 348 "parse.y" /* yacc.c:1646 */ + { (yyval) = (yyvsp[0]); } +#line 1835 "parse.tab.c" /* yacc.c:1646 */ break; - case 84: - - { (yyval) = (yyvsp[(2) - (2)]); } + case 85: +#line 350 "parse.y" /* yacc.c:1646 */ + { (yyval) = (yyvsp[0]); } +#line 1841 "parse.tab.c" /* yacc.c:1646 */ break; case 86: - - { (yyval) = (yyvsp[(3) - (3)]); } +#line 354 "parse.y" /* yacc.c:1646 */ + { (yyval) = NULL; } +#line 1847 "parse.tab.c" /* yacc.c:1646 */ break; - case 87: - - { (yyval) = NULL; } + case 89: +#line 361 "parse.y" /* yacc.c:1646 */ + { (yyval) = (yyvsp[0]); } +#line 1853 "parse.tab.c" /* yacc.c:1646 */ break; case 90: - - { (yyval) = (yyvsp[(3) - (3)]); } +#line 366 "parse.y" /* yacc.c:1646 */ + { (yyval) = (yyvsp[0]) ? (yyvsp[0]) : (yyvsp[-1]); } +#line 1859 "parse.tab.c" /* yacc.c:1646 */ break; case 91: - - { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); } +#line 371 "parse.y" /* yacc.c:1646 */ + { (yyval) = (yyvsp[0]) ? (yyvsp[0]) : (yyvsp[-1]); } +#line 1865 "parse.tab.c" /* yacc.c:1646 */ break; - case 92: - - { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); } + case 93: +#line 376 "parse.y" /* yacc.c:1646 */ + { (yyval) = NULL; } +#line 1871 "parse.tab.c" /* yacc.c:1646 */ break; case 94: - - { (yyval) = NULL; } +#line 378 "parse.y" /* yacc.c:1646 */ + { /* For version 2 checksums, we don't want to remember + private parameter names. */ + remove_node((yyvsp[0])); + (yyval) = (yyvsp[0]); + } +#line 1881 "parse.tab.c" /* yacc.c:1646 */ break; case 95: - - { /* For version 2 checksums, we don't want to remember - private parameter names. */ - remove_node((yyvsp[(1) - (1)])); - (yyval) = (yyvsp[(1) - (1)]); +#line 386 "parse.y" /* yacc.c:1646 */ + { remove_node((yyvsp[0])); + (yyval) = (yyvsp[0]); } +#line 1889 "parse.tab.c" /* yacc.c:1646 */ break; case 96: - - { remove_node((yyvsp[(1) - (1)])); - (yyval) = (yyvsp[(1) - (1)]); - } +#line 390 "parse.y" /* yacc.c:1646 */ + { (yyval) = (yyvsp[0]); } +#line 1895 "parse.tab.c" /* yacc.c:1646 */ break; case 97: - - { (yyval) = (yyvsp[(4) - (4)]); } +#line 392 "parse.y" /* yacc.c:1646 */ + { (yyval) = (yyvsp[0]); } +#line 1901 "parse.tab.c" /* yacc.c:1646 */ break; case 98: - - { (yyval) = (yyvsp[(4) - (4)]); } +#line 394 "parse.y" /* yacc.c:1646 */ + { (yyval) = (yyvsp[0]); } +#line 1907 "parse.tab.c" /* yacc.c:1646 */ break; case 99: - - { (yyval) = (yyvsp[(2) - (2)]); } +#line 396 "parse.y" /* yacc.c:1646 */ + { (yyval) = (yyvsp[0]); } +#line 1913 "parse.tab.c" /* yacc.c:1646 */ break; case 100: - - { (yyval) = (yyvsp[(3) - (3)]); } +#line 398 "parse.y" /* yacc.c:1646 */ + { (yyval) = (yyvsp[0]); } +#line 1919 "parse.tab.c" /* yacc.c:1646 */ break; case 101: - - { (yyval) = (yyvsp[(3) - (3)]); } - break; - - case 102: - - { struct string_list *decl = *(yyvsp[(2) - (3)]); - *(yyvsp[(2) - (3)]) = NULL; +#line 403 "parse.y" /* yacc.c:1646 */ + { struct string_list *decl = *(yyvsp[-1]); + *(yyvsp[-1]) = NULL; add_symbol(current_name, SYM_NORMAL, decl, is_extern); - (yyval) = (yyvsp[(3) - (3)]); + (yyval) = (yyvsp[0]); } +#line 1929 "parse.tab.c" /* yacc.c:1646 */ break; - case 103: - + case 102: +#line 411 "parse.y" /* yacc.c:1646 */ { (yyval) = NULL; } +#line 1935 "parse.tab.c" /* yacc.c:1646 */ break; - case 105: + case 104: +#line 418 "parse.y" /* yacc.c:1646 */ + { remove_list((yyvsp[0]), &(*(yyvsp[-1]))->next); (yyval) = (yyvsp[0]); } +#line 1941 "parse.tab.c" /* yacc.c:1646 */ + break; - { remove_list((yyvsp[(2) - (2)]), &(*(yyvsp[(1) - (2)]))->next); (yyval) = (yyvsp[(2) - (2)]); } + case 105: +#line 422 "parse.y" /* yacc.c:1646 */ + { (yyval) = (yyvsp[0]); } +#line 1947 "parse.tab.c" /* yacc.c:1646 */ break; case 106: - - { (yyval) = (yyvsp[(3) - (3)]); } +#line 423 "parse.y" /* yacc.c:1646 */ + { (yyval) = (yyvsp[0]); } +#line 1953 "parse.tab.c" /* yacc.c:1646 */ break; case 107: - - { (yyval) = (yyvsp[(3) - (3)]); } +#line 427 "parse.y" /* yacc.c:1646 */ + { (yyval) = NULL; } +#line 1959 "parse.tab.c" /* yacc.c:1646 */ break; - case 108: - - { (yyval) = NULL; } + case 110: +#line 433 "parse.y" /* yacc.c:1646 */ + { (yyval) = (yyvsp[0]); } +#line 1965 "parse.tab.c" /* yacc.c:1646 */ break; case 111: - - { (yyval) = (yyvsp[(2) - (2)]); } +#line 438 "parse.y" /* yacc.c:1646 */ + { (yyval) = (yyvsp[0]); } +#line 1971 "parse.tab.c" /* yacc.c:1646 */ break; case 112: - - { (yyval) = (yyvsp[(3) - (3)]); } +#line 440 "parse.y" /* yacc.c:1646 */ + { (yyval) = (yyvsp[0]); } +#line 1977 "parse.tab.c" /* yacc.c:1646 */ break; case 113: - - { (yyval) = (yyvsp[(2) - (2)]); } +#line 444 "parse.y" /* yacc.c:1646 */ + { (yyval) = NULL; } +#line 1983 "parse.tab.c" /* yacc.c:1646 */ break; - case 114: - - { (yyval) = NULL; } + case 116: +#line 450 "parse.y" /* yacc.c:1646 */ + { (yyval) = (yyvsp[0]); } +#line 1989 "parse.tab.c" /* yacc.c:1646 */ break; case 117: - - { (yyval) = (yyvsp[(3) - (3)]); } +#line 454 "parse.y" /* yacc.c:1646 */ + { (yyval) = (yyvsp[0]) ? (yyvsp[0]) : (yyvsp[-1]); } +#line 1995 "parse.tab.c" /* yacc.c:1646 */ break; case 118: - - { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); } +#line 455 "parse.y" /* yacc.c:1646 */ + { (yyval) = (yyvsp[0]); } +#line 2001 "parse.tab.c" /* yacc.c:1646 */ break; - case 119: - - { (yyval) = (yyvsp[(2) - (2)]); } + case 120: +#line 460 "parse.y" /* yacc.c:1646 */ + { (yyval) = (yyvsp[0]); } +#line 2007 "parse.tab.c" /* yacc.c:1646 */ break; case 121: - - { (yyval) = (yyvsp[(2) - (2)]); } - break; - - case 122: - +#line 464 "parse.y" /* yacc.c:1646 */ { (yyval) = NULL; } +#line 2013 "parse.tab.c" /* yacc.c:1646 */ break; - case 124: - - { (yyval) = (yyvsp[(3) - (3)]); } + case 123: +#line 469 "parse.y" /* yacc.c:1646 */ + { (yyval) = (yyvsp[0]); } +#line 2019 "parse.tab.c" /* yacc.c:1646 */ break; - case 125: - - { (yyval) = (yyvsp[(4) - (4)]); } + case 124: +#line 470 "parse.y" /* yacc.c:1646 */ + { (yyval) = (yyvsp[0]); } +#line 2025 "parse.tab.c" /* yacc.c:1646 */ break; - case 128: - + case 127: +#line 479 "parse.y" /* yacc.c:1646 */ { - const char *name = strdup((*(yyvsp[(1) - (1)]))->string); + const char *name = strdup((*(yyvsp[0]))->string); add_symbol(name, SYM_ENUM_CONST, NULL, 0); } +#line 2034 "parse.tab.c" /* yacc.c:1646 */ break; - case 129: - + case 128: +#line 484 "parse.y" /* yacc.c:1646 */ { - const char *name = strdup((*(yyvsp[(1) - (3)]))->string); - struct string_list *expr = copy_list_range(*(yyvsp[(3) - (3)]), *(yyvsp[(2) - (3)])); + const char *name = strdup((*(yyvsp[-2]))->string); + struct string_list *expr = copy_list_range(*(yyvsp[0]), *(yyvsp[-1])); add_symbol(name, SYM_ENUM_CONST, expr, 0); } +#line 2044 "parse.tab.c" /* yacc.c:1646 */ break; - case 130: - - { (yyval) = (yyvsp[(2) - (2)]); } + case 129: +#line 491 "parse.y" /* yacc.c:1646 */ + { (yyval) = (yyvsp[0]); } +#line 2050 "parse.tab.c" /* yacc.c:1646 */ break; - case 131: - + case 130: +#line 495 "parse.y" /* yacc.c:1646 */ { (yyval) = NULL; } +#line 2056 "parse.tab.c" /* yacc.c:1646 */ break; - case 133: - - { export_symbol((*(yyvsp[(3) - (5)]))->string); (yyval) = (yyvsp[(5) - (5)]); } + case 132: +#line 501 "parse.y" /* yacc.c:1646 */ + { export_symbol((*(yyvsp[-2]))->string); (yyval) = (yyvsp[0]); } +#line 2062 "parse.tab.c" /* yacc.c:1646 */ break; - +#line 2066 "parse.tab.c" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -2177,7 +2084,7 @@ yyreduce: *++yyvsp = yyval; - /* Now `shift' the result of the reduction. Determine what state + /* Now 'shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ @@ -2192,9 +2099,9 @@ yyreduce: goto yynewstate; -/*------------------------------------. -| yyerrlab -- here on detecting error | -`------------------------------------*/ +/*--------------------------------------. +| yyerrlab -- here on detecting error. | +`--------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ @@ -2245,20 +2152,20 @@ yyerrlab: if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an - error, discard it. */ + error, discard it. */ if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } else - { - yydestruct ("Error: discarding", - yytoken, &yylval); - yychar = YYEMPTY; - } + { + yydestruct ("Error: discarding", + yytoken, &yylval); + yychar = YYEMPTY; + } } /* Else will try to reuse lookahead token after shifting the error @@ -2277,7 +2184,7 @@ yyerrorlab: if (/*CONSTCOND*/ 0) goto yyerrorlab; - /* Do not reclaim the symbols of the rule which action triggered + /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; @@ -2290,29 +2197,29 @@ yyerrorlab: | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ + yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; if (!yypact_value_is_default (yyn)) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) - YYABORT; + YYABORT; yydestruct ("Error: popping", - yystos[yystate], yyvsp); + yystos[yystate], yyvsp); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); @@ -2363,14 +2270,14 @@ yyreturn: yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval); } - /* Do not reclaim the symbols of the rule which action triggered + /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp); + yystos[*yyssp], yyvsp); YYPOPSTACK (1); } #ifndef yyoverflow @@ -2381,12 +2288,9 @@ yyreturn: if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); #endif - /* Make sure YYID is used. */ - return YYID (yyresult); + return yyresult; } - - - +#line 505 "parse.y" /* yacc.c:1906 */ static void diff --git a/scripts/genksyms/parse.tab.h_shipped b/scripts/genksyms/parse.tab.h_shipped index 4c00cef6d71d..1751bd03ad26 100644 --- a/scripts/genksyms/parse.tab.h_shipped +++ b/scripts/genksyms/parse.tab.h_shipped @@ -1,19 +1,19 @@ -/* A Bison parser, made by GNU Bison 2.7. */ +/* A Bison parser, made by GNU Bison 3.0.4. */ /* Bison interface for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc. - + + Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program. If not, see . */ @@ -26,93 +26,80 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ -#ifndef YY_YY_SCRIPTS_GENKSYMS_PARSE_TAB_H_SHIPPED_INCLUDED -# define YY_YY_SCRIPTS_GENKSYMS_PARSE_TAB_H_SHIPPED_INCLUDED -/* Enabling traces. */ +#ifndef YY_YY_PARSE_TAB_H_INCLUDED +# define YY_YY_PARSE_TAB_H_INCLUDED +/* Debug traces. */ #ifndef YYDEBUG -# define YYDEBUG 1 +# define YYDEBUG 0 #endif #if YYDEBUG extern int yydebug; #endif -/* Tokens. */ +/* Token type. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - ASM_KEYW = 258, - ATTRIBUTE_KEYW = 259, - AUTO_KEYW = 260, - BOOL_KEYW = 261, - CHAR_KEYW = 262, - CONST_KEYW = 263, - DOUBLE_KEYW = 264, - ENUM_KEYW = 265, - EXTERN_KEYW = 266, - EXTENSION_KEYW = 267, - FLOAT_KEYW = 268, - INLINE_KEYW = 269, - INT_KEYW = 270, - LONG_KEYW = 271, - REGISTER_KEYW = 272, - RESTRICT_KEYW = 273, - SHORT_KEYW = 274, - SIGNED_KEYW = 275, - STATIC_KEYW = 276, - STRUCT_KEYW = 277, - TYPEDEF_KEYW = 278, - UNION_KEYW = 279, - UNSIGNED_KEYW = 280, - VOID_KEYW = 281, - VOLATILE_KEYW = 282, - TYPEOF_KEYW = 283, - EXPORT_SYMBOL_KEYW = 284, - ASM_PHRASE = 285, - ATTRIBUTE_PHRASE = 286, - TYPEOF_PHRASE = 287, - BRACE_PHRASE = 288, - BRACKET_PHRASE = 289, - EXPRESSION_PHRASE = 290, - CHAR = 291, - DOTS = 292, - IDENT = 293, - INT = 294, - REAL = 295, - STRING = 296, - TYPE = 297, - OTHER = 298, - FILENAME = 299 - }; + enum yytokentype + { + ASM_KEYW = 258, + ATTRIBUTE_KEYW = 259, + AUTO_KEYW = 260, + BOOL_KEYW = 261, + CHAR_KEYW = 262, + CONST_KEYW = 263, + DOUBLE_KEYW = 264, + ENUM_KEYW = 265, + EXTERN_KEYW = 266, + EXTENSION_KEYW = 267, + FLOAT_KEYW = 268, + INLINE_KEYW = 269, + INT_KEYW = 270, + LONG_KEYW = 271, + REGISTER_KEYW = 272, + RESTRICT_KEYW = 273, + SHORT_KEYW = 274, + SIGNED_KEYW = 275, + STATIC_KEYW = 276, + STRUCT_KEYW = 277, + TYPEDEF_KEYW = 278, + UNION_KEYW = 279, + UNSIGNED_KEYW = 280, + VOID_KEYW = 281, + VOLATILE_KEYW = 282, + TYPEOF_KEYW = 283, + EXPORT_SYMBOL_KEYW = 284, + ASM_PHRASE = 285, + ATTRIBUTE_PHRASE = 286, + TYPEOF_PHRASE = 287, + BRACE_PHRASE = 288, + BRACKET_PHRASE = 289, + EXPRESSION_PHRASE = 290, + CHAR = 291, + DOTS = 292, + IDENT = 293, + INT = 294, + REAL = 295, + STRING = 296, + TYPE = 297, + OTHER = 298, + FILENAME = 299 + }; #endif - +/* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef int YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif + extern YYSTYPE yylval; -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int yyparse (void *YYPARSE_PARAM); -#else -int yyparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus int yyparse (void); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ -#endif /* !YY_YY_SCRIPTS_GENKSYMS_PARSE_TAB_H_SHIPPED_INCLUDED */ +#endif /* !YY_YY_PARSE_TAB_H_INCLUDED */ diff --git a/scripts/genksyms/parse.y b/scripts/genksyms/parse.y index 723ab30fe9d4..268efe37688a 100644 --- a/scripts/genksyms/parse.y +++ b/scripts/genksyms/parse.y @@ -320,8 +320,6 @@ direct_declarator: { $$ = $2; } | '(' declarator ')' { $$ = $3; } - | '(' error ')' - { $$ = $3; } ; /* Nested declarators differ from regular declarators in that they do From patchwork Tue Feb 20 11:55:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 128888 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp4556235ljc; Tue, 20 Feb 2018 04:01:06 -0800 (PST) X-Google-Smtp-Source: AH8x227TBeOebe5WYER5bdHVEI1AUI0WQTcEALyY1Vn07yW8w4NGsCfBo9lpVoZVXJrTwtLhQTlK X-Received: by 10.98.204.69 with SMTP id a66mr10541660pfg.33.1519128066018; Tue, 20 Feb 2018 04:01:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519128066; cv=none; d=google.com; s=arc-20160816; b=ON+tnUi0b1OfNLYk+kI/sJJDjmb9RM7viE3zFfJIHLW3c4KGGgy7CjLGFrWVcMfd29 TG48PEysJ7e+Yjwxyrsrou/kZf3rqHFOLg+Vh7KWzfIGYabCmvs6LvUkNStgk3nSCnRT HSnb/nDVqiD5UxsONO5+WlO+zpvquZn4MRyIa2UeE0hRL+/APSsc3G8MPd2GqRsvMKY4 Ic4uVI3VHSYRSom/whG0D5KfeGxSpsJaII6tWslYhyz9vMsG5f9rl5/K4ch2jiKbZQgZ oSaWzhyWUSYjmX9Ffsk+glnqjmM+YTPq0Ye19UFiK8NmIhvJtnivVzT8yVDM3msd6N+o vXiA== 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:date:subject:cc:to:from :arc-authentication-results; bh=jhotoyoWri2GEApGlRHagNVUionzj33ngEJXSTx05kA=; b=LmsUC+LLA4JxAQBnxN7Fq6AU9yV5rHxcGAq56HqsUwdtndpnIXgfVKq/Ju+wPJtxhF LsjpnaNLX8V6aJDLSvOA8UaIVgkfKLHxk0YeyZ1WjKynipuzuqEUpxd2CTa5FHqiCQfi dfoaYIJylE0jgfxipBHcSycCfmYih01gwxpagz1H8o7Zsc2xw6vTzWFU9G5h5w500QOA fZkQn/WVHczodOaD1d2ZiKmoh9kqhc3VOx5x3y5raMtZOZLfavuB4IEvmygew1vWBmDh iIJ8U+V/0SajBQxHU4MC64QZw1er1tBpqYdBOBgeGJ9AaArOQblb2Yv5K1ap/Kg5SWri /mFw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 70-v6si982276ple.465.2018.02.20.04.01.04; Tue, 20 Feb 2018 04:01:06 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751769AbeBTMBB (ORCPT + 28 others); Tue, 20 Feb 2018 07:01:01 -0500 Received: from mout.kundenserver.de ([212.227.17.10]:48609 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751466AbeBTMA6 (ORCPT ); Tue, 20 Feb 2018 07:00:58 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue105 [212.227.15.145]) with ESMTPA (Nemesis) id 0MK1R7-1enH6N3TRV-001O8e; Tue, 20 Feb 2018 12:59:31 +0100 From: Arnd Bergmann To: stable@vger.kernel.org Cc: Greg KH , linux-kernel@vger.kernel.org, Arnd Bergmann , Alexander Shishkin , Andy Lutomirski , Arnaldo Carvalho de Melo , Josh Poimboeuf , Linus Torvalds , Thomas Gleixner , Ingo Molnar , Peter Zijlstra , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org Subject: [4.4-stable 15/22] perf/x86: Shut up false-positive -Wmaybe-uninitialized warning Date: Tue, 20 Feb 2018 12:55:02 +0100 Message-Id: <20180220115527.1806578-16-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180220115527.1806578-1-arnd@arndb.de> References: <20180220115527.1806578-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K0:hTy6pIpOSkbjYvtV8AoKEqc60knZbtc5iYHTNxQAOjxZ9rhupVB CAC80qyYX4ew1wgpLUXSPSgmrxf1oR15i8oHPhkQexoVNv6d4aJWHBgPJFr1jUZyMKQUiet YhUNVM5VxElhP4UKrX3hzXwreCZSgGQTKllR8ADsA7WAOApfhXpmL/OWXeYqWgthGKuvKoJ go+G+lI0Aclh70IZ6gzzA== X-UI-Out-Filterresults: notjunk:1; V01:K0:EwxmDRNc3kw=:iaFlXy5V7Fhi0+oaT8SGd2 5SZzafK7td3oJz0tI3/5wlUWg0RKmA0WgMHIrlh0ABYnCiLxDUQP2DAPcuJLg3ReEbdXb7LVi z0bJvO5c4ZbFBsmYd1yGo+R7FUhaRbSM/Vy/tSgNYkHnlYptydCCZD9SEfpwl3oeMzKV2QGq3 tTFNJ1FQjT9fKCR+Z0rNFrtzdwACJLfQ2ULBswdSo7v5rMjS8XqHhPJ22edATCs/N2wB/5E3u GfnYeRlWEDPIHf2xl0icGS2+aKWFqk37xHpI0Liu4r6CZTxmIiRbdFYKdkCALcRZT7Prujqrw NF5g4TmZYzAVTAgejylwUbPpmZwkKqMzD9p1zAnrWrU/96IMbMXa/ITQ+XJTrdUeymLMRt1Zk Ctv5zUecfDZ0EMfqSBcSUaaDJ+g/t70fuaJmYnCSkvytPIDyZR0hYXZIhR7a3KqZJSF3t4fto t6Y8F+AHwqj0MimpStbs+HKfirUwaNDGSqJdicutVXAjK4ggxpag9olBYm7S71Hn8S/MdhIGz PSVZ9YsZSo2A/PN4TDAxxOBOjWR7mLOIcCB2sOgMWJ7iZq6m1UVxsman8NDp4KUKFMYlRF7rO n9Rbj44LQ0WgDaDPKo2dewd6eMoWfXwIUuOLUeR3l+If/jjR8aYMLiF25eJmfmAP3UlaFx/9Z 1enbbHfkIh7VV0Vk2Lip+h2GNQ22UpE2LamGyaHK4nKlaELJRvfbZQo22QrM5YN+vWq5/7j+9 oMwKwH1i6x/ZFJATrhVSElRmc05jUlon69E1AJbU1VZxvm7zLH84sVcXol0= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org commit 11d8b05855f3749bcb6c57e2c4052921b9605c77 upstream. The intialization function checks for various failure scenarios, but unfortunately the compiler gets a little confused about the possible combinations, leading to a false-positive build warning when -Wmaybe-uninitialized is set: arch/x86/events/core.c: In function ‘init_hw_perf_events’: arch/x86/events/core.c:264:3: warning: ‘reg_fail’ may be used uninitialized in this function [-Wmaybe-uninitialized] arch/x86/events/core.c:264:3: warning: ‘val_fail’ may be used uninitialized in this function [-Wmaybe-uninitialized] pr_err(FW_BUG "the BIOS has corrupted hw-PMU resources (MSR %x is %Lx)\n", We can't actually run into this case, so this shuts up the warning by initializing the variables to a known-invalid state. Suggested-by: Peter Zijlstra Signed-off-by: Arnd Bergmann Cc: Alexander Shishkin Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170719125310.2487451-2-arnd@arndb.de Link: https://patchwork.kernel.org/patch/9392595/ Signed-off-by: Ingo Molnar [arnd: rebased to 4.4] Signed-off-by: Arnd Bergmann --- arch/x86/kernel/cpu/perf_event.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.9.0 diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c index 5b2f2306fbcc..b52a8d08ab36 100644 --- a/arch/x86/kernel/cpu/perf_event.c +++ b/arch/x86/kernel/cpu/perf_event.c @@ -188,8 +188,8 @@ static void release_pmc_hardware(void) {} static bool check_hw_exists(void) { - u64 val, val_fail, val_new= ~0; - int i, reg, reg_fail, ret = 0; + u64 val, val_fail = -1, val_new= ~0; + int i, reg, reg_fail = -1, ret = 0; int bios_fail = 0; int reg_safe = -1; From patchwork Tue Feb 20 11:55:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 128892 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp4560042ljc; Tue, 20 Feb 2018 04:04:06 -0800 (PST) X-Google-Smtp-Source: AH8x225WkSgODWNBuq7j5ENf4CaJdjgYFRzl+qoTrHA0gUylOvaZwsOnBaxOBCcbjmyg1xhj0n0Y X-Received: by 10.99.143.69 with SMTP id r5mr14792399pgn.160.1519128246267; Tue, 20 Feb 2018 04:04:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519128246; cv=none; d=google.com; s=arc-20160816; b=ex470Gx7R9tHjleA4ZcW9qa9uh7ihmY/HEkdj9gphPsGutE1CFBvH3kt0UtHoeiMN8 sq/Q5pwTAnssYtA9fvyA6HD+crBlt/m6NOBaDCnrTGkBEVjcw9BXHvFK/ipAU9hepCP3 voD+yPLSTbRqmH8UVeC1D60IPiO4qpa4gKuX9O6LNAR7Av11coc+dHn+18R0kQWY2ziI XOImvnB+nd9A3AZyNuAIt1nBflzyFUCOsTkypTimw40rd2WNZQmczWXc1vsqVnJZHtll Z4SUWER+9EKS27PRUCHqgcN3K2pr7n0VBAORWbVN6tabusMk35SOiI/9LdbTRu87i7UM OMpA== 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:date:subject:cc:to:from :arc-authentication-results; bh=0MTWQo4aYCDaWOFb6buoMRjDsfmt8Ienmk+DfaF9Ojk=; b=W+ig8EJE0HwTb5VtBi17u6HwtzuL92roVKgQAyzEbD85b9G/tHJSLwHryFB+BSzgv/ uYRbSDqvRtf6ChWvEkVHhkB04ryp7Rd2rJD3kGT199h2cmG2ZcSHXD1j2HEBMhyIwzdZ 2WOpGuVXS87Lkq9+JUglL6GY2l7lWTACpX2MHDB8MNslqPvdL+UeAa9s3PaL/wzCpbgK fsG0xnWn4lyt2B8w+V0uQD4WgdACLHkcOlOvvDEa7yxmYovqWGLwavHYr8jglcPxpFGK CgD3WTND8lMt7S+YUkQn+TrVga2yC4eX/bHlFPZQsjqd+HaXQLUjipHMcUcnALXY8nMM Kx7w== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g1-v6si5675634plt.574.2018.02.20.04.04.05; Tue, 20 Feb 2018 04:04:06 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752101AbeBTMDq (ORCPT + 28 others); Tue, 20 Feb 2018 07:03:46 -0500 Received: from mout.kundenserver.de ([217.72.192.74]:45065 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751578AbeBTL7q (ORCPT ); Tue, 20 Feb 2018 06:59:46 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue105 [212.227.15.145]) with ESMTPA (Nemesis) id 0LgGuK-1eRBtJ1yaK-00nhNB; Tue, 20 Feb 2018 12:59:41 +0100 From: Arnd Bergmann To: stable@vger.kernel.org Cc: Greg KH , linux-kernel@vger.kernel.org, Arnd Bergmann , Kalle Valo , Solomon Peachy , linux-wireless@vger.kernel.org, netdev@vger.kernel.org Subject: [4.4-stable 17/22] cw1200: fix bogus maybe-uninitialized warning Date: Tue, 20 Feb 2018 12:55:04 +0100 Message-Id: <20180220115527.1806578-18-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180220115527.1806578-1-arnd@arndb.de> References: <20180220115527.1806578-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K0:wogxyrLAeoVmOE3r29gJQXizDF10TMsXKGkb7qgte9xWgNQXIXV ZItIABqs8fnFDcJFHz9ZL5lvgYzWsuL242Xzyz6XLPs6eWeQzOFc8VEj4HMsXtrpBjtiUyO ur4fKY0/dQvYDG/sucXdH1vhItknyUh3kGkInc7JXKsYGRqEQ2vldH+4foOz3Y/je2yqFDW 86BIGtC0UWsW1rU03iTQQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:vhbhmIYO6kA=:d0jNSAVvPX9pDsWukIZ82I yhlTLG0VwelRbFAxG34UmAPBdzJZD1op110upBwVOtIIzOl4kaXeYvIWfyj6bxktZ6fVx3yG0 QaHkGkjAabxrL/QxUSkrNyZr2QtOVXRH/vqVXugxjE5UTxsXAZcrklkl7hqTj/pQVPeuOMstq AiyEDoKq3cHnQ/l06iAX36j3/EsAeFw45GpnqWqPiWCBivaoZRtPha35jmHDgh6iOuSoUryWu H0200kx2APW6oBslrqn+iv3EHN7/Uz68YWEpAMyuYL9dauFnKT9Q+g/R7/YtiCawujTdq6g3G HjQsMA9gHiWG0rABIcip+b0hDp0jFiPYuedBjdE2bj+htifFPyadZ8ycs3bNZIk2lHjws1zxJ zfqRurrYJfe9TkJ/bklmzHzyFsbTWXwHDx+T/+hNLmDOyuDITQOZZIZZbTgla+S8jXow6O5hy hTgH6+oeGQTmyWA0qvv8Rgi7y8T74ZOw0xtG/AttGaEZraH/z07nvjE47LxAE4PdlKoh99F1U Cz+RqcH3xktzymXOUpd3TtjnbjKWMa7voQ3v56aRJPd/QxrV/vHTIi3ELHs4KEIgGELqpJr4n EqNwpiyriezswWaSbhcIsneGmWJIcLxv2LLK3SapIyOSROmwRO92rS3iU925GWq75SH/Lwn6r 2QpEo5RyVdboyrAdE38Sd2HjErwSkos/kMkJe4WJ4A2RIgRyGljRRBAFBhF79IAYAxPOdZbKT b+Adj6oToeNdJ8ypjWKm069fISYwL8YhZSoDW016dFF2dv9xU2E/blpIeTQ= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org commit 7fc1503c906f0fac62d3506a6e993e49fb996248 upstream. On x86, the cw1200 driver produces a rather silly warning about the possible use of the 'ret' variable without an initialization presumably after being confused by the architecture specific definition of WARN_ON: drivers/net/wireless/st/cw1200/wsm.c: In function ‘wsm_handle_rx’: drivers/net/wireless/st/cw1200/wsm.c:1457:9: error: ‘ret’ may be used uninitialized in this function [-Werror=maybe-uninitialized] We have already checked that 'count' is larger than 0 here, so we know that 'ret' is initialized. Changing the 'for' loop into do/while also makes this clear to the compiler. Suggested-by: David Laight Signed-off-by: Arnd Bergmann Signed-off-by: Kalle Valo [arnd: rebased to 4.4] Signed-off-by: Arnd Bergmann --- drivers/net/wireless/cw1200/wsm.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) -- 2.9.0 diff --git a/drivers/net/wireless/cw1200/wsm.c b/drivers/net/wireless/cw1200/wsm.c index 9e0ca3048657..3dd46c78c1cc 100644 --- a/drivers/net/wireless/cw1200/wsm.c +++ b/drivers/net/wireless/cw1200/wsm.c @@ -379,7 +379,6 @@ static int wsm_multi_tx_confirm(struct cw1200_common *priv, { int ret; int count; - int i; count = WSM_GET32(buf); if (WARN_ON(count <= 0)) @@ -395,11 +394,10 @@ static int wsm_multi_tx_confirm(struct cw1200_common *priv, } cw1200_debug_txed_multi(priv, count); - for (i = 0; i < count; ++i) { + do { ret = wsm_tx_confirm(priv, buf, link_id); - if (ret) - return ret; - } + } while (!ret && --count); + return ret; underflow: From patchwork Tue Feb 20 11:55:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 128889 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp4557036ljc; Tue, 20 Feb 2018 04:01:42 -0800 (PST) X-Google-Smtp-Source: AH8x227xTu8BJEEhkwbonBaV1ElnDba6+Rt7hNqXG4U2L2bG1w3WLUku0g1LFk35nExFiovdAx87 X-Received: by 10.98.33.4 with SMTP id h4mr17654589pfh.144.1519128102306; Tue, 20 Feb 2018 04:01:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519128102; cv=none; d=google.com; s=arc-20160816; b=StkEFaMrmf8sJZwZzGP4AuIkqS51HwXhwziiTlhVCKpGIXOLAIsJx/StDp7C97SYsc kqVVhr0R7o1c5oUbWJSZYGYFGiusUZ5JXMBxfFeW91D5jOm1wOWYHT9k+M3iXllTmU+i Xlq+p68EffW58BS//nOi62YOTwziE8CqPxsIbo10rZsPTooQ61kydFwGAtXsf80/r6ll 0zVao9rqLioZx3oeIXIJxjRkg2V8YBxnvLTXZcp2aL2hJxhc8CGXJsCZXtpnUSZTrZ6g Wq6OWsomoH1VYJA3ZEckJubuImTouVenROi80/wkqcRS/r3oAuPirDaWCzK+iVrw/bD3 mIUA== 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:arc-authentication-results; bh=STfyYkQNttJko4nQxXNkFvQN9OwWEZTdfoBqwAFtIK0=; b=0cYWxix3s/fOMbqTTyG++GJanmf/iAlXkLlNuaLU4SK0hRirS9DB2VQptzOarF999P SbGuM6m1o0tkhvWbM77UIRzLe7/i3teHw/iP9qkh7udLONjVL9Z/jzrNXc0i4pmtr0Vb X69P0OmRIG/COyFb8lA92tFweXlCp6LHR3YXXfG+R6BV4WbnqvngEew/TxJSuubUpD60 lG9D0v1hWNCh9qmXZrrcU7dxcB5QDHcP38gsWDj6aJrYxexEIZ2fLLqOYYA++ZKGIGtd MF9RV6LDvETIWjJTqxYcYyDZT1YgftS+DhWPAsP5IlhW9sZdpM6IRk88nC+8zlde4tAt iqXw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x2-v6si11419995plv.672.2018.02.20.04.01.35; Tue, 20 Feb 2018 04:01:42 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751845AbeBTMBc (ORCPT + 28 others); Tue, 20 Feb 2018 07:01:32 -0500 Received: from mout.kundenserver.de ([217.72.192.75]:56899 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751559AbeBTMBa (ORCPT ); Tue, 20 Feb 2018 07:01:30 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue105 [212.227.15.145]) with ESMTPA (Nemesis) id 0M9XrD-1euS6L40Df-00Cxv0; Tue, 20 Feb 2018 12:59:51 +0100 From: Arnd Bergmann To: stable@vger.kernel.org Cc: Greg KH , linux-kernel@vger.kernel.org, Borislav Petkov , Linus Torvalds , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Arnd Bergmann , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Borislav Petkov , Tom Lendacky Subject: [4.4-stable 18/22] x86/microcode/AMD: Change load_microcode_amd()'s param to bool to fix preemptibility bug Date: Tue, 20 Feb 2018 12:55:05 +0100 Message-Id: <20180220115527.1806578-19-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180220115527.1806578-1-arnd@arndb.de> References: <20180220115527.1806578-1-arnd@arndb.de> X-Provags-ID: V03:K0:uqE8s66uMNTDhEJLexQJsyxkl+IH4+MKM+9K2WK5FlmqSq2hlB2 aWuM+QMpAZs9EZeTjd9BQW0H/tOR3kJJ9nYsAdas+xWJObHX1dPUTcGG+45PXBqZiqhsqGq 9eeBNX9y4vFMPg4rBzm9QRtoMZxNPBqsI/UAcZQrjzTVCaiaqVxoiKRGNZJpbZ5LDrvvQGE HLLeYdXCmTCs285sUIpYQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:jq9k2wDqHgE=:ddbdEMsb4jpd0hcyKLuMOj H7IHjddmguNQKGuIG98Zv4/jmdMft3VirdpRgfGJ9GA7iE498yhNoTLgeuQVlb4dOGV1p7CEA adgSF7V5cf1gZIshxnVOuE0bXXewYOdSlAjtXBILVHz64E0y7W4k7d9GtRdm6L9f/qEK4QF2g 1InWNB5Xt8eSyciuUw7SWN8PhbXspfzyqrp9l0m8/7fvYOXRjeLduSsFFN7BSeOhyZXpWSGWb SDsl9hkQetHxMAzbEk+LuvNwD4sQTo8OaY2JgfcO0vaEqHTGeJcXZ02Lm9a5/PAa6MIKks/li oV/SaXKquVrbZg+SfmqL/p3iyrckopVvVHJW6NF4xrcuRdaLO3D+PdA5toIdzZtolga2pW1/S 8jotCcrKfGiSQ5BowHJ9M4hYN5CFZnF8iwK1W3f80RqICpJ6UDjYCjSjx1NkVBdP9gO3nvF5E nNKr2N23qvOQ8d+xL5Hofiyfwrq9cZzsVxCL0tx9E/OIXuC1NbzFdzZ8pJzdRoN8VFgGUw3gA +/Ju0ZnnZ0/a6dK+8Bag8L0UrD1iwv6fUhDdBTAk9CVKt6V56+fh9ws8HxPK5zxWq193qAV8a IWz1wRf32erbqoJMRWuC94SXAD3tsbcq0cdDUbjl7lZuA5Xpep7P6O5JcEOYO36lx+E3tYBTu j6Tv3VLZFBKFiZq3obgDOF/l8Q7Rq16qFA5ws6LyQdRRrcoUtJsBgsY2v66KpXnLFE5qUEpFN u3eZWpX+uE7c/WGbxJE+GS9/UsMKJ5l2DlbFew== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Borislav Petkov commit dac6ca243c4c49a9ca7507d3d66140ebfac8b04b upstream. With CONFIG_DEBUG_PREEMPT enabled, I get: BUG: using smp_processor_id() in preemptible [00000000] code: swapper/0/1 caller is debug_smp_processor_id CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.12.0-rc2+ #2 Call Trace: dump_stack check_preemption_disabled debug_smp_processor_id save_microcode_in_initrd_amd ? microcode_init save_microcode_in_initrd ... because, well, it says it above, we're using smp_processor_id() in preemptible code. But passing the CPU number is not really needed. It is only used to determine whether we're on the BSP, and, if so, to save the microcode patch for early loading. [ We don't absolutely need to do it on the BSP but we do that customarily there. ] Instead, convert that function parameter to a boolean which denotes whether the patch should be saved or not, thereby avoiding the use of smp_processor_id() in preemptible code. Signed-off-by: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170528200414.31305-1-bp@alien8.de Signed-off-by: Ingo Molnar [arnd: rebased to 4.9, after running into warning: arch/x86/kernel/cpu/microcode/amd.c:881:30: self-comparison always evaluates to true] Signed-off-by: Arnd Bergmann --- arch/x86/include/asm/microcode_amd.h | 1 - arch/x86/kernel/cpu/microcode/amd.c | 17 +++++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) -- 2.9.0 diff --git a/arch/x86/include/asm/microcode_amd.h b/arch/x86/include/asm/microcode_amd.h index adfc847a395e..fb163f02ebb1 100644 --- a/arch/x86/include/asm/microcode_amd.h +++ b/arch/x86/include/asm/microcode_amd.h @@ -59,7 +59,6 @@ static inline u16 find_equiv_id(struct equiv_cpu_entry *equiv_cpu_table, extern int __apply_microcode_amd(struct microcode_amd *mc_amd); extern int apply_microcode_amd(int cpu); -extern enum ucode_state load_microcode_amd(int cpu, u8 family, const u8 *data, size_t size); #define PATCH_MAX_SIZE PAGE_SIZE extern u8 amd_ucode_patch[PATCH_MAX_SIZE]; diff --git a/arch/x86/kernel/cpu/microcode/amd.c b/arch/x86/kernel/cpu/microcode/amd.c index 2a0f44d225fe..6da6f9cd6d2d 100644 --- a/arch/x86/kernel/cpu/microcode/amd.c +++ b/arch/x86/kernel/cpu/microcode/amd.c @@ -131,6 +131,9 @@ static size_t compute_container_size(u8 *data, u32 total_size) return size; } +static enum ucode_state +load_microcode_amd(bool save, u8 family, const u8 *data, size_t size); + /* * Early load occurs before we can vmalloc(). So we look for the microcode * patch container file in initrd, traverse equivalent cpu table, look for a @@ -438,7 +441,7 @@ int __init save_microcode_in_initrd_amd(void) eax = cpuid_eax(0x00000001); eax = ((eax >> 8) & 0xf) + ((eax >> 20) & 0xff); - ret = load_microcode_amd(smp_processor_id(), eax, container, container_size); + ret = load_microcode_amd(true, eax, container, container_size); if (ret != UCODE_OK) retval = -EINVAL; @@ -854,7 +857,8 @@ static enum ucode_state __load_microcode_amd(u8 family, const u8 *data, return UCODE_OK; } -enum ucode_state load_microcode_amd(int cpu, u8 family, const u8 *data, size_t size) +static enum ucode_state +load_microcode_amd(bool save, u8 family, const u8 *data, size_t size) { enum ucode_state ret; @@ -868,8 +872,8 @@ enum ucode_state load_microcode_amd(int cpu, u8 family, const u8 *data, size_t s #ifdef CONFIG_X86_32 /* save BSP's matching patch for early load */ - if (cpu_data(cpu).cpu_index == boot_cpu_data.cpu_index) { - struct ucode_patch *p = find_patch(cpu); + if (save) { + struct ucode_patch *p = find_patch(0); if (p) { memset(amd_ucode_patch, 0, PATCH_MAX_SIZE); memcpy(amd_ucode_patch, p->data, min_t(u32, ksize(p->data), @@ -901,11 +905,12 @@ static enum ucode_state request_microcode_amd(int cpu, struct device *device, { char fw_name[36] = "amd-ucode/microcode_amd.bin"; struct cpuinfo_x86 *c = &cpu_data(cpu); + bool bsp = c->cpu_index == boot_cpu_data.cpu_index; enum ucode_state ret = UCODE_NFOUND; const struct firmware *fw; /* reload ucode container only on the boot cpu */ - if (!refresh_fw || c->cpu_index != boot_cpu_data.cpu_index) + if (!refresh_fw || !bsp) return UCODE_OK; if (c->x86 >= 0x15) @@ -922,7 +927,7 @@ static enum ucode_state request_microcode_amd(int cpu, struct device *device, goto fw_release; } - ret = load_microcode_amd(cpu, c->x86, fw->data, fw->size); + ret = load_microcode_amd(bsp, c->x86, fw->data, fw->size); fw_release: release_firmware(fw); From patchwork Tue Feb 20 11:55:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 128887 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp4555823ljc; Tue, 20 Feb 2018 04:00:49 -0800 (PST) X-Google-Smtp-Source: AH8x227ajaltNZtgho8g7s7LgvE/3Ow0NIP5dBh3rPh2EpcSVB4zhaie03IBevL+ae+xjfmqNyd+ X-Received: by 2002:a17:902:9343:: with SMTP id g3-v6mr17579334plp.319.1519128049227; Tue, 20 Feb 2018 04:00:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519128049; cv=none; d=google.com; s=arc-20160816; b=SUeEg73eFFTcuq+NByLUweMQf/QPcYgT9z2iwxS6rlXvPD+ip7JMZ5Y4wC+qPVK5Nh K3ifJNi2IMiVNJtKjnmCVyGRaqOGmYgBuBdR3abRSd5dFIW4QidolSNtwMgFvEl2kbzC RP5NoDreYWSZ1uQg8HD31NYfKwY73xPUNk50CzdC1jwfMgCi4wUDYk5kpRuqMk7p33Zq q/Uh9TXyNQ5IwWA+Fer660TOg9MMGoNaWz87wu9fQ3ovcJDxcpnZHnQ3/18GpGqLK219 EJ9A0FV+SpBwVbUIIBttEYqD7QYjXnkNZ1euc9WaugywYSZEbTmyWY9j1VMl+EDyhgUw viNQ== 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:arc-authentication-results; bh=N6EkZMfuUIwnmqw8jJC3FYQ/PwLQpvATtKpHkiK5JeI=; b=K+TG1mUALF/3cwC3tiydR4RtdY/cafsyLh1W2bmORS1RRZLSU+9IGuMx9WecH+Uwf6 2G/NGBUQvp/Y0fcYwaNNwg6GYC23iKAzsHLaSvRluFdNjbGpDRXAS8rsfUweO3nIGuf7 YRUgm+2znQAx0ex0tb/GNOPo6DBf23cIPeTTlutCHUUgZKtcaF60U5IY7qR954daB9nY rdNZ+uC1OJWT1QDMiqe3OF21kZHzEDvaI0ukCwZQgkZa4q/5Up5bb204rWILAY4Gklxt FliNCq/G1SpCUyxLq49h1W2rjLAMn1la2GDWLal9yIFHD123y2FuRA3bO1SQJ/lzTVuc qp4Q== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h7si4589028pgc.827.2018.02.20.04.00.47; Tue, 20 Feb 2018 04:00:49 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752129AbeBTMAl (ORCPT + 28 others); Tue, 20 Feb 2018 07:00:41 -0500 Received: from mout.kundenserver.de ([217.72.192.75]:48581 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751467AbeBTMAh (ORCPT ); Tue, 20 Feb 2018 07:00:37 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue105 [212.227.15.145]) with ESMTPA (Nemesis) id 0M5xYf-1eZC7x04Fd-00xtZk; Tue, 20 Feb 2018 12:59:56 +0100 From: Arnd Bergmann To: stable@vger.kernel.org Cc: Greg KH , linux-kernel@vger.kernel.org, Arnd Bergmann , "David S . Miller" , Jaroslav Kysela , Fabian Frederick , netdev@vger.kernel.org Subject: [4.4-stable 19/22] net: hp100: remove unnecessary #ifdefs Date: Tue, 20 Feb 2018 12:55:06 +0100 Message-Id: <20180220115527.1806578-20-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180220115527.1806578-1-arnd@arndb.de> References: <20180220115527.1806578-1-arnd@arndb.de> X-Provags-ID: V03:K0:JC12E5hMP2Urpc49WTS1pU8OIt5BwY+2oKik/gFcb3uI55adkG5 ZJ+Tkw+nt5mnr7RxVSSceSFjHoXsN04RKCf54q6lM5umWYxkTebkHtitHy8MvguEUznnWRB PPLOkJXu3rqulR632AAiRzZdClrf5mZB7E+apa2BbM06bef1bmfqi1IEHmojYLWg1BOgOF3 cqMr3HymP4F6+iofd8jSw== X-UI-Out-Filterresults: notjunk:1; V01:K0:RzR/48J6zoE=:JsDqr9tOAWKRRJa51YyOz7 myHAeRQiYA9vwO38j1Y+JRiQdQefXeToen51YPteZkVSdsNweyiUKZwAfGRvEQy89aF4NNQ8A BLQZgYSc8g+qZmlWMrnZsT74BoxJsV/oXwd6LuuKgdGVPAElGnao7lpftv1quICuUlV457fYd m6kGkXV5SFma6Kdf8/fgb2yrq3Bu7Jp0nnDS0BTBVX06VP820Wg7Njt7oNAEKEecxKFAk6GEn i0CTmNsH06/2qgMIHIRm7TuSGtG0+hfyHI8esUvaAuBirEWBk73cIeWopL90hg8ruOfa6LZXZ 125LTO9+yPBcQOwb8d+WicWM9qOHH/LQ0TVdE7NCydnD97Hu8JRoavUZzsH27A/I/uGVAk//r g6BsMlcTLEDsl8vmGnRoyw/YHioT8BF14HHng4KfPKyXRTKA2+dyOkeM5uydjTOyhz3R0ZrgP Y4qUndRHtpTRjppg2gXDsCaUsA6WTg2ZmYevCnQlty0kCnNoTQuxNnIXPotcHX+TJBiBQSIHg SL2kKd3mbkaDKnofgCCg5cHfN52VU2gjwtwZLNpLZFjbN+zt3ousgNw0XH9OPd6yheniHu2Lk uqbnMvwviD32tCGulBiJIptOlG4Fgd6wDwMZP2FEF9XwPWwO3tHTpJ/Ug+ghwDKC9EBGb2nvO oI87Q6t8SVjYMr+DRNT1hGCBt1hnphUTSJ65oO1/6ZahQC7YvEX3xX+ClEeRHNOtNyg6LzQJI qoa/frm9TFaHD9LkQE/2/Wtt2LpqpYBkP7Pdew== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org commit 747a11279a442b913a57bf38934879babab3b58b upstream. Building the hp100 ethernet driver causes warnings when both the PCI and EISA drivers are disabled: ethernet/hp/hp100.c: In function 'hp100_module_init': ethernet/hp/hp100.c:3047:2: warning: label 'out3' defined but not used [-Wunused-label] ethernet/hp/hp100.c: At top level: ethernet/hp/hp100.c:2828:13: warning: 'cleanup_dev' defined but not used [-Wunused-function] We can easily avoid the warnings and make the driver look slightly nicer by removing the #ifdefs that check for the CONFIG_PCI and CONFIG_EISA, as all the registration functions are designed to have no effect when the buses are disabled. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller Signed-off-by: Arnd Bergmann --- drivers/net/ethernet/hp/hp100.c | 18 ------------------ 1 file changed, 18 deletions(-) -- 2.9.0 diff --git a/drivers/net/ethernet/hp/hp100.c b/drivers/net/ethernet/hp/hp100.c index 1d5c3e16d8f4..3daf2d4a7ca0 100644 --- a/drivers/net/ethernet/hp/hp100.c +++ b/drivers/net/ethernet/hp/hp100.c @@ -194,7 +194,6 @@ static const char *hp100_isa_tbl[] = { }; #endif -#ifdef CONFIG_EISA static struct eisa_device_id hp100_eisa_tbl[] = { { "HWPF180" }, /* HP J2577 rev A */ { "HWP1920" }, /* HP 27248B */ @@ -205,9 +204,7 @@ static struct eisa_device_id hp100_eisa_tbl[] = { { "" } /* Mandatory final entry ! */ }; MODULE_DEVICE_TABLE(eisa, hp100_eisa_tbl); -#endif -#ifdef CONFIG_PCI static const struct pci_device_id hp100_pci_tbl[] = { {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_J2585A, PCI_ANY_ID, PCI_ANY_ID,}, {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_J2585B, PCI_ANY_ID, PCI_ANY_ID,}, @@ -219,7 +216,6 @@ static const struct pci_device_id hp100_pci_tbl[] = { {} /* Terminating entry */ }; MODULE_DEVICE_TABLE(pci, hp100_pci_tbl); -#endif static int hp100_rx_ratio = HP100_DEFAULT_RX_RATIO; static int hp100_priority_tx = HP100_DEFAULT_PRIORITY_TX; @@ -2842,7 +2838,6 @@ static void cleanup_dev(struct net_device *d) free_netdev(d); } -#ifdef CONFIG_EISA static int hp100_eisa_probe(struct device *gendev) { struct net_device *dev = alloc_etherdev(sizeof(struct hp100_private)); @@ -2884,9 +2879,7 @@ static struct eisa_driver hp100_eisa_driver = { .remove = hp100_eisa_remove, } }; -#endif -#ifdef CONFIG_PCI static int hp100_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) { @@ -2955,7 +2948,6 @@ static struct pci_driver hp100_pci_driver = { .probe = hp100_pci_probe, .remove = hp100_pci_remove, }; -#endif /* * module section @@ -3032,23 +3024,17 @@ static int __init hp100_module_init(void) err = hp100_isa_init(); if (err && err != -ENODEV) goto out; -#ifdef CONFIG_EISA err = eisa_driver_register(&hp100_eisa_driver); if (err && err != -ENODEV) goto out2; -#endif -#ifdef CONFIG_PCI err = pci_register_driver(&hp100_pci_driver); if (err && err != -ENODEV) goto out3; -#endif out: return err; out3: -#ifdef CONFIG_EISA eisa_driver_unregister (&hp100_eisa_driver); out2: -#endif hp100_isa_cleanup(); goto out; } @@ -3057,12 +3043,8 @@ static int __init hp100_module_init(void) static void __exit hp100_module_exit(void) { hp100_isa_cleanup(); -#ifdef CONFIG_EISA eisa_driver_unregister (&hp100_eisa_driver); -#endif -#ifdef CONFIG_PCI pci_unregister_driver (&hp100_pci_driver); -#endif } module_init(hp100_module_init) From patchwork Tue Feb 20 11:55:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 128885 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp4555048ljc; Tue, 20 Feb 2018 04:00:13 -0800 (PST) X-Google-Smtp-Source: AH8x225mpsXxrw7kSqqFp5EBGbRFKDH1xok3u5HnxplIyWDSmxwZQPNaX99GkvfR/okMC5ij+Xsf X-Received: by 2002:a17:902:aa87:: with SMTP id d7-v6mr10860705plr.237.1519128013806; Tue, 20 Feb 2018 04:00:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519128013; cv=none; d=google.com; s=arc-20160816; b=q7iCPm1DY0kr3v1xpkhxWvm0eDRLA7Y4KlCZ2F+kt9tOyO2gcLx2AR6bZKWwlDtlic WvTW5/I/7ep8wWwMvPSe0Ea6JHlWtZbbWGt7kpZAA0quMfANvkP03jaQwA+sr4SY5IVz LSNrWjAfzGLwQ1tIEoR3yDlpSW+vlPzSlWDrTe/Wa2bVd4kBmsB1OJW5ITYkMpa3FMkt nri6Mycfut8U48BQsP7W4J8kiK9g8ya2FDf+ZYAWVof25t0XQ9KM19DIxSZKFViyuwK/ ITbl8cR8BlZHkkqxTjD2gaeW2T0bB7taIyTiWQkRNAPpM45blODXjzP5X08XPXF5Dl/m YqOA== 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:arc-authentication-results; bh=c6/JVI9PhrCZHdU5WmS9+nCrygsQ9kRFEVYVAW3urAg=; b=T9qlBlnS9xJ0DTXr3hnd08c6zIFAVlS51mK/nqtyBMpnHxAsYpF2fN3cRz33ikdO6J /U0Uwv6Y9Hdh9A3sZIxMnn0d37ovOfxfFFkw2rAkDoyuXxn/TKtUZNwt6skd3MPmukuN 8UigFzLC+xZUoaSNnfjSPVUVaeKxklLlt3XA8xTuT7dbJg/76mqewTbSjc8RfGyNBXPy TdtHZdhvwFfij+Us3R3VMdZ8tzyMHVlxif/aHtPUgaf2nUXRrof1CeuHVnkVxY6IrPVI 5coA5zZQaUXO0sa64Fdc+r/5RRPIVvR6pYup7Vo7ooEL3cBtdn+LYvq4Pwmbdoh7tXhV evow== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c186si1504505pfb.305.2018.02.20.04.00.13; Tue, 20 Feb 2018 04:00:13 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751975AbeBTMAK (ORCPT + 28 others); Tue, 20 Feb 2018 07:00:10 -0500 Received: from mout.kundenserver.de ([217.72.192.74]:44449 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751643AbeBTMAH (ORCPT ); Tue, 20 Feb 2018 07:00:07 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue105 [212.227.15.145]) with ESMTPA (Nemesis) id 0MPGl6-1esWRM2aR6-004QPF; Tue, 20 Feb 2018 13:00:00 +0100 From: Arnd Bergmann To: stable@vger.kernel.org Cc: Greg KH , linux-kernel@vger.kernel.org, Miklos Szeredi , Arnd Bergmann , Petr Vandrovec Subject: [4.4-stable 20/22] ncpfs: fix unused variable warning Date: Tue, 20 Feb 2018 12:55:07 +0100 Message-Id: <20180220115527.1806578-21-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180220115527.1806578-1-arnd@arndb.de> References: <20180220115527.1806578-1-arnd@arndb.de> X-Provags-ID: V03:K0:bbYuVB2S+qrU85V94CfEFI8zD4MD28pQXW4ZMgrRb25k4vuexxf fvom2gUWMzSx4b0IVrHfFy4JoIydVxzCPwHYYWnLB4pB9AN9yLBE15oh3ZXtfEoFvOKyZGI YbNsd0/QZ/QqjnlC0isrZNZTZkjY7/Y5sMJnfg5K6l/uY5g8opA9GGawr0faNcJxFY5NiBD uNSSyl4bukkUYTe0BOfSg== X-UI-Out-Filterresults: notjunk:1; V01:K0:Kxz6P+lxgHg=:l5QX0ZO1ML6npbSlYr8RhF +NcUbSdqvgoZad5+n05En2gMNbD/gwhh9sIQPwinNKmjJCbBSeFTq8dLSj3EXae2GdkU8Zc94 Eo/GbwpDFrmLpUoIXNfakiAXmVmB4rFIMzyUeRZnTAceDTSKpyyDPrEJ06dRtNJ8d3Lab3HI8 HNxfcv+05CPXuvmrHauA1r6uH1MkzbETHZrXAVObK4Ni53DLUgyhU8w2MV+u5MSJWdANp4SCo bivAWpa+Kiv2SjOccJLrrP3gKD8k5BfbPAbjyBlqT4SeXwmACcTjasUMhnUXzIvNwnPiBAXmd VlNrkMSQJp6/mL2j/1fRcUd0gKqGLWuJfsqggrOZ7lMYLPwqkUoCBm/DBW+1Q8V5yimI/hoKw 48Br0m8OcFaeCFzqzbR67zTad+uRimZmzrtP5dSHKLR8k3x74meuOOUd9tPzt2htnJNDzkcrj M6FAYa0MtaiPbhMHhWZJDSh9TzScOPrjCPDxFiV20qbuEq1puFr4PLmh7TZPuBausIwTf2Jgz lxWWjskjqd6zBdXRvazLqMfe9y6BEM41RWMMx5rFnIC7n9afEy/p1dCz2gbz9cSmHV5sC5/bs T/UqIeDbX+sbY+kuNTxYIBNTc5FkvlAkQtqy3KGP9x1sl5XX7PU5uElPzwtGGUmm1bR3XQsN1 3tjVZJdpdaqrTD7zDbCKgCxaqgO1yY3w5kkINtwxSRBugW/XDVEQ4cnSanD+OQpr+sTpD2qTB NAVVvJo5rwyojRIsntEeFiO01yBPngheO2YUng== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Miklos Szeredi commit 9a232de4999666b2e8ea6775b2b0e3e4feb09b7a upstream. Without CONFIG_NCPFS_NLS the following warning is seen: fs/ncpfs/dir.c: In function 'ncp_hash_dentry': fs/ncpfs/dir.c:136:23: warning: unused variable 'sb' [-Wunused-variable] struct super_block *sb = dentry->d_sb; Signed-off-by: Miklos Szeredi [arnd: rebased to 4.4] Signed-off-by: Arnd Bergmann --- fs/ncpfs/dir.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 2.9.0 diff --git a/fs/ncpfs/dir.c b/fs/ncpfs/dir.c index 03446c5a3ec1..4e1144512522 100644 --- a/fs/ncpfs/dir.c +++ b/fs/ncpfs/dir.c @@ -133,12 +133,11 @@ ncp_hash_dentry(const struct dentry *dentry, struct qstr *this) return 0; if (!ncp_case_sensitive(inode)) { - struct super_block *sb = dentry->d_sb; struct nls_table *t; unsigned long hash; int i; - t = NCP_IO_TABLE(sb); + t = NCP_IO_TABLE(dentry->d_sb); hash = init_name_hash(); for (i=0; ilen ; i++) hash = partial_name_hash(ncp_tolower(t, this->name[i]), From patchwork Tue Feb 20 11:55:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 128890 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp4558491ljc; Tue, 20 Feb 2018 04:02:46 -0800 (PST) X-Google-Smtp-Source: AH8x224U13LlSGDNJrDj8joGPc/2jCllwinypmMU7jNJRvvWW3zP1W1DE480I1y5o4r2r/Kk5tlY X-Received: by 2002:a17:902:8a4:: with SMTP id 33-v6mr17064114pll.279.1519128165938; Tue, 20 Feb 2018 04:02:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519128165; cv=none; d=google.com; s=arc-20160816; b=ytTLXtrNcuzqOgUhR73wXqiCdf3C2NUA9GGXlWrdKqS3nkVRcZT85sk2i0fDfbm3eU 9+mb9YtoVtkWau/dsTtPzobsJK03KYf7hIKE/xt3dzC7wbHQUNU7RnzggXZ7f3vkvv98 yJdxtZW7KY/dqWhziInMVYrdOOhPwTWUsDX0h6VplBBAi7vdAR8N2GcUMhcgKvV6cWzg 0Hy1xnJtl2B12t0zfIL20hAlL+Q5C4xDtS7mA+QEDdiJeUvRA2NNwS8WZmtzBdROtRdg OoopTHPq/MyLeb3+mz8tWrNUJYy1CXXJ5bm7VMnf6e8CWYiJqWjJpVrCZ7/E1lSVqUwf jI4A== 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:arc-authentication-results; bh=n0VPyhCXMZURuvjGfsn+sOKO7XNwJVSThX0pcKQE9K4=; b=N8wCBoeEi3EGGgFQRTo+3ZtKccKt/NRiLYf24J9+YSt3vm84Xt7FRICudDQGzQ76QZ pIUHfYimM+5DVE8Bmo/P91UnfHWpAmvHiEEuDYQsrfeoGbRPp1vi4k8DSNW8N92DtPin sdb3Uv/OESfeUbqkAqJYuffLdUpgCkP5AgDUE8bQp5BNtzmXmWXn1ik5WgcNwuXPnFCy mGoNtcC0bSPQY4k4OIGH0Y6GZs2v5RNW8gf3RAYSuCuMxRPPjyC86ZKmA3Xon+pnNjNN xme3UgbkOtHdiUDFXs7omn72xYwAExtXUDYak9QobF7Sovl04G0eS+jjpgbpJnKZzsP0 YmjQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d12si3028254pgt.558.2018.02.20.04.02.20; Tue, 20 Feb 2018 04:02:45 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752137AbeBTMCR (ORCPT + 28 others); Tue, 20 Feb 2018 07:02:17 -0500 Received: from mout.kundenserver.de ([217.72.192.75]:46519 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751459AbeBTMAV (ORCPT ); Tue, 20 Feb 2018 07:00:21 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue105 [212.227.15.145]) with ESMTPA (Nemesis) id 0LdmTL-1eOhjs30Rn-00j0Pm; Tue, 20 Feb 2018 13:00:11 +0100 From: Arnd Bergmann To: stable@vger.kernel.org Cc: Greg KH , linux-kernel@vger.kernel.org, Arnd Bergmann , Mauro Carvalho Chehab , Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , Andrey Konovalov , Andrew Morton , Linus Torvalds , Sudip Mukherjee , Sasha Levin Subject: [4.4-stable 22/22] kasan: rework Kconfig settings Date: Tue, 20 Feb 2018 12:55:09 +0100 Message-Id: <20180220115527.1806578-23-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180220115527.1806578-1-arnd@arndb.de> References: <20180220115527.1806578-1-arnd@arndb.de> X-Provags-ID: V03:K0:S4mdm5x4T++C9QIixzjcAyGZztw2Zy+ftfeWHzCdBr9tmDnyvLd 7TxMbnkqGnj2EPd6s1wyDcMmITN6XRBYqIQGPhFIKIC93C/pORvDSnx8VpFkw7kMMI8ty6x uV6mRkvOezSskeR6DhXVGyweZtkCVRNy+gdUTfHS6Jsp1NerKBlMhhZG8NWZw04AMVbe20d Ojcz/sZqsyOSSCCGm3tNw== X-UI-Out-Filterresults: notjunk:1; V01:K0:bVxY23n4UA0=:m0lyNLaLHxedUEauTCm1Yy 07SNmLRWDZlcRzfhMb6kJfQ28ZBK32c7jVtiSf8cCJ9UlZWQTk28mJB8FpkZppQUJ+8QsSmWW DVmd69pU7y7zXLmNn2qWpBDl2rY58KRTTtRKuL7mC/RU8DlkArI1m2JiDMdVal0IMZDRG7cyK vXELcXIiO+x7nn3nhJhCgd43hbajLzbIDNerInW8KF4hjXN0SXn8FlpPcJg1puSTabj/cepFy +qFdNqsJTscGJNbxZdlBnWwT/Lh9DXjkzTE50npzi79F09c6jGIiM03cBhdk2QaNOt65AqiTk yUaNHobffZVPWe3SHCOhEAZR8V5VpmNfoDasmJMV2t1BEd8LRDqvMZObozKYkvcLkw7TmrUsL stVYFbJOk1NIpwX1E5JCRrYbjcIkp9oBeQZahtaLdq4qw7JImG8RAMUQhUy58ZciYAkBXn98m gbZWmyporQZ+U2pZGTXVbJHqpO8ZaBkyKXJZR/AzbaR0pvi8sAXOjvqQAqtP6WLrI5IMHJUUI lwPceMSCR3HmMUqa45kGgR22p+EONmSt5dhtzopHz2jRqBmPxhjsS/ujGCF+5Qz/RbFbhnOqx mBXj/TQFfmKCG3dhql3QEOm6hBWoqsR2KlSoCsxDLHUUhFlkcc7b5krEJubdXKcRX143c3QZd sUncxDuCis3rcY5d2BqLnCWhLEZeU3qwYAAaWCjDm9NjhKAyF0hg/S05wLM1ZIuHCW1IB6Qcg kvgH1kvWtMjhArgEtweDdwwPko1jvKhXIaB0xA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org commit e7c52b84fb18f08ce49b6067ae6285aca79084a8 upstream. We get a lot of very large stack frames using gcc-7.0.1 with the default -fsanitize-address-use-after-scope --param asan-stack=1 options, which can easily cause an overflow of the kernel stack, e.g. drivers/gpu/drm/i915/gvt/handlers.c:2434:1: warning: the frame size of 46176 bytes is larger than 3072 bytes drivers/net/wireless/ralink/rt2x00/rt2800lib.c:5650:1: warning: the frame size of 23632 bytes is larger than 3072 bytes lib/atomic64_test.c:250:1: warning: the frame size of 11200 bytes is larger than 3072 bytes drivers/gpu/drm/i915/gvt/handlers.c:2621:1: warning: the frame size of 9208 bytes is larger than 3072 bytes drivers/media/dvb-frontends/stv090x.c:3431:1: warning: the frame size of 6816 bytes is larger than 3072 bytes fs/fscache/stats.c:287:1: warning: the frame size of 6536 bytes is larger than 3072 bytes To reduce this risk, -fsanitize-address-use-after-scope is now split out into a separate CONFIG_KASAN_EXTRA Kconfig option, leading to stack frames that are smaller than 2 kilobytes most of the time on x86_64. An earlier version of this patch also prevented combining KASAN_EXTRA with KASAN_INLINE, but that is no longer necessary with gcc-7.0.1. All patches to get the frame size below 2048 bytes with CONFIG_KASAN=y and CONFIG_KASAN_EXTRA=n have been merged by maintainers now, so we can bring back that default now. KASAN_EXTRA=y still causes lots of warnings but now defaults to !COMPILE_TEST to disable it in allmodconfig, and it remains disabled in all other defconfigs since it is a new option. I arbitrarily raise the warning limit for KASAN_EXTRA to 3072 to reduce the noise, but an allmodconfig kernel still has around 50 warnings on gcc-7. I experimented a bit more with smaller stack frames and have another follow-up series that reduces the warning limit for 64-bit architectures to 1280 bytes (without CONFIG_KASAN). With earlier versions of this patch series, I also had patches to address the warnings we get with KASAN and/or KASAN_EXTRA, using a "noinline_if_stackbloat" annotation. That annotation now got replaced with a gcc-8 bugfix (see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81715) and a workaround for older compilers, which means that KASAN_EXTRA is now just as bad as before and will lead to an instant stack overflow in a few extreme cases. This reverts parts of commit 3f181b4d8652 ("lib/Kconfig.debug: disable -Wframe-larger-than warnings with KASAN=y"). Two patches in linux-next should be merged first to avoid introducing warnings in an allmodconfig build: 3cd890dbe2a4 ("media: dvb-frontends: fix i2c access helpers for KASAN") 16c3ada89cff ("media: r820t: fix r820t_write_reg for KASAN") Do we really need to backport this? I think we do: without this patch, enabling KASAN will lead to unavoidable kernel stack overflow in certain device drivers when built with gcc-7 or higher on linux-4.10+ or any version that contains a backport of commit c5caf21ab0cf8. Most people are probably still on older compilers, but it will get worse over time as they upgrade their distros. The warnings we get on kernels older than this should all be for code that uses dangerously large stack frames, though most of them do not cause an actual stack overflow by themselves.The asan-stack option was added in linux-4.0, and commit 3f181b4d8652 ("lib/Kconfig.debug: disable -Wframe-larger-than warnings with KASAN=y") effectively turned off the warning for allmodconfig kernels, so I would like to see this fix backported to any kernels later than 4.0. I have done dozens of fixes for individual functions with stack frames larger than 2048 bytes with asan-stack, and I plan to make sure that all those fixes make it into the stable kernels as well (most are already there). Part of the complication here is that asan-stack (from 4.0) was originally assumed to always require much larger stacks, but that turned out to be a combination of multiple gcc bugs that we have now worked around and fixed, but sanitize-address-use-after-scope (from v4.10) has a much higher inherent stack usage and also suffers from at least three other problems that we have analyzed but not yet fixed upstream, each of them makes the stack usage more severe than it should be. Link: http://lkml.kernel.org/r/20171221134744.2295529-1-arnd@arndb.de Signed-off-by: Arnd Bergmann Acked-by: Andrey Ryabinin Cc: Mauro Carvalho Chehab Cc: Andrey Ryabinin Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Andrey Konovalov Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [arnd: rebase to v4.4; only re-enable warning] Signed-off-by: Arnd Bergmann --- lib/Kconfig.debug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.9.0 diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index b53b375e14bd..f0602beeba26 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -197,7 +197,7 @@ config ENABLE_MUST_CHECK config FRAME_WARN int "Warn for stack frames larger than (needs gcc 4.4)" range 0 8192 - default 0 if KASAN + default 2048 if GCC_PLUGIN_LATENT_ENTROPY default 1024 if !64BIT default 2048 if 64BIT help