From patchwork Wed Aug 10 21:54:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101956 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp609810qga; Wed, 10 Aug 2016 14:57:29 -0700 (PDT) X-Received: by 10.66.142.105 with SMTP id rv9mr10849544pab.33.1470866248944; Wed, 10 Aug 2016 14:57:28 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g63si50421756pfg.227.2016.08.10.14.57.28; Wed, 10 Aug 2016 14:57:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; 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 S932675AbcHJV50 (ORCPT + 27 others); Wed, 10 Aug 2016 17:57:26 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:58326 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932179AbcHJV5Y (ORCPT ); Wed, 10 Aug 2016 17:57:24 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue005) with ESMTPA (Nemesis) id 0M1kNy-1bDBw63AiI-00tjaF; Wed, 10 Aug 2016 23:55:24 +0200 From: Arnd Bergmann To: x86@kernel.org Cc: Arnd Bergmann , Masahiro Yamada , Andrew Morton , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Josh Triplett , linux-kernel@vger.kernel.org Subject: [PATCH 1/9] kconfig: tinyconfig: provide whole choice blocks to avoid warnings Date: Wed, 10 Aug 2016 23:54:07 +0200 Message-Id: <20160810215424.1926658-2-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160810215424.1926658-1-arnd@arndb.de> References: <20160810215424.1926658-1-arnd@arndb.de> X-Provags-ID: V03:K0:8Spd8dYz/ICS6bziN60suyKMT7a2CpV+f6h6cEw7NYL49TD/7fL UXkIKcwmUaDVC3Twv51gH87u4ACnuQlr7WVkT/tbXnvTpn3FZsH5sH2cSb9JOYSY+vCBLtN 95ampd5GdFDCHewjMFAepBtAeVRB3brtlq8hRCsLz0MPZguWz4tskqJYErCzPivdDboHPyv CQqmntSqYeC4Y6jFGj+gw== X-UI-Out-Filterresults: notjunk:1; V01:K0:0kX33EVh38A=:2LOkMCqCRpIB2btl6aRi2B 19mX7dqvlJvw68wsmuflDz41sOkEzAkWynmfWzZOHw7PrNH+eHBFGVWr5qw+5JjkZu3qWGjiN CUYidbQ/3XAWDzv7EdpFCB80SKaHt7Rshr0omKke9L/Aqoee1bDxY+ypWt87dlFBF+Zw6A3DQ /QYs8awseMkcOLOvuL9YZdw1PhZ66zo2SWowZANJ5v/ZIYAaQbrOmcnj6q7m0Qz64xGcG8srd gXOeUyEuMlI8/nsWBL3oY2qtyy6QcOqHi7SjdmGt+XtW9aK4cDdRFLYd7UZuOdyHWG2VQ16ol CGSHOIcvDgpYNOKRzRjoBEV9NngIHemkA41okF3RV+7Psu2WxX/lvTUQjRWYwfdUoIK3H9EXk 0Hvwn99d8U5y1A2R6NMp1mV4z9FHW5UG0oKApBXsID4PZ4QccMzai613WNepJwwmltnSrhTK+ keer4Gwf+W7NfpO3sb6pFHuQjGKxKYNc+RuNX6Q5UplSs92ajm1GBdH8rlCKHpkcSXauPwxwN RuSrY8c3H+TkKnu7PhQYH82z14Us1WTUNFsmeO6ApCtYZe66n5pBHK3+kWxoXleeSff5Y1twN eNWO6fCExBtp5j4imVjmH+e3u8Tu7AuwF8RTVYJEj2QCorsje2xoxoyozfpSmQGRKvcqkoNyK 7Rj+HqKBd6GxtTz/WAPDbp1AQW2TsSxYcIG9aXTY5AQdADWMP7UqXS0EF8w/4ObfFsjM= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Using "make tinyconfig" produces a couple of annoying warnings that show up for build test machines all the time: .config:966:warning: override: NOHIGHMEM changes choice state .config:965:warning: override: SLOB changes choice state .config:963:warning: override: KERNEL_XZ changes choice state .config:962:warning: override: CC_OPTIMIZE_FOR_SIZE changes choice state .config:933:warning: override: SLOB changes choice state .config:930:warning: override: CC_OPTIMIZE_FOR_SIZE changes choice state .config:870:warning: override: SLOB changes choice state .config:868:warning: override: KERNEL_XZ changes choice state .config:867:warning: override: CC_OPTIMIZE_FOR_SIZE changes choice state I've made a previous attempt at fixing them and we discussed a number of alternatives. I tried changing the Makefile to use "merge_config.sh -n $(fragment-list)" but couldn't get that to work properly. This is yet another approach, based on the observation that we do want to see a warning for conflicting 'choice' options, and that we can simply make them non-conflicting by listing all other options as disabled. This is a trivial patch that we can apply independent of plans for other changes. Signed-off-by: Arnd Bergmann Link: https://storage.kernelci.org/mainline/v4.7-rc6/x86-tinyconfig/build.log https://patchwork.kernel.org/patch/9212749/ Reviewed-by: Josh Triplett Cc: Masahiro Yamada Cc: Andrew Morton --- This version incorporates feedback from Masahiro Yamada, and includes the x86 change that Josh mentioned Unlike the other patches in this series, this is not a recent regression, but it is the only non-regression warning fix I'm aware of that we currently need for a clean build on all configurations tested by https://kernelci.org/. --- arch/x86/configs/tiny.config | 2 ++ kernel/configs/tiny.config | 8 ++++++++ 2 files changed, 10 insertions(+) -- 2.9.0 diff --git a/arch/x86/configs/tiny.config b/arch/x86/configs/tiny.config index 4e2ecfa23c15..4b429df40d7a 100644 --- a/arch/x86/configs/tiny.config +++ b/arch/x86/configs/tiny.config @@ -1 +1,3 @@ CONFIG_NOHIGHMEM=y +# CONFIG_HIGHMEM4G is not set +# CONFIG_HIGHMEM64G is not set diff --git a/kernel/configs/tiny.config b/kernel/configs/tiny.config index c2de56ab0fce..7fa0c4ae6394 100644 --- a/kernel/configs/tiny.config +++ b/kernel/configs/tiny.config @@ -1,4 +1,12 @@ +# CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE is not set CONFIG_CC_OPTIMIZE_FOR_SIZE=y +# CONFIG_KERNEL_GZIP is not set +# CONFIG_KERNEL_BZIP2 is not set +# CONFIG_KERNEL_LZMA is not set CONFIG_KERNEL_XZ=y +# CONFIG_KERNEL_LZO is not set +# CONFIG_KERNEL_LZ4 is not set CONFIG_OPTIMIZE_INLINING=y +# CONFIG_SLAB is not set +# CONFIG_SLUB is not set CONFIG_SLOB=y From patchwork Wed Aug 10 21:54:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101960 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp609501qga; Wed, 10 Aug 2016 14:56:25 -0700 (PDT) X-Received: by 10.66.82.42 with SMTP id f10mr11036627pay.17.1470866184938; Wed, 10 Aug 2016 14:56:24 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g63si50414704pfb.36.2016.08.10.14.56.24; Wed, 10 Aug 2016 14:56:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; 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 S932378AbcHJV4K (ORCPT + 27 others); Wed, 10 Aug 2016 17:56:10 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:55518 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750998AbcHJV4I (ORCPT ); Wed, 10 Aug 2016 17:56:08 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue005) with ESMTPA (Nemesis) id 0MVqHM-1bif8k3E5Y-00X1pR; Wed, 10 Aug 2016 23:55:54 +0200 From: Arnd Bergmann To: Andrew Lunn , Vivien Didelot Cc: Arnd Bergmann , "David S. Miller" , Florian Fainelli , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/9] dsa: mv88e6xxx: hide unused functions Date: Wed, 10 Aug 2016 23:54:08 +0200 Message-Id: <20160810215424.1926658-3-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160810215424.1926658-1-arnd@arndb.de> References: <20160810215424.1926658-1-arnd@arndb.de> X-Provags-ID: V03:K0:+VmCZGBsfVQl0Pe9KckyKYMIbmzMkNXiwxiSvND+u/94kODGmsO Lbd1FPJElOtpm/lrOQL6w+c96edCWuAz8ju9g7NzMTXa6paH43vfJdH+bn81AjvpXtYXEuV vgmKxkw9RNbnK3GzrRdNwPhEapSJDLlpWdHGjmjEV9+xAT0CG3Kt0f9IuePOujFSyoRZWJY V2+/4oSNowZ/WYdKmB3Aw== X-UI-Out-Filterresults: notjunk:1; V01:K0:Y3ClISNq2Xs=:h4fmFQUB4/L6maTyiNB0+k M/u2qEw9aHUkr/PuMzzOyXFuiIvU70YcMdDAoHdTMKMiVMABxravlHaEXEQ+ZPf5rY9ZX1spK r9hhodMDWUPRTWmpZAYIb6fwMQIUR/SAzbPBYefPBA13O4soL1nghwYEcYM4xsv4ZlCXL9sgz XufC33rk0fODB6paYXJObddXRxAw5YiEmohKOGX6zxiYQ5B+6LNCaMbyGBqmG+2weXQzC3ydr HDFmgqDFDjLzjaYrnDF8zIQgiAZyKz3v1rYTdcjrBWRRQcqcmNrTbwTfQBWGDKpMqMdAznUPf o3B73esW8XjYybndQQboOKCcYw3MmWETG6qdr1C26Wu6on2dV1ABLQfJLB7ShMnGVNQsa2UVM RgQ1sRANU0jN63bLCyDFX35WEHndKrIYYClfgtyld2oZ9HTbKNp1ZdKrN5SUvflikzqk6vZeG 9KKbYdcXuETCa73y9AMpSiOzbDiQ9uKydn1BgdFFpxhmDLSyRLLOAfvJApCHBzosxw8YRk7Sn dySKDP9e5iJ9LGtg1799ldzPh3FgUsxI7J/akDvm+ByQqYTjisW5o6VixDmSgf+37Lel1FEf4 tL2uszHx7UEucn/UZ3x3IR2/sMs152BfSKzilL8NtLAjppoZm3xsxFnu6fjuk/uZRYhP1W5VN bJxjhZGz/8M1tPWyR92vFdCGJlpmCfKaqZoFXG/fQTr3cVsYQ1lcJJNWleJs3GAyPyUE= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When CONFIG_NET_DSA_HWMON is disabled, we get warnings about two unused functions whose only callers are all inside of an #ifdef: drivers/net/dsa/mv88e6xxx.c:3257:12: 'mv88e6xxx_mdio_page_write' defined but not used [-Werror=unused-function] drivers/net/dsa/mv88e6xxx.c:3244:12: 'mv88e6xxx_mdio_page_read' defined but not used [-Werror=unused-function] This adds another ifdef around the function definitions. The warnings appeared after the functions were marked 'static', but the problem was already there before that. Signed-off-by: Arnd Bergmann Fixes: 57d3231057e9 ("net: dsa: mv88e6xxx: fix style issues") Reviewed-by: Vivien Didelot --- When I first submitted it on June 23, there was a clash with some other patches, this version is based on top of current mainline, which contains those patches already, so it should apply cleanly. --- drivers/net/dsa/mv88e6xxx/chip.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.9.0 diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index d36aedde8cb9..d1d9d3cf9139 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -3187,6 +3187,7 @@ static int mv88e6xxx_set_addr(struct dsa_switch *ds, u8 *addr) return err; } +#ifdef CONFIG_NET_DSA_HWMON static int mv88e6xxx_mdio_page_read(struct dsa_switch *ds, int port, int page, int reg) { @@ -3212,6 +3213,7 @@ static int mv88e6xxx_mdio_page_write(struct dsa_switch *ds, int port, int page, return ret; } +#endif static int mv88e6xxx_port_to_mdio_addr(struct mv88e6xxx_chip *chip, int port) { From patchwork Wed Aug 10 21:54:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101955 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp610047qga; Wed, 10 Aug 2016 14:58:18 -0700 (PDT) X-Received: by 10.98.101.1 with SMTP id z1mr10900721pfb.53.1470866298592; Wed, 10 Aug 2016 14:58:18 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ba3si50443966pab.87.2016.08.10.14.58.18; Wed, 10 Aug 2016 14:58:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; 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 S933051AbcHJV56 (ORCPT + 27 others); Wed, 10 Aug 2016 17:57:58 -0400 Received: from mout.kundenserver.de ([212.227.126.135]:50438 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932179AbcHJV5z (ORCPT ); Wed, 10 Aug 2016 17:57:55 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue005) with ESMTPA (Nemesis) id 0MDkte-1bRY2G07Cw-00H96d; Wed, 10 Aug 2016 23:57:38 +0200 From: Arnd Bergmann To: Daniel Lezcano , Thomas Gleixner Cc: Arnd Bergmann , Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, linux-kernel@vger.kernel.org Subject: [PATCH 6/9] clocksource: kona: fix get_counter error handling Date: Wed, 10 Aug 2016 23:54:12 +0200 Message-Id: <20160810215424.1926658-7-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160810215424.1926658-1-arnd@arndb.de> References: <20160810215424.1926658-1-arnd@arndb.de> X-Provags-ID: V03:K0:YSYbOIqA4zASuo1U6oc7BNu/iItSNiQDl55gCC3vymsb8j/nOUX J55EHFahO7FpjtX229WWr9tnHeB06rhD+EjatyVB2daSsLpB+wGAnHZfRLUlug+FBBx4qfD cEsGtHvX+kBcqU0kmPbi7km7Sva43441LQk5AWgX9D5AWm3peI4kIez1WfKlrpDniXjvKYP fibnek65m+xffJHbiho0g== X-UI-Out-Filterresults: notjunk:1; V01:K0:Es1kl2Wf3JA=:Lr+IEHeK1dwVOBnyy0XUMp ctrTV9eWCDfSPQmFX/TkSjgKW3xJKInbRZE/X7FoDbg/o0H59xLExTv4INZY2PhDMEnmijVve e4rCOUP7fpaCHRp5xkC2JCXiMnW29MEAM/IeAHi9XREaa5iMC4isFVcOESIAcdW9cAAF7OUsl 54AAdtd+jawbsOmjBVm2dG9o41BkQfPR19oj07aUcEi4Fid9+5bCMuMornPpMiURO+prnOIAg jAHjJEhGfpVE41NyrGwzuz69mZamvEANra2CyNkIyd7KQoP0c4VsK5aD2H6OVLHUkzVPqlKw+ mAC2dadCg/oVpvlYzuNf9Hg05WRRZbDvpJXrOvD1CAw3flGGObyL891D8l2xl8Zf9eKP3Yr18 YKfi8xGEm2hTHwh9IcEU5OAi3TCKiHR+aYtM9yBaGffbNzt205fvsxKKcj/90CUn+dFq2sDRf SAQtZm3DJFS28+8V1+FcBS7u8o32rcLYMyaWLSiBdjan3w6ncpn/X8bzKZV/pnk61yGoIAmUb yT5MiesWCpNH1AjPIe2YN613w2+D14SK8N/KTBRx2BFF8RtpU5ewY0li3pVDTnLHII8u573QE /frni6ZuudHKY8+v8lEtQIglCrN+6hXaksGzGucwqlWqyg7Tw60LxWZ2JC9yDSAioVpvvkCgx KISxKZisJgrw+SDSO6F48hBx9Jggx8CXO0G5hLxQiX1gWeT1M2HWOFhdUj9uzaq3W79s= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I could not figure out why, but gcc cannot prove that the kona_timer_init function always initializes its two outputs, and we get a warning for the use of the 'lsw' variable later, which is obviously correct. drivers/clocksource/bcm_kona_timer.c: In function 'kona_timer_init': drivers/clocksource/bcm_kona_timer.c:119:13: error: 'lsw' may be used uninitialized in this function [-Werror=maybe-uninitialized] Slightly reordering the loop makes the warning disappear, after it becomes more obvious to the compiler that the loop is always entered on the first iteration. As pointed out by Ray Jui, there is a related problem in the way we deal with the loop running into the limit, as we just keep going there with an invalid counter data, so instead we now propagate a -ETIMEDOUT result to the caller. Signed-off-by: Arnd Bergmann Link: https://patchwork.kernel.org/patch/9174261/ --- Originally sent this as a warning fix only on June 13, this version actually fixes the incorrect data problem. --- drivers/clocksource/bcm_kona_timer.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) -- 2.9.0 diff --git a/drivers/clocksource/bcm_kona_timer.c b/drivers/clocksource/bcm_kona_timer.c index 7e3fd375a627..92f6e4deee74 100644 --- a/drivers/clocksource/bcm_kona_timer.c +++ b/drivers/clocksource/bcm_kona_timer.c @@ -66,10 +66,10 @@ static void kona_timer_disable_and_clear(void __iomem *base) } -static void +static int kona_timer_get_counter(void __iomem *timer_base, uint32_t *msw, uint32_t *lsw) { - int loop_limit = 4; + int loop_limit = 3; /* * Read 64-bit free running counter @@ -83,18 +83,19 @@ kona_timer_get_counter(void __iomem *timer_base, uint32_t *msw, uint32_t *lsw) * if new hi-word is equal to previously read hi-word then stop. */ - while (--loop_limit) { + do { *msw = readl(timer_base + KONA_GPTIMER_STCHI_OFFSET); *lsw = readl(timer_base + KONA_GPTIMER_STCLO_OFFSET); if (*msw == readl(timer_base + KONA_GPTIMER_STCHI_OFFSET)) break; - } + } while (--loop_limit); if (!loop_limit) { pr_err("bcm_kona_timer: getting counter failed.\n"); pr_err(" Timer will be impacted\n"); + return -ETIMEDOUT; } - return; + return 0; } static int kona_timer_set_next_event(unsigned long clc, @@ -112,8 +113,11 @@ static int kona_timer_set_next_event(unsigned long clc, uint32_t lsw, msw; uint32_t reg; + int ret; - kona_timer_get_counter(timers.tmr_regs, &msw, &lsw); + ret = kona_timer_get_counter(timers.tmr_regs, &msw, &lsw); + if (ret) + return ret; /* Load the "next" event tick value */ writel(lsw + clc, timers.tmr_regs + KONA_GPTIMER_STCM0_OFFSET); From patchwork Wed Aug 10 21:54:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101952 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp610427qga; Wed, 10 Aug 2016 14:59:46 -0700 (PDT) X-Received: by 10.66.233.38 with SMTP id tt6mr10871435pac.99.1470866386894; Wed, 10 Aug 2016 14:59:46 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m63si50433336pfb.137.2016.08.10.14.59.46; Wed, 10 Aug 2016 14:59:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; 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 S933939AbcHJV73 (ORCPT + 27 others); Wed, 10 Aug 2016 17:59:29 -0400 Received: from mout.kundenserver.de ([212.227.126.135]:52072 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752560AbcHJV70 (ORCPT ); Wed, 10 Aug 2016 17:59:26 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue005) with ESMTPA (Nemesis) id 0MNQCL-1bZYO60fUn-0070U4; Wed, 10 Aug 2016 23:58:07 +0200 From: Arnd Bergmann To: Greg Kroah-Hartman Cc: Arnd Bergmann , Jiri Slaby , "Ji-Ze Hong (Peter Hong)" , Peter Hurley , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 7/9] 8250/fintek: rename IRQ_MODE macro Date: Wed, 10 Aug 2016 23:54:13 +0200 Message-Id: <20160810215424.1926658-8-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160810215424.1926658-1-arnd@arndb.de> References: <20160810215424.1926658-1-arnd@arndb.de> X-Provags-ID: V03:K0:U5gKTrumESozNJchQNyR02gcpkJvOma/Q2eUIQGJOrrDQB+UNQU 1M1V9AjDyVt/fcv1fF06nkTU4ud4YjWt6QCsthCbDiU2iN+741SFknkC43QlnKKM4j0Anxr pX1NlGAmegBY7wJN1EXj9CHgus0LAYxKHHBXSJ09g7YRbLxwivIU1qCNm3vK+pIZcMrIwh0 jetkP+YeyPUUv1LqPRNqg== X-UI-Out-Filterresults: notjunk:1; V01:K0:3p+9jTNkgP4=:j6ChS/Fv4GS1RGNRFkcFXI Tl4dZwbRDXJ1aTIkcJH7KqVJa4zB2YAJGQAydbJ6JY1T2+y98DfXitfB6TBhdztZpaMalQ4JR A/B+mxCmwSW84obf/1TdFdp5E9F3X1q64otNl5PR8XsCUyO24g0N8+ut5Fy2BM6rV7/fbojpK /ygyn/fiGeJNQL7uQAQfR1eXDCn7OsVfwpsD/FeYLs5bwo4Bc2OhgxuKgmv4ScGkRwcJDU9mj VTpZ/VtmVESyhgrgeScZrTsB9OSTT9M2MFfHH8nLfY/SzMizQExFQPN2yGahGWGYnpawEmLGo W9cO7n9B731lfkcmeu+f/4DEckfgZzyjJnoSBv7FWVpXnHblzAjzJrdshrgqSmCe3b8miWrfc 8NM+VrXUoHHpe/JbyER5Px9GLaUT1sLEd4H5hMpJQ5An0g3t+VFGqGRErm5j4AAohXsY4eqhN sY5wGvbaiMFCSLcSltP4svIXAyoVq1SkD3G3yr2NDoUImzbQLfLRtg+LFE0sAnl4ezIMoBWP1 k6LMPjP7KHs2H4x6IIHma29QSb4PG8koqvHwU7Bsqvsaornr6MG/+J8tUkEK3rQz/h2uW5Bk/ N/V8LTdXnpdwCqnADq5Zyhv/gjkx9Q0WCTW/YINOBT1k39sR2dcoF7IuSqlR6Ce2cfvwp37Cr B59Qz3H6WZd8fsqBcYwRYQIjnRszqQJaiNIXaxI+wY96Gn3ZlYisNX+Ln3orvceQ9VlA= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A bugfix for the fintek driver required defining some macros, but one of them clashes with a system header on ARM: drivers/tty/serial/8250/8250_fintek.c:34:0: error: "IRQ_MODE" redefined [-Werror] #define IRQ_MODE 0x70 In file included from /git/arm-soc/arch/arm/include/asm/ptrace.h:13:0, from /git/arm-soc/arch/arm/include/asm/irqflags.h:6, from /git/arm-soc/include/linux/irqflags.h:15, from /git/arm-soc/arch/arm/include/asm/bitops.h:27, from /git/arm-soc/include/linux/bitops.h:36, from /git/arm-soc/include/linux/kernel.h:10, from /git/arm-soc/include/linux/list.h:8, from /git/arm-soc/include/linux/module.h:9, from /git/arm-soc/drivers/tty/serial/8250/8250_fintek.c:11: arch/arm/include/uapi/asm/ptrace.h:55:0: note: this is the location of the previous definition This renames the newly introduced 'IRQ_MODE' macro to FINTEK_IRQ_MODE. Signed-off-by: Arnd Bergmann Fixes: 4da22f1418cb ("serial: 8250_fintek: fix the mismatched IRQ mode") Link: https://patchwork.kernel.org/patch/9200119/ Acked-by: Ji-Ze Hong (Peter Hong) Acked-by: Ricardo Ribalda Delgado --- Originally sent on June 27 when the warning appeared, but for some reason the fix never got picked up. --- drivers/tty/serial/8250/8250_fintek.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.9.0 diff --git a/drivers/tty/serial/8250/8250_fintek.c b/drivers/tty/serial/8250/8250_fintek.c index 737b4b3957b0..0facc789fe7d 100644 --- a/drivers/tty/serial/8250/8250_fintek.c +++ b/drivers/tty/serial/8250/8250_fintek.c @@ -31,7 +31,7 @@ #define IO_ADDR2 0x60 #define LDN 0x7 -#define IRQ_MODE 0x70 +#define FINTEK_IRQ_MODE 0x70 #define IRQ_SHARE BIT(4) #define IRQ_MODE_MASK (BIT(6) | BIT(5)) #define IRQ_LEVEL_LOW 0 @@ -195,7 +195,7 @@ static int fintek_8250_set_irq_mode(struct fintek_8250 *pdata, bool level_mode) outb(LDN, pdata->base_port + ADDR_PORT); outb(pdata->index, pdata->base_port + DATA_PORT); - outb(IRQ_MODE, pdata->base_port + ADDR_PORT); + outb(FINTEK_IRQ_MODE, pdata->base_port + ADDR_PORT); tmp = inb(pdata->base_port + DATA_PORT); tmp &= ~IRQ_MODE_MASK; From patchwork Wed Aug 10 21:54:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101954 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp610170qga; Wed, 10 Aug 2016 14:58:48 -0700 (PDT) X-Received: by 10.66.248.10 with SMTP id yi10mr10947279pac.31.1470866328781; Wed, 10 Aug 2016 14:58:48 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l78si50382524pfj.253.2016.08.10.14.58.47; Wed, 10 Aug 2016 14:58:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; 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 S933357AbcHJV6o (ORCPT + 27 others); Wed, 10 Aug 2016 17:58:44 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:60754 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752652AbcHJV6d (ORCPT ); Wed, 10 Aug 2016 17:58:33 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue005) with ESMTPA (Nemesis) id 0MAywa-1bPsIB3bi0-009y6H; Wed, 10 Aug 2016 23:58:27 +0200 From: Arnd Bergmann To: George Spelvin Cc: Geert Uytterhoeven , Arnd Bergmann , linux-kernel@vger.kernel.org Subject: [PATCH 8/9] test/hash: Fix warning in two-dimensional array init Date: Wed, 10 Aug 2016 23:54:14 +0200 Message-Id: <20160810215424.1926658-9-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160810215424.1926658-1-arnd@arndb.de> References: <20160810215424.1926658-1-arnd@arndb.de> X-Provags-ID: V03:K0:r8EUbc50VNReQf0YL6w+NF3QWeFl3rHfAzJKCR0ti1tkW+Pgy9a PDgzo/49tgqCRNsFQajprGPlZZ/zirlIT8Qh1XfwRR3l7C44X7oz6O73LD7257ksjav4eHb 59wrQcfIHXOrqP8iqIoTyZ6iGF1eswcAPz68xbidzwFEqf0OHjTI9/BfGXCII0HJaFEuUg5 aZoPUIqQjE15mrdV9/Pcg== X-UI-Out-Filterresults: notjunk:1; V01:K0:bX15BtSuEzo=:egOeX51A1DUorNCHpAngTX eMlYtQ5D+IhPIt1x/xApCvWguBnk63mz6P44exxQCFWcXvPSxsPY7mmBkyPD23Bnp7GX0o09L Y95EM0Q0I8Amdt49WAR6SvB9OCTjFW6ZaVs6f5H2E0v1MqS1kz/9ukWsoLcvrqZidCCMaO8Ad ReyrmSq00tx0E/8bMZPtKL9UyHQ3+lCBJNbq3slITXRm3iq23v8D7lMvPmqDEsiod3apD+Ohw G2N14E6rATeDAv+zNf38RvgAZoDd4k/ob0BtuYc/HurtkISTvQs9bWdjo1XNHB5TRiljt8X5k RvwbTPOUbXlZhU6ICtxi/xdGUb3F3CU4wTQGzeddIh8ucWwY89kS4hr0Vu0YP6usRY6iHuNEP ygDd2pXZrXcP7j7mlczQZH69C2WCeazsr2XILgIMR8Wqkc3kgGD78qUJ0iVdCUvKMQI0qO0f9 CencL4uIKKWaueRhCrLs+o/nRu2GNpiF+xUlVjzLIUYyE51E/tsBpoFoeS9FKZufE5MzJHFlL ok+GK0iMEEPa99BJsZk9lT+vt7Lj57qdu7maKJU6L99plQZ0zrm7WIWIUvRXSkjOumTfYhFsm xYLQCp2mrCOfAhs2pBLw5QMY/1MA6DXQ+SohWINhtgBsGtv62QTsvT8IWVNLK4pVZRQrXuZvs ifoiHEcOULMDHRFwU3v3BVPI60W0jWHa1yNndPBtAYAhROyYfNcONakECRVBCC2t4LjI= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Geert Uytterhoeven lib/test_hash.c: In function 'test_hash_init': lib/test_hash.c:146:2: warning: missing braces around initializer [-Wmissing-braces] Fixes: 468a9428521e7d00 (": Add support for architecture-specific functions") Signed-off-by: Geert Uytterhoeven Acked-by: George Spelvin Signed-off-by: Arnd Bergmann --- lib/test_hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.9.0 diff --git a/lib/test_hash.c b/lib/test_hash.c index 66c5fc8351e8..81702ee4c41c 100644 --- a/lib/test_hash.c +++ b/lib/test_hash.c @@ -143,7 +143,7 @@ static int __init test_hash_init(void) { char buf[SIZE+1]; - u32 string_or = 0, hash_or[2][33] = { 0 }; + u32 string_or = 0, hash_or[2][33] = { { 0, } }; unsigned tests = 0; unsigned long long h64 = 0; int i, j; From patchwork Wed Aug 10 21:54:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101953 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp610258qga; Wed, 10 Aug 2016 14:59:08 -0700 (PDT) X-Received: by 10.98.27.200 with SMTP id b191mr10981230pfb.111.1470866348220; Wed, 10 Aug 2016 14:59:08 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ul9si50471292pab.14.2016.08.10.14.59.07; Wed, 10 Aug 2016 14:59:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; 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 S933535AbcHJV6x (ORCPT + 27 others); Wed, 10 Aug 2016 17:58:53 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:57906 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933372AbcHJV6v (ORCPT ); Wed, 10 Aug 2016 17:58:51 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue005) with ESMTPA (Nemesis) id 0MXkkl-1bl8CW0JoF-00Wk3C; Wed, 10 Aug 2016 23:58:47 +0200 From: Arnd Bergmann To: George Spelvin Cc: Arnd Bergmann , Geert Uytterhoeven , linux-kernel@vger.kernel.org Subject: [PATCH 9/9] test/hash: Fix warning in preprocessor symbol evaluation Date: Wed, 10 Aug 2016 23:54:15 +0200 Message-Id: <20160810215424.1926658-10-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160810215424.1926658-1-arnd@arndb.de> References: <20160810215424.1926658-1-arnd@arndb.de> X-Provags-ID: V03:K0:pBgxRtg4svRZLhpgdzN6sEtwNAGg2i9Z2R8at2kMolMVNdY2/dj MG7L4I45twGiD0SRWiaKIEXMy7XmvMxBP1kkjQWR+OOmiZ6AYUn+QkCPqUZP1zqMHCMHMrp dSXAfeIjrI9jvcK1HXmcKyH8f7deBFLFEt+PmarOnjUwgC7fkDPZaONMdb0iZcOgFLbhSF7 AzgiKup6L90Ibt29AMCWg== X-UI-Out-Filterresults: notjunk:1; V01:K0:iaYnrGcx1QQ=:FwpgBRPB4uNFfh+4fVNWnE SjoOCQfj2ah9mIah3T1un9XF2WRv9EWVw3zlqNDAEnlhmujoAH0vfnSybJim/wSXN2fv9FLqv j+G5kheXeQ7sXDbQmxnRZWfJF2e3NYQZ94iMev1svl4j2hJcG12y8Q/cLaf6Xmb6S7s03+zea fXptjXdfQtDD2QtzyG1Rmp/wbSzRwC8uz3rBB+obmxLY/7fnHMEO8DHBXhVrDYi1suK6b5RtW JY4I3qhWEXRSmfBgIHzFCbj05YXK2K/lSWNo00JSvsIpAJuITIwSl5pvn5o72RyDg9t0owTk7 acg/0XWtouww4ygiAew2iGPkCfuf3xqkmd89PTabFc5K2E9cUKKc1rAV+EBBbXSTKmJrk1WpI b9g6bB7HZRiglgcgJLEI0+5QVqKSPuwxJsK2XYD/ZNQi6EOKYXADftQd2XPdPLlpzLLPUjaSf T9EG538ohYCrmdic8lZ6DUkjTaXjz8fJ4WiMI2WkciE56uCahDpP8YJzDmWnJ7Y9kPl9291a3 S2Usdli5VB54WJZX4Yfwl5tcmHUBEeZqOG8TRyeSN3Tty5Mu7kzxcjbCuC3BdTxKwMjXCu3ke y8ZvrlV8KWRxUKn6olpwcSMJrVx87OaaYVxfqBVHcElhSPNKMtAHIhNyK/jiGHv0Ad89WCYi3 zfswOJnKom7c1RjtU3DUWIgaus08ODFpJZrhXmpiNkaTy8TN5/mEKuaDzLqNFiSGC1sQ= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: George Spelvin Geert Uytterhoeven wrote: > Some versions of gcc don't like tests for the value of an undefined > preprocessor symbol, even in the #else branch of an #ifndef: Damn, I had hoped that would work universally; I tried to avoid the uglier #if-inside-#ifdef construction. GCC 6 is quite happy wth it. But no objections. If you want: Acked-by: George Spelvin But here's an alternative. Geert, what do you think of this? Acked-by: George Spelvin Signed-off-by: Arnd Bergmann --- lib/test_hash.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.9.0 diff --git a/lib/test_hash.c b/lib/test_hash.c index 81702ee4c41c..ddd819fec343 100644 --- a/lib/test_hash.c +++ b/lib/test_hash.c @@ -221,17 +221,17 @@ test_hash_init(void) /* Issue notices about skipped tests. */ #ifndef HAVE_ARCH__HASH_32 pr_info("__hash_32() has no arch implementation to test."); -#elif HAVE_ARCH__HASH_32 != 1 +#elif HAVE_ARCH__HASH_32 + 0 != 1 pr_info("__hash_32() is arch-specific; not compared to generic."); #endif #ifndef HAVE_ARCH_HASH_32 pr_info("hash_32() has no arch implementation to test."); -#elif HAVE_ARCH_HASH_32 != 1 +#elif HAVE_ARCH_HASH_32 + 0 != 1 pr_info("hash_32() is arch-specific; not compared to generic."); #endif #ifndef HAVE_ARCH_HASH_64 pr_info("hash_64() has no arch implementation to test."); -#elif HAVE_ARCH_HASH_64 != 1 +#elif HAVE_ARCH_HASH_64 + 0 != 1 pr_info("hash_64() is arch-specific; not compared to generic."); #endif