From patchwork Mon Apr 24 07:52:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "D. Starke" X-Patchwork-Id: 86901 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2588291vqo; Mon, 24 Apr 2023 01:32:35 -0700 (PDT) X-Google-Smtp-Source: AKy350Zj84JaMWDZXFTsgwyHQl3jqJ+n/40F0GW/ANaQals7429zngm7AIr2Zx9TwlDqojbFq0y1 X-Received: by 2002:a05:6a21:110c:b0:eb:6e43:8e1b with SMTP id oh12-20020a056a21110c00b000eb6e438e1bmr14450967pzb.30.1682325155457; Mon, 24 Apr 2023 01:32:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682325155; cv=none; d=google.com; s=arc-20160816; b=MAwH+8F+WarYAVsK3+6VQg2IBT8bNZeh0Z8qKRNPLm3YXlA+iVrxDfOvRi9c9/s8EJ kTEx8j8RZa49sCzuMpCRF9vDoYiN1JVtkQZUjiGgGoOc/pYPqUgWVl3rnLlbOQFLDX6V sCwWU7wVZm2hh+eLP9+mX93gsUkdqMvXhkbkk4R8OISCYjGrAsnHmHSOROk6MPjjeczR 2C28zIane/L2qGr7slQAHm7RUDzc+8Okgq1oEeuUaTpn4mGNOzN6Cz4QNo4/D2gx2H7o QQ8EydD3PN4xHGbAGA51v/UUNeutwt+hMkBNLjNz61+qGfZ3D1XQFMAFNcN22kTBszu1 quzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:feedback-id:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=HYL648Ckr8RAxIMexFhAOmGJuIagv55uONwQN9AZSlE=; b=irIgxQJYXXNP927naHPWA7pdpDBx/pXBL7kHfyuD2nDk7LaODMDw9jQb8wz0XCrBL+ cTrgRbwfc71sQ7+qc8EhrVAoSaBKVJAe5iH7C/M+C2VkNGb9Bx8kCc39K4zyyt87pn0h xqX+/Y4qneel3qsut49x76CSHAFOZd6SgER/38hXH5ZRmRnKic81kH0m3I5TtGW8b36H 4EKBaYyRX5NuiRR0nTKHeC9YXgN0r0jhjIEwRbGnDYyVTY1g5plLnCr1wrjcvokhrfCx Hd6M0FNhTGgQbeVF0i5K5x/s6CJc/eXSI55TcPWxuwbCV5m01KdT1V/cjeZ19Yeo1yrH M/uQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=UxpH9sQV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g16-20020aa79f10000000b0063b82909b1esi10511889pfr.0.2023.04.24.01.32.23; Mon, 24 Apr 2023 01:32:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=UxpH9sQV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229841AbjDXH4Y (ORCPT + 99 others); Mon, 24 Apr 2023 03:56:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229477AbjDXH4R (ORCPT ); Mon, 24 Apr 2023 03:56:17 -0400 X-Greylist: delayed 78 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 24 Apr 2023 00:55:55 PDT Received: from mta-64-225.siemens.flowmailer.net (mta-64-225.siemens.flowmailer.net [185.136.64.225]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 620872115 for ; Mon, 24 Apr 2023 00:55:55 -0700 (PDT) Received: by mta-64-225.siemens.flowmailer.net with ESMTPSA id 20230424075435d30a07f002aacfd3a3 for ; Mon, 24 Apr 2023 09:54:35 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm1; d=siemens.com; i=daniel.starke@siemens.com; h=Date:From:Subject:To:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Cc:References:In-Reply-To; bh=HYL648Ckr8RAxIMexFhAOmGJuIagv55uONwQN9AZSlE=; b=UxpH9sQVTdMiZacKHkA4qRluMfxv+wC4NMvn1yR5OwpPJ+xSnSY8HjyBYn4I5AzdpCtsmF Rg8iOylfp2qu0pvnQutc8lNijVl2ZJrG1XzmN/Qrz1EqEfsib7BoqG+PuaaJLn4EhCq/X04E UluXDLbNxpdPPJBmuvvZ2FtB2t2Uw=; From: "D. Starke" To: linux-serial@vger.kernel.org, gregkh@linuxfoundation.org, jirislaby@kernel.org, ilpo.jarvinen@linux.intel.com Cc: linux-kernel@vger.kernel.org, Daniel Starke Subject: [PATCH v3 3/8] tty: n_gsm: remove unneeded initialization of ret in gsm_dlci_config Date: Mon, 24 Apr 2023 09:52:46 +0200 Message-Id: <20230424075251.5216-3-daniel.starke@siemens.com> In-Reply-To: <20230424075251.5216-1-daniel.starke@siemens.com> References: <20230424075251.5216-1-daniel.starke@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-314044:519-21489:flowmailer X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764045782166568961?= X-GMAIL-MSGID: =?utf-8?q?1764045782166568961?= From: Daniel Starke The variable 'ret' is not used before assignment from gsm_activate_mux(). Still it gets initialized to zero at declaration. Fix this as remarked in the link below by moving the declaration to the first assignment. Link: https://lore.kernel.org/all/b42bc4d1-cc9d-d115-c981-aaa053bdc59f@kernel.org/ Signed-off-by: Daniel Starke --- drivers/tty/n_gsm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) v2 -> v3: No changes. Link: https://lore.kernel.org/all/20230420085017.7314-4-daniel.starke@siemens.com/ diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c index 00f692e2e810..9a2cf3e14678 100644 --- a/drivers/tty/n_gsm.c +++ b/drivers/tty/n_gsm.c @@ -3277,7 +3277,6 @@ static void gsm_copy_config_values(struct gsm_mux *gsm, static int gsm_config(struct gsm_mux *gsm, struct gsm_config *c) { - int ret = 0; int need_close = 0; int need_restart = 0; @@ -3356,7 +3355,7 @@ static int gsm_config(struct gsm_mux *gsm, struct gsm_config *c) * and removing from the mux array */ if (gsm->dead) { - ret = gsm_activate_mux(gsm); + int ret = gsm_activate_mux(gsm); if (ret) return ret; if (gsm->initiator)