From patchwork Tue Sep 6 13:25:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101851 Delivered-To: patch@linaro.org Received: by 10.140.106.11 with SMTP id d11csp548091qgf; Tue, 6 Sep 2016 06:25:57 -0700 (PDT) X-Received: by 10.98.196.130 with SMTP id h2mr31296380pfk.140.1473168357279; Tue, 06 Sep 2016 06:25:57 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id vu8si35368216pab.180.2016.09.06.06.25.57; Tue, 06 Sep 2016 06:25:57 -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 S1755763AbcIFNZy (ORCPT + 27 others); Tue, 6 Sep 2016 09:25:54 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:53235 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755486AbcIFNZx (ORCPT ); Tue, 6 Sep 2016 09:25:53 -0400 Received: from wuerfel.lan. ([78.43.20.153]) by mrelayeu.kundenserver.de (mreue002) with ESMTPA (Nemesis) id 0M1eYM-1anW4F3i0o-00tkex; Tue, 06 Sep 2016 15:25:41 +0200 From: Arnd Bergmann To: "David S. Miller" , David Howells Cc: Arnd Bergmann , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] rxrpc: remove duplicate 'error' variable Date: Tue, 6 Sep 2016 15:25:29 +0200 Message-Id: <20160906132614.2117695-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:wyi5hJFuYpJlxWklUnp0WOVMI+jQl+jE9jR1r3gpWyQFJBoQ6sE 8k8b1XQOpOSCnlliTmGyXZ2YAoesOh38Yjb/fJaGv4hCxapC7qa1HziCgMfmrEnrCCx76bZ Pa76DBK0AKJdL3D8lfXrdW3fjrtpVr05fgqsY+ddqO2Ekd4Dj1M9CB2f/qHIBaxWFA1udEV AEiat6JBUUXIUxCV6cLrw== X-UI-Out-Filterresults: notjunk:1; V01:K0:Y89NqReEyRA=:tRPJyVLjII1ATVqH64rnIG hjDWrqMx3x33KbRxAsIRTnGVF712ZriNNysponN20pBFN3WM+wf2G3+H9k5wS2Njv81ARGuEa R93UXMM8BYJGiJnxNXR/KlCjuZ2mqhoOeFCpIKs0yvpdqLmrNxMDAvnqmYH8RHNX7uBtZd0IV ovjPT1RPpYDMSBujjJSmUV7MuidH2ceEutTyxhz4PkDimCKXbs8mPxI9vk1RYQTBukZlDD7e5 cd96yvTO0l55U+hzUcs+VP6G7WtxcbkstzPznaoKi8VWg3bB5o5xCmV4TMpLAINsdt8n0pkBp Fj6lio/i8QGFC6u9vEsR/zNVmQXsRYlZUq5twO5BCjtNUCJSV5o7MgQ+zKi7/TIMlvn3AKR99 efUa92J68SHgkKONrCjE8Cd5t65CqDB1GxfOmR9C23raipoCfk0lpRMGH7mez7CqRXJpyW+Zp F2g1pDv5HBRJ6rOawFvnBBi6dRuOKm073QsxifFKn8KUA8W9TYC2jsoQDpRs6yB+hmy85Z6yd Fms2IP0vBjoXzSqGcxmBnYX923zAPrhvUva9omG6B7euNAEHnvIZoxoPj9E7j4kqj09vJHPHO o/HeXM9pxn2WXPGClQkQlYhQwvzfO+UuuM6AzPPPppyemI1D8AGlHdABhfBfOagIxGSqWdHF+ R+/L4hkOX6EloSqZKeCyE45aoayReTSoeNowGCEEInh5DCSQggJaNwfCO8QoISybDXEM= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The rxrpc_process_call function has debug code to print a failure code, but instead of printing the code from the rxrpc_call structure, it prints an uninitialized variable: net/rxrpc/call_event.c: In function 'rxrpc_process_call': net/rxrpc/call_event.c:879:58: error: 'error' may be used uninitialized in this function [-Werror=maybe-uninitialized] This removes the extraneous variable and prints the correct code instead. Signed-off-by: Arnd Bergmann Fixes: f5c17aaeb2ae ("rxrpc: Calls should only have one terminal state") --- net/rxrpc/call_event.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) -- 2.9.0 diff --git a/net/rxrpc/call_event.c b/net/rxrpc/call_event.c index de72de662044..4754c7fb6242 100644 --- a/net/rxrpc/call_event.c +++ b/net/rxrpc/call_event.c @@ -868,7 +868,6 @@ skip_msg_init: /* deal with events of a final nature */ if (test_bit(RXRPC_CALL_EV_RCVD_ERROR, &call->events)) { enum rxrpc_skb_mark mark; - int error; clear_bit(RXRPC_CALL_EV_CONN_ABORT, &call->events); clear_bit(RXRPC_CALL_EV_REJECT_BUSY, &call->events); @@ -876,10 +875,10 @@ skip_msg_init: if (call->completion == RXRPC_CALL_NETWORK_ERROR) { mark = RXRPC_SKB_MARK_NET_ERROR; - _debug("post net error %d", error); + _debug("post net error %d", call->error); } else { mark = RXRPC_SKB_MARK_LOCAL_ERROR; - _debug("post net local error %d", error); + _debug("post net local error %d", call->error); } if (rxrpc_post_message(call, mark, call->error, true) < 0)