From patchwork Tue Nov 8 13:34:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9417425 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 019C160459 for ; Tue, 8 Nov 2016 13:37:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E4BD728C57 for ; Tue, 8 Nov 2016 13:37:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D6FA828CA1; Tue, 8 Nov 2016 13:37:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5CAAB28C57 for ; Tue, 8 Nov 2016 13:37:33 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c46YQ-0001ah-Fb; Tue, 08 Nov 2016 13:35:10 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c46YP-0001ZZ-IN for xen-devel@lists.xenproject.org; Tue, 08 Nov 2016 13:35:09 +0000 Received: from [193.109.254.147] by server-8.bemta-6.messagelabs.com id A7/D3-19686-C84D1285; Tue, 08 Nov 2016 13:35:08 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrDLMWRWlGSWpSXmKPExsVy5bGghG73FcU IgyUbVSy+b5nM5MDocfjDFZYAxijWzLyk/IoE1oye3RfYCrZyV6y4voq5gfE1ZxcjF4eQwApG iaWNnaxdjJwcbALKEq+PTgGzRQS0JJrnf2cEKWIW2M4ksX//LzaQhLCAtcSTYwvBbBYBVYl5M 7eB2bwCJhJ7jrxgArElBOQkGs7fZwZplhD4zChx9OwMVghnG5vE119dzBMYuRYwMqxiVC9OLS pLLdI110sqykzPKMlNzMzRNTQw08tNLS5OTE/NSUwq1kvOz93ECPQlAxDsYJx52f8QoyQHk5I o7/sCxQghvqT8lMqMxOKM+KLSnNTiQ4wyHBxKErwLLwPlBItS01Mr0jJzgEEFk5bg4FES4Y0D SfMWFyTmFmemQ6ROMSpKifNagyQEQBIZpXlwbbBAvsQoKyXMywh0iBBPQWpRbmYJqvwrRnEOR iVh3gqQKTyZeSVw018BLWYCWlwVowCyuCQRISXVwKjS82bPteaVjRzcvq9W1b2Zwiksf+fMBj 1xBz2vhJVe8oJcHGtlQqK2s0bxn+6NWsOeMWeD8Ocso1mTQ7QzMmXXbjx5c/m+w/5r2KJ/8ES X5B71D5r07OF5Hj6LxRt0Nx/yKJHa7u9q2Tn3qfS9qviG1dtXbiwv6T4q1r++80ru81/s0rXG okosxRmJhlrMRcWJALQ+8wdfAgAA X-Env-Sender: arnd@arndb.de X-Msg-Ref: server-6.tower-27.messagelabs.com!1478612106!70659712!1 X-Originating-IP: [212.227.17.24] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.0.13; banners=-,-,- X-VirusChecked: Checked Received: (qmail 62535 invoked from network); 8 Nov 2016 13:35:07 -0000 Received: from mout.kundenserver.de (HELO mout.kundenserver.de) (212.227.17.24) by server-6.tower-27.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 8 Nov 2016 13:35:07 -0000 Received: from wuerfel.lan. ([78.43.20.153]) by mrelayeu.kundenserver.de (mreue103) with ESMTPA (Nemesis) id 0Lzq1j-1cqagm2mLj-0153rS; Tue, 08 Nov 2016 14:34:55 +0100 From: Arnd Bergmann To: David Vrabel Date: Tue, 8 Nov 2016 14:34:34 +0100 Message-Id: <20161108133449.1649345-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:DeaWYpsne8qCGVpZMo6FVCcwnnMMHqIVROXHxUXH+eotNBvMZqe /cLShOTc5kpv0kTQmSE1p/mwUDhBI7FXsSlkr2Z2dcK/7m1A643DjtIup8vhbv5+Bc8hX/V Lo7TS/vull6Lu7LyXUU56/n132HX4VU60oJheRF36gIqI5F32sdQ4RnqwVF/gsyihgxHH6r 7uhqyX9YJjwxkfc6pB7YA== X-UI-Out-Filterresults: notjunk:1; V01:K0:IWToA1OPm+k=:EHklTcikne1cQBWCpSAVSq lFC768Bj5K9jd/9paaaOQigMqDwBOlDgYq3qc+UncGoPnKKNsbFGdIYR/qB4LHJDTjmEhg7Iw RvK/DsFfrLhEmWeZGM/DDQONFLzIFl1OMOke8BQ0Bm18RoaUHbXNBgYK+LIahDq5H/RFyTJYV VAAwqj0xCwQR9FZg8loXAzOwStjbw4TYmRBAo+HmjEoh1yTUt5rVIinA0zefs5Zzpzjk895IQ Z9dGjAJoF4W/R1kjtx30oVyvH4+9MUjZc24FqVQenJQDz7yhgKM1bmjxsD/PkcLY9tggTqJK9 phsAU6lGCVN0e2TdIh6PiCYgWES0uyThAGEA//o5YUh2ctparrrAonjMOTDHIb4ucCxFfpPL9 c8qJ5BwWb6PuQFeRqnkWHDZkaqnx1LEqfFmBkbLHmSlfo3iLWglwgVRslqd7uR2c3NeBfnK63 f2T02Rou156R8f8a3Cd+lnfGBLxc/0UwnjQBlJmTlT6b/VHNRc0v+Dh1quSFK0Tz62TLInnBT 9+5NQwFeK/ye4iUqF2qoefhhJEk4xVGlwd9IYNnWAZXss4tLcuGsXLv/hFMoBS3C0aBNWbA8j AAIN8B2m3MQVllBbgxmVNo0HcMUPvSrs0orjkuMxmDf0mgfByXNmcwGYwweIUfWL5BTvQ+TR+ TVQQ9uFl3NuMF2lBGUwH6OATOvydJjRtgRpCRY232czfaTQQUG6itRVQiJMvs9rHXgkc= Cc: Juergen Gross , Filipe Manco , Arnd Bergmann , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Paul Durrant , xen-devel@lists.xenproject.org, Wei Liu , "David S. Miller" Subject: [Xen-devel] [Xen PATCH] xen-netback: fix error handling output X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP The connect function prints an unintialized error code after an earlier initialization was removed: drivers/net/xen-netback/xenbus.c: In function 'connect': drivers/net/xen-netback/xenbus.c:938:3: error: 'err' may be used uninitialized in this function [-Werror=maybe-uninitialized] This prints it as -EINVAL instead, which seems to be the most appropriate error code. Before the patch that caused the warning, this would print a positive number returned by vsscanf() instead, which is also wrong. We probably don't need a backport though, as fixing the warning here should be sufficient. Fixes: f95842e7a9f2 ("xen: make use of xenbus_read_unsigned() in xen-netback") Fixes: 8d3d53b3e433 ("xen-netback: Add support for multiple queues") Signed-off-by: Arnd Bergmann Reviewed-by: Paul Durrant --- drivers/net/xen-netback/xenbus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/xen-netback/xenbus.c b/drivers/net/xen-netback/xenbus.c index 7356e00fac54..bfed79877b8a 100644 --- a/drivers/net/xen-netback/xenbus.c +++ b/drivers/net/xen-netback/xenbus.c @@ -935,7 +935,7 @@ static void connect(struct backend_info *be) "multi-queue-num-queues", 1); if (requested_num_queues > xenvif_max_queues) { /* buggy or malicious guest */ - xenbus_dev_fatal(dev, err, + xenbus_dev_fatal(dev, -EINVAL, "guest requested %u queues, exceeding the maximum of %u.", requested_num_queues, xenvif_max_queues); return;