Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp78162iog; Wed, 29 Jun 2022 18:33:31 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tefkqj2JqpwC5LikIFp/vwJD+RhocVxDQ6/sVSEISiccuZ9TknOoQ96WBpzbgwq+WKlruh X-Received: by 2002:a05:6a00:14c7:b0:525:89c1:35fb with SMTP id w7-20020a056a0014c700b0052589c135fbmr12881637pfu.36.1656552810899; Wed, 29 Jun 2022 18:33:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656552810; cv=none; d=google.com; s=arc-20160816; b=TVRsY4sOBtB30Oele6QY0e+ylpvNWzFI9/TWDcPcEdj6ba4mZpP90sI8ynVq2q8tzX 4TrEj//TGVTlxqLw3Kta8o/Aticyb4P+0oGHu2L7rg+zVZKCw+ryyoci7nAc1BSvuMEN E4ofX04YT2NOLW7L+vy6X0+PgpmOb6yveIG+ZIyVS6Uxd8xiRNt7XSa0ayh+hEOyxbfF 064Y+QCGlP6yDlzMzDy2xnYz3ft6msoXci2UfX0g1jMsiwQmohIl1wvapJ3mxkPJN/03 E0c4oBQBbUdDKudeFBiwfQ8fRFMy0zTrpf1n/P+34jnwcT5BMUynen80ztDeDoOQVtSM Fmfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=4o4aTkDHAJyOuK6Eindv0SJ+kxh6IrbECC5zwsAXOxY=; b=RxIXIa5soNXiM54u7QrSSNcRBkL8Flb/RHG8SVJ/w6RYjiUjYKQObnWMiqZW1Asr66 ffBO2M+BqRLrFtkn65kWg1r0f0yZaNDiHDK2aVsFNTeh9OvaqBBOGZ8P0Riq3Gb5VS5p ymYld+zamI3A/jZl670r8DWP2s8RSKVrEf6B/e8A+igA3sRTx/huKnrN9h8BdnD5ZRuD 5fqrXXOKfzRgWzoS77jd57r89/CVfMWnNMocWkZ5VrrerJlpdtLcfcVtZCJJcECCZQn0 Mdzm/2TPkiO2BGajudoxJJVO+e+TPAqhzIdiLHK2fv4VzlT9K01VTJRVStAuFD5ZkrWR Cfaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=OTfO9M32; 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 q7-20020a170902f78700b0016a3e914a18si21866183pln.506.2022.06.29.18.33.15; Wed, 29 Jun 2022 18:33:30 -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=OTfO9M32; 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 S229876AbiF3Adt (ORCPT + 99 others); Wed, 29 Jun 2022 20:33:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57780 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229512AbiF3Ads (ORCPT ); Wed, 29 Jun 2022 20:33:48 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 587D822B26; Wed, 29 Jun 2022 17:33:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1656549204; bh=6lMtPAGrUriFxRzqDiaMwPvLBe2jbc2oorL+KRQ6G0E=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From:In-Reply-To; b=OTfO9M329EBUUJzlZ1kbot16CJAYzs5ESaOYQyePWGapX3napQEOrHhH7cKml2QQ/ yIgsiGzNOB4dIvRKTFL1sn18+xH2wDYOedTHKmXxKV/NZzbYt4gtSpsf+jRgT+FmgI MvL1/vex3OQvuxQOnMwOSZifdykD17XemB3nxQjE= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.0.69] ([46.223.3.23]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MuUnA-1npSBa1f4k-00rWrE; Thu, 30 Jun 2022 02:33:24 +0200 Message-ID: <16841959-42c9-cbd7-e767-39050134b070@gmx.de> Date: Thu, 30 Jun 2022 02:33:23 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH 7/8] serial: ar933x: Remove redundant assignment in rs485_config Content-Language: en-US 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> <033c8d2-3f2e-afe6-2e98-14a61c872b4b@linux.intel.com> From: Lino Sanfilippo In-Reply-To: <033c8d2-3f2e-afe6-2e98-14a61c872b4b@linux.intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:fymyF5SOHTcLkP7SEfj64ke4xtX230O6VAwEagenoFcJ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/YX8IO/+kIpUZUzVy07XPQmi+JFG2kNzCRwrAqhpI0 qOWavPFe8OuQBn2fA/BxuCzXczlUOGX8whbS7m8x7K/gtogfeonF67/4PuTHXSv91ZM88RjwV SX8Ek6DzIBrtBvp8tl1rbmeuGx78g75ovVKjK1KrYFfryg5qUPXOvD4r5XXJ+kH/UJ9n0jcGU AYkTAOEa4RFKz7JVHWSq194siH6Ch8XkzpEZpNh4o7g3iu+HfJzytOAcDbuK9UDXq1O2Ff6Pk t1n2/gCvleNT5e6BkAIA7exqLvxSZsrmbBpn5X4jCKZJ/aaQnPO1gALFg== 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 27.06.22 10:14, Ilpo J=C3=A4rvinen wrote: > On Sun, 26 Jun 2022, Lino Sanfilippo wrote: > >> 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 av= oid >>>> 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/ar= 933x_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 *= port, >>>> 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 particul= ar >>> driver after introducing the serial_rs485 sanitization. It shouldn't n= eed >>> that preceeding if block either because ar933x_no_rs485 gets applied i= f >>> 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 d= river >> startup (no rs485-enabled-at-boot-time) and no RTS GPIO was defined but= then >> 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 > > I think it would be better (and what I should have done while moving the > check there in the first place but I missed it). In addition, however, i= t > would be useful to not print unnecessarily: > >> if (!up->rts_gpiod) { > > if (port->rs485.flags & SER_RS485_ENABLED) { > >> dev_err(&pdev->dev, "lacking rts-gpio, disabling RS485\n"); >> port->rs485.flags &=3D ~SER_RS485_ENABLED; > > } Right. I will send a fix for this with the new version of my series. Regards, Lino