From patchwork Mon Jan 25 21:54:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101096 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp1613346lbb; Mon, 25 Jan 2016 13:56:04 -0800 (PST) X-Received: by 10.98.32.156 with SMTP id m28mr29143652pfj.74.1453758964041; Mon, 25 Jan 2016 13:56:04 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p13si36279727pfi.234.2016.01.25.13.56.03; Mon, 25 Jan 2016 13:56:04 -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 S932268AbcAYV4B (ORCPT + 30 others); Mon, 25 Jan 2016 16:56:01 -0500 Received: from mout.kundenserver.de ([212.227.126.131]:54468 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751791AbcAYVz7 (ORCPT ); Mon, 25 Jan 2016 16:55:59 -0500 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue002) with ESMTPA (Nemesis) id 0MPMdk-1aSCpJ0soS-004Qbd; Mon, 25 Jan 2016 22:55:25 +0100 From: Arnd Bergmann To: Greg Kroah-Hartman Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , Jiri Slaby , linux-kernel@vger.kernel.org Subject: [PATCH 1/3] tty: nozomi: avoid a harmless gcc warning Date: Mon, 25 Jan 2016 22:54:56 +0100 Message-Id: <1453758918-3577213-1-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 X-Provags-ID: V03:K0:5cP7czYoqvYQZpPOMQ9a3PJJTHnBIZl9fZtAQiTuggCVd+G9M3T DOabUqJj9rVr+P5lSmC2gEO3582sgDHKQxV5f9TCf1uVdDvucsBLPaZQi40iwIGVm8zKBys Nybyi8umnvjKJDKBqP541gUh7yafrFFToiA2eAzEl+tKyLxHhCbPbJYU7vw2D5kpx8HgeBh 0HuTPQyj1aep+VyRaT9Hg== X-UI-Out-Filterresults: notjunk:1; V01:K0:7OUAcugPEgU=:kfrE32k+6PWwT9xilFzlZ1 Xats+KqGryH6ZkUgoSaO653y/PCswXoWGLnjU2zqBYw+od541Z+sC7Cq7YipIHOxOIFFXis/y KwDGHALbI6RC/SAURoCM/MP119pbEq1XjBxVLVQHvVSIdQIbGphSKTK64Ketv/HsY8NTKGsgP L1BhJtvIhRpbiyvnyfavBsynqZxMveuVw8IvIjaSlsvI+DEFgeBFiAcmsLsT00DCPvPkbyrSB u6huNWwrXBy0Qdq3RE9bXaxnd01zo4C7/ODFSjelaQg5bU1fnMq/9EFF+RU6O2e8q9Z5EzbvQ f3s31OP4coKKiRUNWG3A+zHnlolsjozDfQnUNI93LzY8U03WMMf1PuTvvJEW4O13vwJTvM5us w5RGozzWB+WqCJzG5AwdczCDbbid0P8skkMq+yda22RmybJ//L+1ck95QEpsFT1sMqDuOJQE2 iO7nb66ru/VTdFlNEcQduJKZwt7e/JfaDyzgEtaxfbnk8riLUkaTqT2D7S/ryDVS3hLtEmT3R B2CzB6LBtr00VVlmGyB5j0NoW3QvynzC79AS/ByE/72o91s+aFwZ+A/DMBRN1HNRTRHG765U1 8Xwq+Poi1E9gABNPfweKamEWmMCPhGzzvv/yTCR+Wnj4Jh6o/6eYeTqqzXGrfLT71FP2IBVu0 u4Apc/GWZwMdwWV7QQLGel996ystTRtfB+palT1ae/fsE7X8jJUi3qr2wQ0ClCFSjcLU= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The nozomi wireless data driver has its own helper function to transfer data from a FIFO, doing an extra byte swap on big-endian architectures, presumably to bring the data back into byte-serial order after readw() or readl() perform their implicit byteswap. This helper function is used in the receive_data() function to first read the length into a 32-bit variable, which causes a compile-time warning: drivers/tty/nozomi.c: In function 'receive_data': drivers/tty/nozomi.c:857:9: warning: 'size' may be used uninitialized in this function [-Wmaybe-uninitialized] The problem is that gcc is unsure whether the data was actually read or not. We know that it is at this point, so we can replace it with a single readl() to shut up that warning. I am leaving the byteswap in there, to preserve the existing behavior, even though this seems fishy: Reading the length of the data into a cpu-endian variable should normally not use a second byteswap on big-endian systems, unless the hardware is aware of the CPU endianess. There appears to be a lot more confusion about endianess in this driver, so it probably has not worked on big-endian systems in a long time, if ever, and I have no way to test it. It's well possible that this driver has not been used by anyone in a while, the last patch that looks like it was tested on the hardware is from 2008. Signed-off-by: Arnd Bergmann --- drivers/tty/nozomi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.0 diff --git a/drivers/tty/nozomi.c b/drivers/tty/nozomi.c index 80f9de907563..5cc80b80c82b 100644 --- a/drivers/tty/nozomi.c +++ b/drivers/tty/nozomi.c @@ -823,7 +823,7 @@ static int receive_data(enum port_type index, struct nozomi *dc) struct tty_struct *tty = tty_port_tty_get(&port->port); int i, ret; - read_mem32((u32 *) &size, addr, 4); + size = __le32_to_cpu(readl(addr)); /* DBG1( "%d bytes port: %d", size, index); */ if (tty && test_bit(TTY_THROTTLED, &tty->flags)) { From patchwork Mon Jan 25 21:54:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101095 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp1613390lbb; Mon, 25 Jan 2016 13:56:11 -0800 (PST) X-Received: by 10.98.86.67 with SMTP id k64mr29585733pfb.50.1453758971231; Mon, 25 Jan 2016 13:56:11 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 20si36260057pfr.82.2016.01.25.13.56.10; Mon, 25 Jan 2016 13:56:11 -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 S932350AbcAYV4H (ORCPT + 30 others); Mon, 25 Jan 2016 16:56:07 -0500 Received: from mout.kundenserver.de ([212.227.126.134]:63918 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932284AbcAYV4D (ORCPT ); Mon, 25 Jan 2016 16:56:03 -0500 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue002) with ESMTPA (Nemesis) id 0MR7U6-1aXH1Y1Svu-00UM71; Mon, 25 Jan 2016 22:55:30 +0100 From: Arnd Bergmann To: Greg Kroah-Hartman Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , Jiri Slaby , linux-kernel@vger.kernel.org Subject: [PATCH 2/3] tty: cyclades: cyz_interrupt is only used for PCI Date: Mon, 25 Jan 2016 22:54:57 +0100 Message-Id: <1453758918-3577213-2-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1453758918-3577213-1-git-send-email-arnd@arndb.de> References: <1453758918-3577213-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:2lcBxzXneGzi+mThiYcbMd//8jQPDBHNzER/tlPlEI+7LvWT+JT J/Xh0Mzg/1Ha3JXLMjqjte6MrS5gP4H4kjf/YGBE72uscGhr0gPeZKY9PTPktZpTSO2m+bX 8UX8L4SUkfbqRnhpexHLsV6fVfZnkF8mN2wfvme+uE/7GgkFGtr1rCeJQA0yjG6pRiCTbRi dy3RQOYiNok95Rw7eaM3w== X-UI-Out-Filterresults: notjunk:1; V01:K0:sgmQdjIALEU=:mE9erQkTcOIhmPDQ55R0v6 9TKkCBAslHIOmhZX1ARqkVA/TAysd3dOkk9zusO3Y4TZ6G8DjeeVRzsBJDc3N4zpQ5ExeGfBY 29RvBAxZJeQxVmcarXMKvy82TOnALNmo2Q7UUIamZ7ReVrIFscaZQ8EzfcT7n+OR1ID5vMJHJ pvG8YqTQ6tP5+ipR6bSb7d1N+HwTGIRESPbkdZ3j3yXW+pBYfEzl2lG0CKu4uCIL7ko82CY0p NJF34mjK0TTsMx+QjLhUAn1SGqZIKMBvib2OxDRhL37EP1alHSNzA4HCV4TX9Z93JB+vuyBj9 7ufsRse+tRa9vBvOoE4BQACfykxjq3GUhSssIdB4VnPDQ9C/9WB3vb4EixxefmRLr8sg3Cu5s UAWt/5Fn4MBdpOZFT0FMyP+oYH6uHvO3DB7ZsKJX/C/pe0WR0ODZKf/nMmzqWBQXPdqBqy/wn e8CsxOMgasJckXKZYpnSQ5yNG3N8WiSfNPA9TpVialjXKelwypf5UUH8vK9udG3nWIb6dET4o 1JNy/umPpeQmfYOaGj4sS4SpyrGPR5D9YZ2pRLTGPWSeb8i39HczHliI16X823jqZVcqhb9Pp 2Kw83dz2dCqb7bNSiBX1cwIE7BUxHz11Hk1fzJm7un8pMJCgp19U+mckdUdwPLXqx4KBpo7Ga laj1KtUmHsXcJCxVGMI/PaWCD2ydb5kiriayy7ucfdnJdComDlcKPJxn7b8WY3VINTi4= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When CONFIG_PCI is not set, enabling CONFIG_CYZ_INTR has no practical effect other than generating a warning about an unused function: drivers/tty/cyclades.c:1184:20: warning: 'cyz_interrupt' defined but not used [-Wunused-function] static irqreturn_t cyz_interrupt(int irq, void *dev_id) This adds a dependency to avoid that warning. Signed-off-by: Arnd Bergmann --- drivers/tty/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.0 diff --git a/drivers/tty/Kconfig b/drivers/tty/Kconfig index c01f45095877..82c4d2e45319 100644 --- a/drivers/tty/Kconfig +++ b/drivers/tty/Kconfig @@ -226,7 +226,7 @@ config CYCLADES config CYZ_INTR bool "Cyclades-Z interrupt mode operation" - depends on CYCLADES + depends on CYCLADES && PCI help The Cyclades-Z family of multiport cards allows 2 (two) driver op modes: polling and interrupt. In polling mode, the driver will check From patchwork Mon Jan 25 21:54:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101094 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp1613551lbb; Mon, 25 Jan 2016 13:56:38 -0800 (PST) X-Received: by 10.66.235.202 with SMTP id uo10mr28983165pac.63.1453758998312; Mon, 25 Jan 2016 13:56:38 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z88si36317761pfi.50.2016.01.25.13.56.38; Mon, 25 Jan 2016 13:56:38 -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 S932406AbcAYV4g (ORCPT + 30 others); Mon, 25 Jan 2016 16:56:36 -0500 Received: from mout.kundenserver.de ([212.227.126.187]:65411 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932084AbcAYV4f (ORCPT ); Mon, 25 Jan 2016 16:56:35 -0500 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue002) with ESMTPA (Nemesis) id 0MdCIE-1aewWY2mZO-00IE6R; Mon, 25 Jan 2016 22:55:52 +0100 From: Arnd Bergmann To: Greg Kroah-Hartman Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , Jiri Slaby , David Vrabel , Julien Grall , Stefano Stabellini , Wei Liu , Jan Beulich , Boris Ostrovsky , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] tty: hvc_xen: hide xen_console_remove when unused Date: Mon, 25 Jan 2016 22:54:58 +0100 Message-Id: <1453758918-3577213-3-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1453758918-3577213-1-git-send-email-arnd@arndb.de> References: <1453758918-3577213-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:bygCPuum5Z6lQZjwnrRAVuzZ9mmN+60A99Dsgi+k7J9oBm96aL+ IvO6Olf+CHsLf8Xo3UL3J13FTD8lmoUXARhgF/kNDkdUbDAvdNcnlU0rEIbxC27wCewvRBb Mx9VPDBYRox7qXlHoyNRnb4A6e2DXYdMPok0PqyseUEiGU/a29WVPKS+BnIGKbSycXAlrBH GGVLAelpQuU59HD7pW0kA== X-UI-Out-Filterresults: notjunk:1; V01:K0:xJ4EgY0F6U0=:2BSDvUch3ETtbnhwsGLV3S CZ2mbDnmhXdLSXLWwQtqtNu4YHiDBSp2KgYfWZ5DTk2fNRkfO9HI37DGcT5rj1hHULfpJF/Qy 0eZunsb3PIW9hezr9zogVxQgOffl3v003LqqATENJM9qn69eCLRCS/q6XbD1VU0su/GpJDWod GwTNhZC0mjHy7ddAs2yeIInhmrp4Bt/GLXpGL0GntgGVoyjt+Bu4w/uuoFsAyKesoqOn+LOzc HPdcv+B17CipCVOlk9SHGPvA4DvmyCBli5p4nkvQu+FGjxxyN9NfNmYAV/nNLayN9VHaSmJaH YXF/J8xAOptyNKifL4SliFv4ZF3+cPGszZCM7YW8XJCQ2O47P9ptuzpYqyW+PaR+Zq5u155r7 D0dqoJBDPh9VvDl/xOQIm7QuZwux395dQWA1j1m8rODmIqQEeZfV3lukg3E7af20p5cUGCv3h gvKhRRdpjin6FbqcVXtaDjIyoKOoHSr2c353yQ1rbQ+RJ5eNZ0mL9fGVtZi8HR9M/RmTZPciP YEvz84I4BFJwPu8bqiPhevGVzq2HErdz4WLxfPYbsxkXlohD5pkNNIGZr66Cdy37D/rM8izIR N+FWIjiOMuGRdpvHGuGV0XxQ1TU7EDtIPsDhV9DqrMxVpNrJ8yAR5WaIOJXPeK8pUTG1KY02g pz+Do6ADu6VvMi/KWLIGc2hllSSaBWOvlNMjdM25jm5hMCT/Dh9DITeTzpctX8VJOp68= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org xencons_disconnect_backend() is only called from xen_console_remove(), which is conditionally compiled, so we get a harmless warning when CONFIG_HVC_XEN_FRONTEND is unset: hvc/hvc_xen.c:350:12: error: 'xen_console_remove' defined but not used [-Werror=unused-function] This moves the function down into the same #ifdef section to silence the warning. Signed-off-by: Arnd Bergmann --- drivers/tty/hvc/hvc_xen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.0 diff --git a/drivers/tty/hvc/hvc_xen.c b/drivers/tty/hvc/hvc_xen.c index fa816b7193b6..11725422dacb 100644 --- a/drivers/tty/hvc/hvc_xen.c +++ b/drivers/tty/hvc/hvc_xen.c @@ -323,6 +323,7 @@ void xen_console_resume(void) } } +#ifdef CONFIG_HVC_XEN_FRONTEND static void xencons_disconnect_backend(struct xencons_info *info) { if (info->irq > 0) @@ -363,7 +364,6 @@ static int xen_console_remove(struct xencons_info *info) return 0; } -#ifdef CONFIG_HVC_XEN_FRONTEND static int xencons_remove(struct xenbus_device *dev) { return xen_console_remove(dev_get_drvdata(&dev->dev));