From patchwork Wed Apr 26 08:03:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "D. Starke" X-Patchwork-Id: 87707 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp78368vqo; Wed, 26 Apr 2023 01:07:02 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6O1cvd5CG1Zc8Du3j++PAVAZeWjO2RZNNQ3utN3WYF0MuNK9i9CHJ6P9MHoONJLhpObgiJ X-Received: by 2002:a05:6a00:18a5:b0:63b:5f0f:94f1 with SMTP id x37-20020a056a0018a500b0063b5f0f94f1mr2247462pfh.4.1682496422240; Wed, 26 Apr 2023 01:07:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682496422; cv=none; d=google.com; s=arc-20160816; b=Yc1bqBjm5ZZ6GSTGs80UDjyFR4tYspgsXlseN1fD41SqnN3zTRb3qGM86xnIzwZ9yh ugvmiZLL1ZalOYfbr+UMEo0N5d3IOmDo5jUo6I0TiR+dTQdDfUajWX/vcZ04c1ZTW7oR jgQF7uQWuloLHSJ4jfbMXVEFjakLHVEndYmv73TE2GnmnI4AjdR2UfYkFEtWjvYMC2Ul 11ZLM5O4lT/EzDKeyDqhxTb4YAjz0NOOfWT+aaVFINiIU3cipl8u4kOrDAtlJODCxtdC M6YchxG9ir/q0i0hEzCs4WO1eElE7CrigfhHIRFrqVqJgQPVV2HKxpROTaHKiL+KJ25c US+w== 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=xx1dZ9evczfWs6mTbL4YlHvxtmGbUbagLFOnGgHTeoI=; b=BGxroAQf42WvtMYT9E4clM3rTeBMr28+9spl01cRzebjN89JtKKFrTCs+00d0i1St6 27SntYOCiRA6oasezhcKF1hb9w+21RhS49TR0l0ljgx1SWu9rZVXgKFh5pq3i8xVwazp Z86Ye+ennoTUywPKtKB2frMOsqx4WDFf+384Z5ZMXjRXJ2NtzJ4OtZ06hvDXbKk731go EQdRAozPQpRIEjpnkeN/STvN+/YJuZsdUrPSLNiLLx0AhVBgjQSSYmctpDJOACVzOihR EM1I/T/al1KBis0eO5OR8QcH/KefK+xgE1AFk7aj7AN9ldmLa53qF+uW+e3lNJTWLlqP 2IFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=XuUQJT2W; 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 p10-20020aa79e8a000000b0063b7ab0b1aasi15984676pfq.242.2023.04.26.01.06.47; Wed, 26 Apr 2023 01:07:02 -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=XuUQJT2W; 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 S240011AbjDZIDt (ORCPT + 99 others); Wed, 26 Apr 2023 04:03:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239935AbjDZIDg (ORCPT ); Wed, 26 Apr 2023 04:03:36 -0400 Received: from mta-65-225.siemens.flowmailer.net (mta-65-225.siemens.flowmailer.net [185.136.65.225]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2AE2B3C1B for ; Wed, 26 Apr 2023 01:03:33 -0700 (PDT) Received: by mta-65-225.siemens.flowmailer.net with ESMTPSA id 20230426080330e6d6439e587acad12f for ; Wed, 26 Apr 2023 10:03:31 +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=xx1dZ9evczfWs6mTbL4YlHvxtmGbUbagLFOnGgHTeoI=; b=XuUQJT2WG5DehG0o+Dj51+tV8lafeJCVbcaZuMDf8dYR67lzQL/AqNjJLnFn9gXOV71c/Q 5AT1vNnUH+9cqPWiQuK8B4KYaNfrYKSXOHpvtzzdvyNcKN29LlzVz0HnjuDMxVvicFL1foqe Wg74gBZMyeFqdzevY96QvVERuEPtg=; 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 v4 3/8] tty: n_gsm: remove unneeded initialization of ret in gsm_dlci_config Date: Wed, 26 Apr 2023 10:03:10 +0200 Message-Id: <20230426080315.7595-3-daniel.starke@siemens.com> In-Reply-To: <20230426080315.7595-1-daniel.starke@siemens.com> References: <20230426080315.7595-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,URIBL_BLOCKED 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?1764225368370106879?= X-GMAIL-MSGID: =?utf-8?q?1764225368370106879?= 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(-) v3 -> v4: No changes. Link: https://lore.kernel.org/all/20230424075251.5216-3-daniel.starke@siemens.com/ diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c index 66edcf65a4dd..ebb71957f783 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)