Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2127599iog; Sun, 26 Jun 2022 07:22:48 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tuT7Oo5bdiphR/fo8KrjEgIU5IaTsDebbCdEf6fuhfjlHSf079LXFJahD1kAtdxaHpAdin X-Received: by 2002:aa7:88cc:0:b0:51c:319e:772c with SMTP id k12-20020aa788cc000000b0051c319e772cmr9548394pff.41.1656253368561; Sun, 26 Jun 2022 07:22:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656253368; cv=none; d=google.com; s=arc-20160816; b=HGyguacjeIrSuayDgViwrQ3yQUPRDMMKtA5mPv4UdD2a9FG/UVeNq1olWnJx7uwBqS jAEf+1OBuTz6fbaUjjP5ph/vHoVcdLowaqBMapNXJJoY/pcP0oJbEoX3HELsyRyrZZAo aLdCYERiF8wrKx3R+YrQTqVplr7zIZwAckyQrMOCav3diV2JEq7VyidmnsWIHiyIlY4Y tZEJbwjFiXc3N7LaWOSWO74MXggUeQlqrQYEye5ZOObGm6UB6KsoBvGthywCdNdcDCIa ZVVyDe7AJh3wL8ggoTi3mcarXpwSeL/mXTWJiPeHqgFqNyYqYE4qq+UbbP1AQHndfcul Ij+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=UxO4+12a2l2Lt+8XO+KLDZ96SqY6XkcgNY7r0qPmmxE=; b=aX26EkFDPM0bnbukkUUj/zs/Rrd0a22hs0IaY155udeXgq0kp8yfGtHVNQt0uP5xyD vMy9bOO72Uieu+STXAeSplqY0VE/OLIcVnAYycu3Fqo0zf79nwK1qEv4575qojQ4Rlnc mjF6b2XYNG5bV8hS1ihF+qnMH5upqWVhrQJmSLKKqNitBViEeL1nllmZKQrs/BoERyjf cgPMDnUlbfdE/dlan/V6qNg4jIqvXVPRSoLMrjzKa5px6PJRBPt/lfDCWjxHGql+ROL/ ETZSTTk45/5X84OEZswumL7iVs22fjBc+cZT/fQyq6GIx6BFI9vDWKMIfqktc13FcvBj 8ntg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=OEFvmYru; 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=fail (p=NONE sp=NONE dis=NONE) header.from=gmx.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t12-20020a17090ae50c00b001eccde9cdefsi11161396pjy.83.2022.06.26.07.22.25; Sun, 26 Jun 2022 07:22:48 -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=@gmx.net header.s=badeba3b8450 header.b=OEFvmYru; 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=fail (p=NONE sp=NONE dis=NONE) header.from=gmx.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234220AbiFZOKR (ORCPT + 99 others); Sun, 26 Jun 2022 10:10:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230497AbiFZOKQ (ORCPT ); Sun, 26 Jun 2022 10:10:16 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3EADF9588; Sun, 26 Jun 2022 07:10:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1656252590; bh=yTusrjLOKRKwRvbd8R+ykK/3/JvyRwhEMn0DfEPv1UQ=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=OEFvmYruw9c/MQw0Bb57+QhL/P3LfieAzofQsvHzfZU4qHFtZ6YCY8fGF49l0nlN7 d91HEORwKcv5+VjBO7JThNTMwrXuURI0wsAnEPtqyY2qup8tlyKEsWkJ4ssvDt+5UI zowxewehHN5/BKy76GTg0uolk6B6+T4mtj0AoFvw= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.0.33] ([46.223.2.248]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Mk0NU-1nLMYg0rea-00kNyS; Sun, 26 Jun 2022 16:09:50 +0200 Subject: Re: [PATCH 7/8] serial: ar933x: Remove redundant assignment in rs485_config To: =?UTF-8?Q?Ilpo_J=c3=a4rvinen?= Cc: Greg Kroah-Hartman , Jiri Slaby , robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, Andy Shevchenko , vz@mleia.com, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-serial , LKML , lukas@wunner.de, p.rosenberger@kunbus.com, Lino Sanfilippo References: <20220622154659.8710-1-LinoSanfilippo@gmx.de> <20220622154659.8710-8-LinoSanfilippo@gmx.de> From: Lino Sanfilippo Message-ID: Date: Sun, 26 Jun 2022 16:09:48 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:HPs9BkINPOugQ76QtMRekLInNgNbeZHcwpIRkgAQ+/3JpS8T0E5 na8Gv2u7zhVw+/nGBiNBdETNueMeS2z0KYd8T+thup1HRX8cPEQWHJCRUme+sLjOVrY9j/v HGcmWJriW/REC6uIJyGdMquWHsEvzy69rHxqpAYt9v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RAwaMtmo4hpfLlbjeldAFHLliY9p7Z+yXFEFwX7azljTmAp PkAutccHGbPK82e4mOOsstpwmh0K74VrAizX2IGTo72I8CDF5czBic0XQBrEPXpOZWAcBZp/P hZrP9muQ960wbyBcKxKfZtxKyDt/F5TJtG/VlEkRrA9qGIgA1s23EPv/Q== X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 On 25.06.22 at 12:14, Ilpo J=C3=A4rvinen wrote: > On Wed, 22 Jun 2022, Lino Sanfilippo wrote: > >> From: Lino Sanfilippo >> >> In uart_set_rs485_config() the serial core already assigns the passed >> serial_rs485 struct to the uart port. >> >> So remove the assignment in the drivers rs485_config() function to avoi= d >> redundancy. >> >> Signed-off-by: Lino Sanfilippo >> --- >> drivers/tty/serial/ar933x_uart.c | 1 - >> 1 file changed, 1 deletion(-) >> >> diff --git a/drivers/tty/serial/ar933x_uart.c b/drivers/tty/serial/ar93= 3x_uart.c >> index ab2c5b2a1ce8..857e010d01dc 100644 >> --- a/drivers/tty/serial/ar933x_uart.c >> +++ b/drivers/tty/serial/ar933x_uart.c >> @@ -591,7 +591,6 @@ static int ar933x_config_rs485(struct uart_port *po= rt, >> dev_err(port->dev, "RS485 needs rts-gpio\n"); >> return 1; >> } >> - port->rs485 =3D *rs485conf; >> return 0; >> } > > Hmm, I realize that for some reason I missed cleaning up this particular > driver after introducing the serial_rs485 sanitization. It shouldn't nee= d > that preceeding if block either because ar933x_no_rs485 gets applied if > there's no rts_gpiod so the core clears SER_RS485_ENABLED. > I think we still need that "if" in case that RS485 was not enabled at driv= er startup (no rs485-enabled-at-boot-time) and no RTS GPIO was defined but th= en RS485 is enabled via TIOCSRS485. Maybe in ar933x_uart_probe() if ((port->rs485.flags & SER_RS485_ENABLED) && !up->rts_gpiod) { dev_err(&pdev->dev, "lacking rts-gpio, disabling RS485\n"); port->rs485.flags &=3D ~SER_RS485_ENABLED; port->rs485_supported =3D &ar933x_no_rs485; } should rather be if (!up->rts_gpiod) { dev_err(&pdev->dev, "lacking rts-gpio, disabling RS485\n"); port->rs485.flags &=3D ~SER_RS485_ENABLED; port->rs485_supported =3D &ar933x_no_rs485; } Regards, Lino