From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2C37AC43334 for ; Sat, 25 Jun 2022 10:14:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231895AbiFYKOL (ORCPT ); Sat, 25 Jun 2022 06:14:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230401AbiFYKOL (ORCPT ); Sat, 25 Jun 2022 06:14:11 -0400 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 698B113E0C; Sat, 25 Jun 2022 03:14:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1656152050; x=1687688050; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=FpKY2DF6TueYC4tmSBCp0oR3CpEMPuEwj+UmJ668MZU=; b=hkIhEnZxESzupOW1puVozWdUhlfm8eUqoKGCSyfDjeRptBidZn0zBNNC uG937syASipLvTPLvh3Dd55QJETnTTTT/rBYMaMX8VIdu6ObKOmKNgfKS GqmOV6InY5utmxo1dMK60DjBqa62AnGPBPiWUVR/dhKJ+a+rMRlo+UxWF bsHcTYXdR5+ic/wW9Vy/9f1U567f61iRZqxqp/p6TR9jzHdV4ptql3Sxe ++55M/gCD2VMOniOaxdemChWqyJw0VZHVFLU0YzZWJsLgXiw9gMYwh0DI qkoCvMZmFcLMlW9Fp146hvobkdsr/nbpiuu4c7WwK4c84OX5NwR9BKc8V w==; X-IronPort-AV: E=McAfee;i="6400,9594,10388"; a="281907113" X-IronPort-AV: E=Sophos;i="5.92,222,1650956400"; d="scan'208";a="281907113" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jun 2022 03:14:10 -0700 X-IronPort-AV: E=Sophos;i="5.92,222,1650956400"; d="scan'208";a="645648517" Received: from selvaku-mobl.ger.corp.intel.com ([10.252.60.244]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jun 2022 03:14:05 -0700 Date: Sat, 25 Jun 2022 13:14:03 +0300 (EEST) From: =?ISO-8859-15?Q?Ilpo_J=E4rvinen?= To: Lino Sanfilippo cc: Greg Kroah-Hartman , Jiri Slaby , ilpo.jarvinen@linux.intel.com, 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 Subject: Re: [PATCH 7/8] serial: ar933x: Remove redundant assignment in rs485_config In-Reply-To: <20220622154659.8710-8-LinoSanfilippo@gmx.de> Message-ID: References: <20220622154659.8710-1-LinoSanfilippo@gmx.de> <20220622154659.8710-8-LinoSanfilippo@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org 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 avoid > 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/ar933x_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 = *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 need 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. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5A8A0C433EF for ; Sat, 25 Jun 2022 10:15:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:Message-ID: In-Reply-To:Subject:cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=GZLP7tEFikQiJl6w+BCuQOENVtUEEwU40lj5DBlPOvw=; b=SsZB+4srYLCOxF LBVZEF1yCb+zdqs7R7VY67tIK8hOyEjDlL7rkgukPXFT2m5ECykJIg1vHBK8GgOTIaP3vZpg3SFTW onR9NHaA++q9KlF9yqybNMrCnaJrG4SKdLLlarfmrCZ4+diBGQ8ThvqVMQ0KNN2VDgx7KGwzYs1YO QreTbqSEOJu49/ceFuC+dbaPHVU9O7stm1lfIsQwIl37ApRvBaCjHB76PJxftG0TKDxiFS8kpqX1l QJ5LvaLeQ7K4lxcfrmIeEY+WMtwHuXyGcCKVFDedrpm5kXX++VTX+UCj/TPhgWb9T5Qeela1cIV3B 3xq1MOEQH96QQZTK9RjQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o52nt-005VBn-Po; Sat, 25 Jun 2022 10:14:13 +0000 Received: from mga01.intel.com ([192.55.52.88]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o52nq-005VAp-NR for linux-arm-kernel@lists.infradead.org; Sat, 25 Jun 2022 10:14:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1656152050; x=1687688050; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=FpKY2DF6TueYC4tmSBCp0oR3CpEMPuEwj+UmJ668MZU=; b=hkIhEnZxESzupOW1puVozWdUhlfm8eUqoKGCSyfDjeRptBidZn0zBNNC uG937syASipLvTPLvh3Dd55QJETnTTTT/rBYMaMX8VIdu6ObKOmKNgfKS GqmOV6InY5utmxo1dMK60DjBqa62AnGPBPiWUVR/dhKJ+a+rMRlo+UxWF bsHcTYXdR5+ic/wW9Vy/9f1U567f61iRZqxqp/p6TR9jzHdV4ptql3Sxe ++55M/gCD2VMOniOaxdemChWqyJw0VZHVFLU0YzZWJsLgXiw9gMYwh0DI qkoCvMZmFcLMlW9Fp146hvobkdsr/nbpiuu4c7WwK4c84OX5NwR9BKc8V w==; X-IronPort-AV: E=McAfee;i="6400,9594,10388"; a="306639487" X-IronPort-AV: E=Sophos;i="5.92,222,1650956400"; d="scan'208";a="306639487" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jun 2022 03:14:10 -0700 X-IronPort-AV: E=Sophos;i="5.92,222,1650956400"; d="scan'208";a="645648517" Received: from selvaku-mobl.ger.corp.intel.com ([10.252.60.244]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jun 2022 03:14:05 -0700 Date: Sat, 25 Jun 2022 13:14:03 +0300 (EEST) From: =?ISO-8859-15?Q?Ilpo_J=E4rvinen?= To: Lino Sanfilippo cc: Greg Kroah-Hartman , Jiri Slaby , ilpo.jarvinen@linux.intel.com, 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 Subject: Re: [PATCH 7/8] serial: ar933x: Remove redundant assignment in rs485_config In-Reply-To: <20220622154659.8710-8-LinoSanfilippo@gmx.de> Message-ID: References: <20220622154659.8710-1-LinoSanfilippo@gmx.de> <20220622154659.8710-8-LinoSanfilippo@gmx.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220625_031410_845340_3A3EF103 X-CRM114-Status: GOOD ( 16.98 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 avoid > 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/ar933x_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 = *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 need 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. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel