Message ID | 20230420085017.7314-4-daniel.starke@siemens.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp187069vqo; Thu, 20 Apr 2023 02:08:04 -0700 (PDT) X-Google-Smtp-Source: AKy350Z/LU7tAZynINkxv0oFkVFNOnJAPjUuyR2cahpbJBM1IupNu69+ilvYRCUxuid9AMulByYa X-Received: by 2002:a05:6a00:1796:b0:634:7ba3:d140 with SMTP id s22-20020a056a00179600b006347ba3d140mr724393pfg.15.1681981684550; Thu, 20 Apr 2023 02:08:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681981684; cv=none; d=google.com; s=arc-20160816; b=jHAcpBOGdn2f0bOaR3zIHc/u3OR1FZ4dxJAiI2MgITjDLrY6ItBntu08H/f96RRZwe 43JRUyQe1eZ9TdAJDB6loMtctnQ+LZ6dlEpYeS5cQokClaM1Go8M68ee5AkTVoe0IM/k WpG7fC7zMOINXfEF5kQMvNbgeZoB7Xb61/qYDsxNIYxhhmZC9uaZtZjQAW4Uxzh7y4ZC zEUSPUcgTbfT5yWadHHmcV0+4ZCo6GBQtiOAGUEYH8qV8kZ4mVUTaJ8rMhtSgCWri/6c x1As5c9/yKsFvaWkQFKENCuX5GMbvfbTfeBH/UkcuKrCt4eW2WiCcbSzZDxRl06upMfk ROiQ== 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=wbNM1vDNuJkkGCnV4LllCW3D4zhsGMii5QKdt4aDywU=; b=OYC1Y2hfjbLhFSpe2zGfM/Or+14GnA9b9vonOENCA49Qg3jq/mKwFGQZiPLsAGeeeI zwhwKKrtFHlWVT7/nWfOfVnDvYgo4gvXF3KH1PTsn9gAByIIzj/IcVOvG/CfWvDOv0fL p+OZxBICOyiysF/YWMXj7GaonGRbQ53DI0zaKvRtZlN9B7buUJZG2uxSUBYa7dl3mvz4 XC4Bu7exfbz23/h3IWGQWGugtPXo9iYzVHa9o7Kfo+3RWgLHOgv9TiS0mp4ucNawyjLD JlXhjhYd5uPF/6H6r5Cg/K2PJZ30fAQHpodDz+TzCAqujBBj5St4y3/P1A2PuM8ok0XP A4Jw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=nFgxN3fT; 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 83-20020a630556000000b00517a2ca5ecbsi1282264pgf.692.2023.04.20.02.07.51; Thu, 20 Apr 2023 02:08:04 -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=nFgxN3fT; 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 S234527AbjDTIzB (ORCPT <rfc822;cjcooper78@gmail.com> + 99 others); Thu, 20 Apr 2023 04:55:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230077AbjDTIxq (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 20 Apr 2023 04:53:46 -0400 Received: from mta-64-226.siemens.flowmailer.net (mta-64-226.siemens.flowmailer.net [185.136.64.226]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1BAA7281 for <linux-kernel@vger.kernel.org>; Thu, 20 Apr 2023 01:52:01 -0700 (PDT) Received: by mta-64-226.siemens.flowmailer.net with ESMTPSA id 202304200851592d68004f396acc8667 for <linux-kernel@vger.kernel.org>; Thu, 20 Apr 2023 10:52:00 +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=wbNM1vDNuJkkGCnV4LllCW3D4zhsGMii5QKdt4aDywU=; b=nFgxN3fTDhl4D/1sb5sXltr6DKifW9wo3jUOoS/TzQp/uqoXRIBTWACOzJEsdh6P5iWq5K GLEE5XM0ad0EYLOwT2ekQPwV6iqpOWDP8GH5T2WUJGdqY5JRogSnvPSRpHrI0zN+Eha/M5a+ z2o7vgY1CwMkXJN54bHszEEhT3rkk=; From: "D. Starke" <daniel.starke@siemens.com> 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 <daniel.starke@siemens.com> Subject: [PATCH v2 4/9] tty: n_gsm: remove unneeded initialization of ret in gsm_dlci_config Date: Thu, 20 Apr 2023 10:50:12 +0200 Message-Id: <20230420085017.7314-4-daniel.starke@siemens.com> In-Reply-To: <20230420085017.7314-1-daniel.starke@siemens.com> References: <20230420085017.7314-1-daniel.starke@siemens.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763685626860181924?= X-GMAIL-MSGID: =?utf-8?q?1763685626860181924?= |
Series |
[v2,1/9] tty: n_gsm: fix redundant assignment of gsm->encoding
|
|
Commit Message
D. Starke
April 20, 2023, 8:50 a.m. UTC
From: Daniel Starke <daniel.starke@siemens.com> 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 <daniel.starke@siemens.com> --- drivers/tty/n_gsm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) v1 -> v2: Removed Fixed tag in commit message as remarked in the review. Moved 'ret' declaration to the point of the assignment and changed commit message accordingly. This was done as suggested in the review. Link: https://lore.kernel.org/all/AS4PR10MB58958C282E7E0FB653BC9406E0919@AS4PR10MB5895.EURPRD10.PROD.OUTLOOK.COM/
diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c index eb21ca583642..79850f616cca 100644 --- a/drivers/tty/n_gsm.c +++ b/drivers/tty/n_gsm.c @@ -3276,7 +3276,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; @@ -3355,7 +3354,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)