Message ID | 20230405054730.3850-1-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 b10csp82638vqo; Tue, 4 Apr 2023 23:03:13 -0700 (PDT) X-Google-Smtp-Source: AKy350YTnxu8bGG5MBHY4EZ36wVeYCIKEjgR3fnMC/CpES+NhYHWCjHI8ETiberpE1/rB88uDT3l X-Received: by 2002:a17:90b:4b87:b0:234:31f3:e00f with SMTP id lr7-20020a17090b4b8700b0023431f3e00fmr5442195pjb.43.1680674593337; Tue, 04 Apr 2023 23:03:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680674593; cv=none; d=google.com; s=arc-20160816; b=CNbcse1uM/RVp/Kc3ua+JOURV36xsDxR6iJQz8N0N7u4pWtD6AjIunVVGXI7yUHFZJ jEdkYecmJMOOprqFhpUI0CiFp2iRAuPEP/XRnilpPIsX0xVmLyBBCZiJPMdYlnVtCsxJ MCChC3c8hkF4U3r/2DdDCdRhILMRmkfhyawWOJcHr7beK0Td6SmcErOg4DogcK+ypY8L uZAxSTVaJ7vFJry+Hl3oGtmQfkrwjYpE86A5KV6kVlJQ/T/e/lwuyqyutiS7TWhj97lY gSwa8nZq7fo7vZBoW1rb/tvSJiZTLHowYS7viYcndsyk3+LgZff9TZg05I8LmGRucTjA Y8QQ== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=eaofLLxNrKLouJpv9xBZNno2aDJjC1A6uNHxejf6/ws=; b=cCrmXrubQHGE8dfC4l6S6NBmgqv+3Ka5UyLZ0p7uccTFBl/O1sfepWtFWCZnK6u7fg uEclGa6tZlMk/cvOjqQXIwaHKiwquvTESuKgRWYGjgvNvfl/WC2aQ/LtvxU47mLmDfa0 mPks3Slzr86Xd1ymZLOF3svQzIiWiEMVpH4oqhOEMtIF5zcDI7qr1X6HLX/58iZPAX1m ziTfSlYNHtX9k1xIug82kUH2K+rCsN1ExtPIRkOwtCaWTYUBMFAfh6POMaVKYPmcpezD zAwEZ5ePa2IRhfrBBBPLUXcUWRZK8BaQAy3dzPGptY5doV+TSVcFYfnqGfEQ0kBI2A5i QTag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b="e8Ukaa/H"; 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 ds16-20020a17090b08d000b0023fa810c06asi765593pjb.97.2023.04.04.23.03.01; Tue, 04 Apr 2023 23:03:13 -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="e8Ukaa/H"; 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 S236997AbjDEFu1 (ORCPT <rfc822;lkml4gm@gmail.com> + 99 others); Wed, 5 Apr 2023 01:50:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236956AbjDEFuW (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 5 Apr 2023 01:50:22 -0400 X-Greylist: delayed 74 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 04 Apr 2023 22:49:55 PDT Received: from mta-65-226.siemens.flowmailer.net (mta-65-226.siemens.flowmailer.net [185.136.65.226]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78AF21BEF for <linux-kernel@vger.kernel.org>; Tue, 4 Apr 2023 22:49:55 -0700 (PDT) Received: by mta-65-226.siemens.flowmailer.net with ESMTPSA id 202304050548380861f07e5c4f7ec6b0 for <linux-kernel@vger.kernel.org>; Wed, 05 Apr 2023 07:48:38 +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; bh=eaofLLxNrKLouJpv9xBZNno2aDJjC1A6uNHxejf6/ws=; b=e8Ukaa/HzGzvXcqtUvbQdG5KcX2P/0y9PDnqTdEYsORtJQFZfi2xjCxy4xYFM2/JcGc9YL Sxg5qzx/0dY36h77qkhpOEEGSY9bw9Q6dJoKxArmeSzf+PLcVLYdoPiZohXvjsn5JV/u1Aiv HvsXzSDLzKV8vIeqY1oqSxkd9t3AI=; 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 1/9] tty: n_gsm: fix redundant assignment of gsm->encoding Date: Wed, 5 Apr 2023 07:47:22 +0200 Message-Id: <20230405054730.3850-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=-0.2 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS 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?1762315042427779631?= X-GMAIL-MSGID: =?utf-8?q?1762315042427779631?= |
Series |
[1/9] tty: n_gsm: fix redundant assignment of gsm->encoding
|
|
Commit Message
D. Starke
April 5, 2023, 5:47 a.m. UTC
From: Daniel Starke <daniel.starke@siemens.com> The function gsmld_open() contains a redundant assignment of gsm->encoding. The same value of GSM_ADV_OPT is already assigned to it during the initialization of the struct in gsm_alloc_mux() a few lines earlier. Fix this by removing the redundant second assignment of gsm->encoding in gsmld_open(). Fixes: e1eaea46bb40 ("tty: n_gsm line discipline") Signed-off-by: Daniel Starke <daniel.starke@siemens.com> --- drivers/tty/n_gsm.c | 1 - 1 file changed, 1 deletion(-)
Comments
On Wed, 5 Apr 2023, D. Starke wrote: > From: Daniel Starke <daniel.starke@siemens.com> > > The function gsmld_open() contains a redundant assignment of gsm->encoding. > The same value of GSM_ADV_OPT is already assigned to it during the > initialization of the struct in gsm_alloc_mux() a few lines earlier. > > Fix this by removing the redundant second assignment of gsm->encoding in > gsmld_open(). > > Fixes: e1eaea46bb40 ("tty: n_gsm line discipline") > Signed-off-by: Daniel Starke <daniel.starke@siemens.com> > --- > drivers/tty/n_gsm.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c > index b7e1369a035c..c42c8b89fd46 100644 > --- a/drivers/tty/n_gsm.c > +++ b/drivers/tty/n_gsm.c > @@ -3585,7 +3585,6 @@ static int gsmld_open(struct tty_struct *tty) > tty->receive_room = 65536; > > /* Attach the initial passive connection */ > - gsm->encoding = GSM_ADV_OPT; > gsmld_attach_gsm(tty, gsm); > > /* The mux will not be activated yet, we wait for correct > Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c index b7e1369a035c..c42c8b89fd46 100644 --- a/drivers/tty/n_gsm.c +++ b/drivers/tty/n_gsm.c @@ -3585,7 +3585,6 @@ static int gsmld_open(struct tty_struct *tty) tty->receive_room = 65536; /* Attach the initial passive connection */ - gsm->encoding = GSM_ADV_OPT; gsmld_attach_gsm(tty, gsm); /* The mux will not be activated yet, we wait for correct