From patchwork Sun Apr 7 00:27:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lino Sanfilippo X-Patchwork-Id: 786854 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2133.outbound.protection.outlook.com [40.107.7.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E9491629; Sun, 7 Apr 2024 00:27:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.7.133 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712449650; cv=fail; b=lYcZIXjm+GcL54A6FPQgS8PokYcGbaQuCQB80hGHIDWV4KU0rqyS+ZhL8TjNBt0wgJTMYJOTsgfE1+CscsU33NScJgVp5TBQsrO0ZLQSOxmlGgIf2eBs+lCbOJ0qUaeOsPqgs7T7EJHynY8T8Oo6aeEL3qA2crOaRJsFddw1+6Q= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712449650; c=relaxed/simple; bh=m3+ZTF0QIaURnZx+lJkK1NadXFQtdgF/dzosX265xkM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=bteCdyXfOW9Skso/Fd939xcvktvmrTcgmQR0yOebSTNtySGLXvWZuoL/ab66hwtAQONJuUkFgezDDhHEvi1+lKdVTxwjDu7j1lhlXB3fpred5qtJgTRW0o3NXCfxxo1EJ2MUlSoihWbE1GG9ve+gqPP1v6+jYV0DSXC2u29LoZs= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=kunbus.com; spf=pass smtp.mailfrom=kunbus.com; dkim=pass (1024-bit key) header.d=kunbus.com header.i=@kunbus.com header.b=dqgDA9Ru; arc=fail smtp.client-ip=40.107.7.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=kunbus.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kunbus.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=kunbus.com header.i=@kunbus.com header.b="dqgDA9Ru" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TY5PaRFCf8ctDdnzBAyP2Hrxlb01pNEwsygRhQmYyO+v3Ksfg/dkODrHPhwkCuLrmQ2fWufyIfsJuZsX222KzGFSBzMpTM/JJXZLS71QbaqGSsjz01Kvzn4pQgtgqEqmYxyCYlD1EiCzU0f9jItHGPOptNlrKBRF7Y3GRtm+93oKj0bHEmGgwgOvxqPe0iEXnKDS6vXoCuy6p2PDFi+KHgMDVPcCr0XzmZ7pLhp6kNkgdbyZhPi1hKsrJuD9nfuJEGhYVwb4if0CPcMk1DzbkLO9jTDgBRhZNDmROLwIngaidF/acmYq0h/48+04lPgTXIdIX4tWWkdat1LheiXWHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=m3+ZTF0QIaURnZx+lJkK1NadXFQtdgF/dzosX265xkM=; b=Tox5yJYcC0nfvF3e5HC+SmLB93nrz/Au5A15utnPjS2/liYoPvGKJycdA5p7aDu7tIw59u6k8vUgFWq1erXJOTbXE6nm6RsVbaNLBhS87Y7gaot2UmJuhfimNcy7qbV/pthQ7SWtfzZcfHkrp2dIY5/bl2/ivUOuElUtvc322XgzGXwj05vClhgMFoTcyhKjM46WjJVV+iZ7u/9sziwhNraktx4AWOUszSjYiFJUrfMImTYkWgHn2KKMFhjLNrKHvF9l75Efph++yA7lxS+/GtEfYTseKKDuFwIrOBg1W5bqaxr2fP7hy5g2tR23xq7b7uhI5gJZyl+co8Gx56bAwA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=kunbus.com; dmarc=pass action=none header.from=kunbus.com; dkim=pass header.d=kunbus.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kunbus.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=m3+ZTF0QIaURnZx+lJkK1NadXFQtdgF/dzosX265xkM=; b=dqgDA9RuOfrPMf0xn6f4b+4P6dnHgpJZsogkRyF7Bqk0ErhSGqkVaMPojt0NnQKJR0aoFwELHR/qVDsQc54QfEG8RpJDEnTVKuMLP7dtyPPbFnpcfNWOr2udXHKKdtpQ6FagB0utX5jm3F4EjlQch6xsgIaZXhYe8vE2eENmf3M= Received: from VI1P193MB0413.EURP193.PROD.OUTLOOK.COM (2603:10a6:803:4e::14) by DB9P193MB1339.EURP193.PROD.OUTLOOK.COM (2603:10a6:10:26c::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.46; Sun, 7 Apr 2024 00:27:23 +0000 Received: from VI1P193MB0413.EURP193.PROD.OUTLOOK.COM ([fe80::b435:c513:2483:90b8]) by VI1P193MB0413.EURP193.PROD.OUTLOOK.COM ([fe80::b435:c513:2483:90b8%4]) with mapi id 15.20.7409.053; Sun, 7 Apr 2024 00:27:23 +0000 From: Lino Sanfilippo To: gregkh@linuxfoundation.org, jirislaby@kernel.org Cc: LinoSanfilippo@gmx.de, lukas@wunner.de, p.rosenberger@kunbus.com, ilpo.jarvinen@linux.intel.com, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, Lino Sanfilippo Subject: [PATCH 1/4] serial: amba-pl011: get rid of useless wrapper pl011_get_rs485_mode() Date: Sun, 7 Apr 2024 02:27:06 +0200 Message-ID: <20240407002709.16224-2-l.sanfilippo@kunbus.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240407002709.16224-1-l.sanfilippo@kunbus.com> References: <20240407002709.16224-1-l.sanfilippo@kunbus.com> X-ClientProxiedBy: FR4P281CA0319.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:eb::17) To VI1P193MB0413.EURP193.PROD.OUTLOOK.COM (2603:10a6:803:4e::14) Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1P193MB0413:EE_|DB9P193MB1339:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JcEFOKDq3EnDXNMgzbd64RR/DiZcLk1gLC+hQxacdt/HRt32QRYr/ot9QWl02F1V329AfNCUxTqBaNXVL58yRbLrpSgfc290iSPXrPiVjKoY2zqlS0uts6FhnzZUyfinY5dfuGiemxk96JffKBZwV1qq5Wff6NRIzZSxY9AKZlivsCS5T600uFKOq6NE/cseBW0MI2yJnrvmDvxRIJis6IQ0CXycKs7HWTk7+6qjASL7uFytLd3l2TmHgdDkz5S0ZLD7Y9Zh3h7K05Ov7ojiFH3qXsgFEM1HE1ZF6vEJHPwHNkdpaO8EtZ4/YC3oEdQc6KtTuDULwQ9uKbdzZtWJiJ1uYQ/nvjLy7iBcMLTw3EkYCazjKxWq84ZAaCdC1lHtto6H9SqOpGxHYemQNtJPPiUFnz78ldtyF9aZv9H4ThjF8j9dyX3Vkg/ig5t0uRKO5XzT7YMHdoLccXfPt5jTAW4JjxaFwwp5vsyON3mWKdlkjYIdzs9l8/FaSrt6CmtIBrrbZOUNopl8Aaf731w5Mff6c49hqcPrVapP9d7eP+RZ8EwT/LeqtH+OcoO1JcG63nKc9CzDZqJo+Vqxy47bH+9bgiF+cEDSejD3pOzd9m/YCueCFqCD5EvtfQDy7bDFz8M77ijCN43VzulHB97iz8DNjmv73RXlLNpeRzwbJf4= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1P193MB0413.EURP193.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(13230031)(52116005)(1800799015)(366007)(376005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: +jHr2uRqxSVcaKd1q/PO3BFrVXwtI4PpbCKrklJw3ZrdRvFE0dOc1Cg1Yqg2Y5Z8rzOSa07Bhh+9rpSfmSkJxeXy2/Ha7DCu4rrzj9xjocjgsibS/sk2D9WkUCVGwGcXMVrW5Nqa4F19fZWpPcQKxdbog+9Hi6tIUZiO/Rb9AMfF8sSGzzPul643sw4cuysWQVFpW7KbljOJLwqbaS8zk6MD7v5rKslMuoCh8873+vp5KIE2967/DurVnAxZT9FZQ+yyz+rV5ys0/PmWuuzVbCaT23esJHkg1+d6xbG7yZXlD5WYDOuMC9xHALTFhAS/MtqDzbYhdHJmL7dx0ScmxBNF+EYJPtJvyj9NFn0mphzSrkvOXBbGGNqYPKSYooZhtM/pgPtRuLli7P/nCaO60chjkalk8lfKUnRA3uEDhqLjyVKJZvoDj2jOQ9z2EVI1tfsSw0899Q9RZvtnM78JXA7ChxgYK/e0ZqbbMb/OXIANa3X+iz3LFJgimdNiR0nC177lyGTRdVlR/+wOjzo9vOJO/TuutbKdkbZZMFQPu/c5otZOeAoA1P4i8tExC7BlGxH3+1+HcnvXZZDHQmYq6xCMN34RQ7Vn+gZE8MRsDSsbivmCFOOshbpxxaP3x6By2tE3g2GxMMjh668AlbH5tRGt9ugPCSMGAYOVZ6rGUImh7eqNUneEJn/LQAiXTCid+okrDDvssyroogYsSvaUlJs+WadnihL6droKt4B6VyjlBxWKxDy/B+YgnV4HAyTnnZYwFeVfMvFV25dcrPtSQhKstc92PZiiw+82xtZxtFYMps+9DQehLtst8EETr9bbq36IALHZUToFZKE/pv4KEJO78yZZHO8sof9mCKR53FWFDqD41JHvNK8/w7lsh2HmrsdVBrG7r60SE3UaEgd7bk2anxApljEfz9XPYRo3jUHTnfnW9IgV1zCSy+3O7F9tqXqAOeyurJePNUjpcVVx8tewtru/vZzfJ/WWlnW1Cjujsdo6c3o+MvlBhYHuOfPxPGPKIdkhxpl92b2oOM33eyK8J+t7VGkVXFwSdRP7BiYJ9kQLJvb4CzsK4TYYgyEbgTyqZAr4aeY5HEzaBdv0V9ysg5h4fHJIDhpMaSVCEWTJpNk7iiPHIQi7vbzA19RLX0ZtBANUJ6hEuY+PFRB7r9H/swOmPc+tuM8KOrjnNjTGfr2qBArqokkystWtFP7c9hdKTNBka/K8FnEaz360j2+OsX3wKIUimoRizA0PL5WYlcKS3TPuQIBQpdKFqSBsPBjvj5u/fnHARosC1rJylNNwa/fnX8PWibMVNRhdMhu3R3Z4IwPmZC+X6j3GMYAqKsO4T+M5RPtrQ0CJzR4w4EOY4y+WtQAmTCjow48hMOjWK3G8Y9ZskzWVf1QVhtNxvOr4gXGT6WvMkNCe4kGUAbnpMja4HwCZxms/RIdiDJtu5YPSaZFShhdoWcliPXoU+nrhu5NnY3tAvT5vhNr8i7N8fK/m3AgYZz35yrsGPIIxmPdLlCB22GqBQ34ol6ZYWsy3TnkhTiaAJqGokHLGyOTjr7x5RF79NPO8CK+q3e9baW6+A8SD65351wp4tHdrCTjKWMiI15HFAZB90Ph1bxTnA3AU86hf87a4qU23VFZyQA23tAnQyf3As6xrHQV5 X-OriginatorOrg: kunbus.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9412c2c9-cbec-4f0a-411e-08dc56997e01 X-MS-Exchange-CrossTenant-AuthSource: VI1P193MB0413.EURP193.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Apr 2024 00:27:22.5192 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: aaa4d814-e659-4b0a-9698-1c671f11520b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: dO4PEssGnPqeRdeqI5iqNy1RHyN2hbg6z08S6npcQx1ti4qbKBUezOCR1Yd4wJH7/lOhnNyIQfVvoofacuXKKQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9P193MB1339 Due to earlier code changes function pl011_get_rs485_mode() is now merely a wrapper for uart_get_rs485_mode() which does not add any further functionality. So remove it and instead call uart_get_rs485_mode() directly. Reviewed-by: Lukas Wunner Signed-off-by: Lino Sanfilippo --- drivers/tty/serial/amba-pl011.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c index cf2c890a560f..3d2dac0ebcde 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c @@ -2708,18 +2708,6 @@ static int pl011_find_free_port(void) return -EBUSY; } -static int pl011_get_rs485_mode(struct uart_amba_port *uap) -{ - struct uart_port *port = &uap->port; - int ret; - - ret = uart_get_rs485_mode(port); - if (ret) - return ret; - - return 0; -} - static int pl011_setup_port(struct device *dev, struct uart_amba_port *uap, struct resource *mmiobase, int index) { @@ -2740,7 +2728,7 @@ static int pl011_setup_port(struct device *dev, struct uart_amba_port *uap, uap->port.flags = UPF_BOOT_AUTOCONF; uap->port.line = index; - ret = pl011_get_rs485_mode(uap); + ret = uart_get_rs485_mode(&uap->port); if (ret) return ret; From patchwork Sun Apr 7 00:27:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lino Sanfilippo X-Patchwork-Id: 787133 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2133.outbound.protection.outlook.com [40.107.7.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EE06D1103; Sun, 7 Apr 2024 00:27:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.7.133 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712449652; cv=fail; b=evg+a0dI7p4XpO1MbttfK1Uqlvp7w5TS2IWozbEdI7Qvc0ZekUBO2eHB7/WxbVMwIyu9nPUDPptCfnBaqnzM9RMuqZSh/YlB9NWzl2RjO+EoSD2EdPHn31w2MnX43czuzhb1mOsPVRW5+OBrF4ve2dvy8aZP9rKLeCjsMD3LXP4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712449652; c=relaxed/simple; bh=jsehjd0bixA/6NCwTdCkXfv+Ox++nQrTZnyse0jMm2o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=nuEDoeTT0P5eNphdaCEzcrzEXy9PZeLPzKLFi83Kem9x0DG20qV5jRlOsJTbh0wOntKVzn6fNW/YveH057SDmJ2bsbTbH1O5ZqvP9JJo5Hdf4bu/LMPlcoEAKlDhcuYOdK7foXiYF4xgGD4rsCHDMYghOfQT9PlbsBfVHEbQbAU= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=kunbus.com; spf=pass smtp.mailfrom=kunbus.com; dkim=pass (1024-bit key) header.d=kunbus.com header.i=@kunbus.com header.b=RQIcXP2G; arc=fail smtp.client-ip=40.107.7.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=kunbus.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kunbus.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=kunbus.com header.i=@kunbus.com header.b="RQIcXP2G" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ze4ccIIQighsE1FJmiZz/nEDHOva8Z7uLWKVG0NUVh68uggVhmViqZkDBNEM6HGtdwxfxdLgc78YMRIOJanDyLpsiaEUlIihMOE89pEjjhdQMdV0nMQLU6dHgBtsuyDe6rzqBgY2Y/dv/aP45ANEMf10WPVQUEC0ssRY/q8YI9cRkNi0ZOQMzE0zKvuxT+vQJ+15EWUlwnUW9m9Zm8QHLOZh5scs/jKJcPCsS5xezzFVrI+dfwTLPlsO3N4wG9teEQnWC3ddVIxh577XaeQAEqwLfXd8S207vdFNDS8e3mzFaSZfuReCR8b3iXrS4aGW4uylc1vq+aujyQMMcGTvVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=jsehjd0bixA/6NCwTdCkXfv+Ox++nQrTZnyse0jMm2o=; b=S93xtDrbbYkvg8oxsqDDsn5PJPjTJbZ+XKlf3hsjKpRC9++F6oqIJHlWF2nSkGMrzP5Pn7JggxjeKilN7FB6dKByV90jPtf2oV/AsDXDzvQl+XGqAjWrSxFG8VbSTD1QeRe/vD+kh6h31L6tq+FpNhyvwWQhunDAb6rx0HTvS6BpIy72LjSLAHLL4qfnpQQj2Snqg6Qj+VglPcrbi1X4pTkn4uT223GSHQ+oD0kFpeJx24Q2zeD9qM1lTEZ415KIAklhb7suihMtsAaS2jzOdRiVWCNurL/Pv1K1Pa7tJQXelcTZhwqFBWcqhe55tx0L7zxBBZGIHAZC0v4/iQYSAg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=kunbus.com; dmarc=pass action=none header.from=kunbus.com; dkim=pass header.d=kunbus.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kunbus.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jsehjd0bixA/6NCwTdCkXfv+Ox++nQrTZnyse0jMm2o=; b=RQIcXP2GXFQl6oZAsntBJrt41cnGEy8P7XmQjZkKsaUUyaD1HJzIiIhleGn8QKXnSIZkwLWVIy7ed7GVUdoUs7iawFCNBON1EPjv9Qze6fHDSa/bd2u4DbWBitQxgmM6kINLzxL1FaoYnT+xYkATXKVshTuSzkwqtFD6Y8cMfsQ= Received: from VI1P193MB0413.EURP193.PROD.OUTLOOK.COM (2603:10a6:803:4e::14) by DB9P193MB1339.EURP193.PROD.OUTLOOK.COM (2603:10a6:10:26c::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.46; Sun, 7 Apr 2024 00:27:23 +0000 Received: from VI1P193MB0413.EURP193.PROD.OUTLOOK.COM ([fe80::b435:c513:2483:90b8]) by VI1P193MB0413.EURP193.PROD.OUTLOOK.COM ([fe80::b435:c513:2483:90b8%4]) with mapi id 15.20.7409.053; Sun, 7 Apr 2024 00:27:23 +0000 From: Lino Sanfilippo To: gregkh@linuxfoundation.org, jirislaby@kernel.org Cc: LinoSanfilippo@gmx.de, lukas@wunner.de, p.rosenberger@kunbus.com, ilpo.jarvinen@linux.intel.com, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, Lino Sanfilippo Subject: [PATCH 2/4] serial: amba-pl011: move variable into CONFIG_DMA_ENGINE conditional Date: Sun, 7 Apr 2024 02:27:07 +0200 Message-ID: <20240407002709.16224-3-l.sanfilippo@kunbus.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240407002709.16224-1-l.sanfilippo@kunbus.com> References: <20240407002709.16224-1-l.sanfilippo@kunbus.com> X-ClientProxiedBy: FR4P281CA0319.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:eb::17) To VI1P193MB0413.EURP193.PROD.OUTLOOK.COM (2603:10a6:803:4e::14) Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1P193MB0413:EE_|DB9P193MB1339:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WHSABjwPordocPx9k1xwmKxGK0Nl872a9RLe5NhgshfaL5oGtuwAy5N2xnXcbu0NI6BuN7a+Zf9TMCDfyRHwYgH7PH1WdxS7Yw4AQ5BMq6cUGHQTLtBeDX0Xlr2BrGcZZgyET1mMfx/YgiK3ozQQ5MppTwmgMUJZF4JHf4JpzcvD6dl7MRQA2h/pBiaSSAyKp9TEDBdNvkBObvizeVerD7FuDQ5G6GyrJOcOUqeJPkTcJg9DGY1nkj1mU9C1dqwAXkkdvKRavmZMytlxxtaN/JLU9uuL9NEs7t45BH2qfB27x5hSgoEi9h3BbgIQJq1Bqdw9xxxtQ289Dqd2Ei53zpf2N6ljakaW8fKSsGx7o9MVlWIzAopCscG2dWo1CS97gsXIPbwgb3Wp3scz9K0y3zY9JbUsIHgKI/TUFgyQLJ0Q/9z0wUTUds2B0bS7BUXSlrC97IHpB9YJu51xbLysjep0Ju/3dzwRMck34rF3+GxybQo7pJ1le4FmgKSE0dUi6H5pEtVOi9ufzE/WMaiec2tN8U+CG2MUcMNgqrN0LHlj8C407C602PBQzk1w++8nhjAQeSmUNrpBlaD5bv1JiWUrrSwOgZhGTIEnU2GhKdM+D3YtfMKbn9+AINw04+e0/tnAUPHm0TlaTqLTa4aF1G5qIGON326DkkKJOnK7FRo= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1P193MB0413.EURP193.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(13230031)(52116005)(1800799015)(366007)(376005); DIR:OUT; SFP:1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9ntp9O/vEFSD77bh+yrHufD84X+mE2Ya9vz4ybqYjGVKG8DUS6ogJIa9s3dlMNeNmQSbvjmnrrGzGP1iw9SNT3W0NDHwQ8p3zjBWj0SWXUqluTA3mmxJb8qChj+XaMsW6Wh1hJP6KWx3ejtFAxARDFuuuScRxjV4Wg2Q00HCZoY+LjtoS1T/1Wkvo/VNaJZwLHSX3km3f4ef+kdBhHDG8xa1Nioej/VH/3OItdvIgp+ezf7DtsZy9KQhQOXgqVObTDtCJfYJGj27fG5NgMTdnKh6emSZYDxKZbEClFl6hiwq4An73KzRSv4I3rS2/xhrrukcnWqd2cqhra7rFgNK568VVmmo1XBGJ4Heboi2p4lhbuRWMYtSSoUdjG3HVYoozrDSfrf4uQeovtPqTfhyPysa+P6/boHVKdOOqvPcRClhozSze66VmXPwBfZP9pdCjrUJemE5hYHZRN3rz/KvGqOyuFu6bGaUFAHz7u/SV77X1RMHnKQsaLQB+AlqkgL+FAcCf2tVJ1rUBKXmGF9v93ZTsJA0Ot3TN4x7JTNQU341wmjg/o4bt2TIokm60t+0dbqa1tXQ3ArFJEJpVWvEQuqIVNplZmG/Su6TTDQwFCiYIK/CHu2odIrv2PTeWE6FpN X-OriginatorOrg: kunbus.com X-MS-Exchange-CrossTenant-Network-Message-Id: d57edad2-4d3e-4a54-f600-08dc56997e48 X-MS-Exchange-CrossTenant-AuthSource: VI1P193MB0413.EURP193.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Apr 2024 00:27:22.9576 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: aaa4d814-e659-4b0a-9698-1c671f11520b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Rq0iOUV2G96prJPy4cpAUhhJ8X0MpBTrSvMBiQj9C53TgaabP/J8vnfJx97Ue8tYkcTe/Uim1LM5xuM6mdxAMQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9P193MB1339 Variable dmacr is only used if DMA is enabled, so move it into the CONFIG_DMA_ENGINE conditional. Signed-off-by: Lino Sanfilippo --- drivers/tty/serial/amba-pl011.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c index 3d2dac0ebcde..349005e6ab9f 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c @@ -256,7 +256,6 @@ struct uart_amba_port { const u16 *reg_offset; struct clk *clk; const struct vendor_data *vendor; - unsigned int dmacr; /* dma control reg */ unsigned int im; /* interrupt mask */ unsigned int old_status; unsigned int fifosize; /* vendor-specific */ @@ -266,6 +265,7 @@ struct uart_amba_port { unsigned int rs485_tx_drain_interval; /* usecs */ #ifdef CONFIG_DMA_ENGINE /* DMA stuff */ + unsigned int dmacr; /* dma control reg */ bool using_tx_dma; bool using_rx_dma; struct pl011_dmarx_data dmarx; From patchwork Sun Apr 7 00:27:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lino Sanfilippo X-Patchwork-Id: 786853 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2133.outbound.protection.outlook.com [40.107.7.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F0F8C5223; Sun, 7 Apr 2024 00:27:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.7.133 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712449654; cv=fail; b=rbkCqwyPNFBCwISTsEBM4WQq9rYlJJI/YakywV0EvJMAJYd5sbJCafmkVzbdgXLZd/A+0/oDXxwvFwBF9fK2NGxyn4fYpUlT7cFZ4Fa3vuJUNsYh76dDdSIK/MvcMmr1Mx4rbmm2BDJaEKKhZX2Ibnx+9xNygGWMe7d9DIdbzZo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712449654; c=relaxed/simple; bh=Rr9NZCiaKnacCzfVQBb1m07cWvZaVYxn1gopvjw3YJU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=fyyHDU1l4xFFu4vRnEHEg8VAzR+6mS+6cEaXQNpwZ5qBI+Q1HrJ1UoqNOOCOuqk6klPlopD3iy2TRU87GlTEugHnc4hqUPPc3luDNv4CAcBrtpwIZ37E1MyGS6pRcQ+Z4wxEowy14ntDDrGiB18Dq8LSTz1RnIvaoJLkoAk3sow= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=kunbus.com; spf=pass smtp.mailfrom=kunbus.com; dkim=pass (1024-bit key) header.d=kunbus.com header.i=@kunbus.com header.b=lL7/rb1j; arc=fail smtp.client-ip=40.107.7.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=kunbus.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kunbus.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=kunbus.com header.i=@kunbus.com header.b="lL7/rb1j" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Kn5Wnuqjzi7W+NpuiECOw6efvaXXd41hY4RQK5ANNBg+xtjtrgyVErzAGK8PCM8xUthjWTN2+lD9Tsi6hJDidsykBnqrCb6B4+oy2qHLDQ6L0x5qX1BmkL2nILGq0dxcaxIIBYtV1av1tU1eRMCKXD3tPfRt8cJWFoR9m21uHFrC+EoNmWTRrfkKFrfjWEsnB8ZqrsposqG3oNv1kWMrGOeJpTZq9NrkGOgCfbnXAq8JWk6V7PV1W9XQDVc5jFlLtPgM8FAs4dsI27yjBKnNG3Dj6p3d/cJE2LAprUPqHRKB7LYFBPDbiEv5iT3DOh7PC/K/WA2PvmLFKBwuY7Rinw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Rr9NZCiaKnacCzfVQBb1m07cWvZaVYxn1gopvjw3YJU=; b=OVYWrcvjRgLBnsUUjHXHvEXzfR200oiwu+Ss+Ja9jiselUuYawBZRV80XCH81lLA2h4SAF7ioqjXAc9imgMWGDOIh6VwTaHNI7H/4WdVlBBsH6J8N2qtl6y+NFy3JHFZGzJfL2MDlXE1dO8KtWfEVF4oqU1Y7UUEx8A5/SxCV5Ng+3g/h4hxxA8pwLGCr6BfCVSAFkF/24Qigbrpyfxv5J9+oPV0B3leedcMsiV3u6mY3ASPbXqz73ToZB+tJlkKvtgxvvscPOWGZhx5TEpQLSzcp2+NGWPB2rLORiTpP2EutPcLUT9orqL7rNqkI1Wq3oeBQ/NGVyVwgWEif5vGAw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=kunbus.com; dmarc=pass action=none header.from=kunbus.com; dkim=pass header.d=kunbus.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kunbus.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Rr9NZCiaKnacCzfVQBb1m07cWvZaVYxn1gopvjw3YJU=; b=lL7/rb1jkGvFvY+uv1s6L54u5KtzKW9D2hMsp378/5KPMNTVObQqTDHATnHGp/hG7EEcBfzJxXLlcRVyBWm3JxmwfKTkOfLOmJHpYQL7eBSwx2meDfX6sPxf19Hm4bjH+Bz/sDW3P6unoVFcXBlC/tTuaj/Lzmv00ylPZLBh9LM= Received: from VI1P193MB0413.EURP193.PROD.OUTLOOK.COM (2603:10a6:803:4e::14) by DB9P193MB1339.EURP193.PROD.OUTLOOK.COM (2603:10a6:10:26c::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.46; Sun, 7 Apr 2024 00:27:24 +0000 Received: from VI1P193MB0413.EURP193.PROD.OUTLOOK.COM ([fe80::b435:c513:2483:90b8]) by VI1P193MB0413.EURP193.PROD.OUTLOOK.COM ([fe80::b435:c513:2483:90b8%4]) with mapi id 15.20.7409.053; Sun, 7 Apr 2024 00:27:24 +0000 From: Lino Sanfilippo To: gregkh@linuxfoundation.org, jirislaby@kernel.org Cc: LinoSanfilippo@gmx.de, lukas@wunner.de, p.rosenberger@kunbus.com, ilpo.jarvinen@linux.intel.com, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, Lino Sanfilippo Subject: [PATCH 3/4] serial: 8250: Remove superfluous sanity check Date: Sun, 7 Apr 2024 02:27:08 +0200 Message-ID: <20240407002709.16224-4-l.sanfilippo@kunbus.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240407002709.16224-1-l.sanfilippo@kunbus.com> References: <20240407002709.16224-1-l.sanfilippo@kunbus.com> X-ClientProxiedBy: FR4P281CA0319.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:eb::17) To VI1P193MB0413.EURP193.PROD.OUTLOOK.COM (2603:10a6:803:4e::14) Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1P193MB0413:EE_|DB9P193MB1339:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5GUoSE/nLAgtNbhJFmwl/BhIufyik0dz1TMpGixRLY6o7rQ47/stnE/P6ehKS4Sc0icxgETPHzgkeuwRIT1jNCyMJ2JJORqN2zL+gZNv8CIWqlAAziJUObDcKltaJSpPgY5EcOulyOyQArs/85GRyImVng1qUebyE7Zj25HT0Z823mPfG1aMIYwvleyBQYwTlR/vN4L1gKC/hY55YSf55LRNZWacfjg45OKPJMUIfLaMcnLZzdCEEBn2hL790EtuaoeVgc7bATCjj5AM6Y57CN/Q/RQYa+SJV+7zqDmhapXLwHAgSn4hSyqmjRiqRrhkLmcxYNs3cQASEHavfov+QjIMeyExiqqWmJrjyJzTrKmnPYH1gmPuaz05v/I0KYAnvxNVU1oNGi7qHzfiT8OH0l9C13SXUCNAvWaa47X3eW3QbeyYETUj588i1yMk4CvR7blG3o3kB+V0UnzEX3jm+EcVGcmxnef7iwCOT/K94YGbYwcFeka9Fwu5RJqqGH+9epuGruJ3a5imotqljadZG1k/eXpbAMi7H9HHEfT/JgTqMYaUD6xD14NmKCFNlJQPY2RLAw9ySxogldPaPJRPgtw49qeTZKmci91SzsquJeSxHVz286Ubh5fhz1F4ukpS7xwlCCTIwrBZNoa5g0cGrKlqBqNNsOeZVIfJRGYPWXE= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1P193MB0413.EURP193.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(13230031)(52116005)(1800799015)(366007)(376005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: DaTzPY0pSHagPeuKNZykFRIJo95diRlB8BSYbAnQZjoERcLObDPuJUsLfO/dm3zDhwmyrXtWcWe9bTgIhLXiQFuZ0niwMmGiEuRbpnwbHaJ+bA9rKVGBnX56j3wqOZcOoGI9hfVWQBtR+bfpIZjIFXdYsyEVyMN2CNGwCiKogGRVRvl2lPC2CClE1UNSK8NvRfnBS+Lp9zRoFjLzB1apasNHba7hjJ/U9fpnXkLhMXb92kF+Kr8b3vl3lR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IrXSmCvG4aLalPUAZLB+gxEmsbtWOBokJ9+ERheaRzZk9ZXQtPBoKANcgENy1YJGZxQUJzGnQUxZWSSx5rdkMcrjEmtpp0fvcG6nmHazfb6KaPqasJ4dSrStDEHcM/ZQPGpNd3TQ5l70pvDC3/Yj1B2cAZuyTy4kkCcTe+hBwbhBzo47Lu9RkqSqfkCJajOQLIR4Bps/vHtH7bETgLRxFR50Q91pkgBpyP+0GylDQNZ2UBEfo5rbuaTRaF6vklMyoctC9HxhfOCDUVWQiScmR8twx9fitx5eBK1yyQws/sOuLzpYYdps2rnZMJGMBr7FqPnzzmiCpd X-OriginatorOrg: kunbus.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7120d938-fb79-45af-ebbc-08dc56997e8b X-MS-Exchange-CrossTenant-AuthSource: VI1P193MB0413.EURP193.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Apr 2024 00:27:23.4366 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: aaa4d814-e659-4b0a-9698-1c671f11520b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: HbYaw1kVWIHexVWyb8YSONdMROPU+NO7QDcAQlU0rY0xfLjQ/FM5qof0KlR4zM8bPoTki82dDo9RugVgX6IzQQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9P193MB1339 The serial core already checks the RS485 RTS settings for sanity, so remove the superfluous check in serial8250_em485_config(). Signed-off-by: Lino Sanfilippo --- drivers/tty/serial/8250/8250_port.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c index 8ca061d3bbb9..86ab6925738a 100644 --- a/drivers/tty/serial/8250/8250_port.c +++ b/drivers/tty/serial/8250/8250_port.c @@ -616,13 +616,6 @@ int serial8250_em485_config(struct uart_port *port, struct ktermios *termios, { struct uart_8250_port *up = up_to_u8250p(port); - /* pick sane settings if the user hasn't */ - if (!!(rs485->flags & SER_RS485_RTS_ON_SEND) == - !!(rs485->flags & SER_RS485_RTS_AFTER_SEND)) { - rs485->flags |= SER_RS485_RTS_ON_SEND; - rs485->flags &= ~SER_RS485_RTS_AFTER_SEND; - } - /* * Both serial8250_em485_init() and serial8250_em485_destroy() * are idempotent. From patchwork Sun Apr 7 00:27:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lino Sanfilippo X-Patchwork-Id: 787132 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2133.outbound.protection.outlook.com [40.107.7.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E90308F4A; Sun, 7 Apr 2024 00:27:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.7.133 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712449656; cv=fail; b=piEaxkN2zKTYApPNQ5kOLS+vUIt3bN3J78jCLrJtIB3yArAjCxaHMsR7j8VTNiT1eKt/Z2GsZFXVEaMl5liU7D2oqOCP58IPBPz8OlVl3mJ43SSI5aGitoFtc79+tPNX5j3fdCzpqUUtgUbbEQRP/BdWE5yPMBIl8aIsANVMkpc= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712449656; c=relaxed/simple; bh=mku60eiZrlwILUYPIhJ1rv/hgxY6mxV8UellxrzSluM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=AhNknTZ1LCcY5L4Z4cMIfCgrvq6A9JKD9fIoZjzvrAXpbrCTfyzVbTaqIAKMCF+GZ6peDbi5w9Wc1nV6EMyoJ9Vyv7EOB6xeT+1djxRU8qQMSOyqJp0S1AXq4nCjxKF+uALCwia1FSDqi2nLkiHuWwzlD0wB0KwK7qPM8TJE/Co= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=kunbus.com; spf=pass smtp.mailfrom=kunbus.com; dkim=pass (1024-bit key) header.d=kunbus.com header.i=@kunbus.com header.b=lYcEeDN5; arc=fail smtp.client-ip=40.107.7.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=kunbus.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kunbus.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=kunbus.com header.i=@kunbus.com header.b="lYcEeDN5" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nRMTNb8n2PkYkuk8kCVXlpoYOvwfwNud8HtWRqcA0VJrECUYyX9omT6dalRvjITFS4jZ7PCfsOCiMOgD48yy50+gAeYmenFtw1rMBME+WLVMFNbpD0PiaFXMQf65YIjUihXXPNJkVFJyIJcFXMvWRSocTbaCUNA8sE3EPS1wJU78cemnJIgmYRQID0/GSoBj8UUdeg0AA6xggyQSdzHsexd9Lw5KdhgkZgYnWGJDK10aQr10gijmuAbs9GRrSUF9jDkNLjkl0Cko3x10FBZpSGaUKu45IvP/zxkQ3vJbWwN+H57ZnHYoxdmIfoRiosbh7eegn9oCWBgsAEucVuhQKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=mku60eiZrlwILUYPIhJ1rv/hgxY6mxV8UellxrzSluM=; b=MiFyKrF7UDaB3qc10OYZVRZM22nRJUID1q0m8DcydYu95oQ1fUOfyLaW6ujlQc+YNvQ47B/ahGUIPmZcf/3KI6GnoE12PTeIead7f+UDWSflWbOTY4KLb6H8o+qUoLDVaHEbEhxMoW3xwrO3HCePyJEJRNPqatTxKWeEcBXGynKQIU6zkykMjqmQ+wajnuvWxwr1SYbXsaAfPy5EYIR8cI1ZYmbxXs4gb+cw/4axGEXGB7588ew81bJgJiPKsjyYTUEf31LRaBfK1r9xEft1v7Z2NVEH9Hnneyf/ehzFWXUPv3sPq1PVwIUPazz1Ns/TmMaQT5Raj5avAdCk7QzxFA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=kunbus.com; dmarc=pass action=none header.from=kunbus.com; dkim=pass header.d=kunbus.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kunbus.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mku60eiZrlwILUYPIhJ1rv/hgxY6mxV8UellxrzSluM=; b=lYcEeDN5EnAT5GRrcAY5nCxGICGwG3sb3IvZSseFwuXUPgPUonWosdqp8t0fM9UYWv4+jb7RhjqLnLeHOD0WQ+Wd2l0V7IpDrUNF74iFZ705xZDLx4O7F5NeZVLvEKzeLMllVTSLJaMwseJcoK/AufKp+rnnUWZlTO4RbkCYuoQ= Received: from VI1P193MB0413.EURP193.PROD.OUTLOOK.COM (2603:10a6:803:4e::14) by DB9P193MB1339.EURP193.PROD.OUTLOOK.COM (2603:10a6:10:26c::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.46; Sun, 7 Apr 2024 00:27:24 +0000 Received: from VI1P193MB0413.EURP193.PROD.OUTLOOK.COM ([fe80::b435:c513:2483:90b8]) by VI1P193MB0413.EURP193.PROD.OUTLOOK.COM ([fe80::b435:c513:2483:90b8%4]) with mapi id 15.20.7409.053; Sun, 7 Apr 2024 00:27:24 +0000 From: Lino Sanfilippo To: gregkh@linuxfoundation.org, jirislaby@kernel.org Cc: LinoSanfilippo@gmx.de, lukas@wunner.de, p.rosenberger@kunbus.com, ilpo.jarvinen@linux.intel.com, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, Lino Sanfilippo Subject: [PATCH 4/4] serial: ar933x: Remove unneeded static structure Date: Sun, 7 Apr 2024 02:27:09 +0200 Message-ID: <20240407002709.16224-5-l.sanfilippo@kunbus.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240407002709.16224-1-l.sanfilippo@kunbus.com> References: <20240407002709.16224-1-l.sanfilippo@kunbus.com> X-ClientProxiedBy: FR4P281CA0319.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:eb::17) To VI1P193MB0413.EURP193.PROD.OUTLOOK.COM (2603:10a6:803:4e::14) Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1P193MB0413:EE_|DB9P193MB1339:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WmteaX2mFqNP2xyP0Nu+KRg8JLZ5jmqe/fGLLwCHJ4b3QvTyG8XpqD9KAD/3H/0rYpJ6nHk3ZLrqS6R/7idieIYy1w28AGZVGp1Y8SWZX4sdtkqe18D6ztM593UUhd/l9A/L9I+jhd6bDNi4SdaOfKzyNRQVTLBT8g8RgYlm4U+mhVC/fPi3fRv7qHV/+gZgOekn5z6rR6BFoA5Cxsy+nUoKlGcAuXvRiDrLqCvQRsN2Ggn4DHCMYqrzU/XlIgiBw1qvkUECHY7eWnWuNptZD5Jl3fsFWb2e1uwpMawELqtqlGhUUmTQA6vXF8uqjIOCLT799rOw0jWbLNcwPg245zwciOfgrjtdKOugJzAVCoBa4+tJyUl0IApAdP4Qp9HMR149fVJboqbl+yjdPGuiBm7E3fXgCNoNhiCs7ZZBuI4lDYqlRciN8bR8N4BCW4RMGaqHXfmAFknH0Fgtsi+W3oVnOj/RI7pZJHlbjq48VrgSLgXIoPvP94YR824bGEoHGpU4NmfLyMgaIzx7pop7rfnJazsUyZd7omIsb5PMJvdzKeV3dVQGgDjUuOSwSPefaabgpC+ch3vVoubKzVLTrbLBbOV7f4BKmc5gmWdVMvZw1ABK/f/RPU8XS2YQDBC6+QVjVdxpHUzZmDyj+p0NHD3ukY6eaDPgqfE9Wqw5scA= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1P193MB0413.EURP193.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(13230031)(52116005)(1800799015)(366007)(376005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: zqEu48MgsWLKrpRrKEagMYqsxRTT2Qi9PA+678Bgrk2gdj/Hx6bGBWMeDYEpj5Z5ig4xoj7xk2+u2ylzsnXcGaTyySiLhPPNnOu+7DDoeeu+35QOfDM7J6lV+9VqGm/Y1sEPa6yXVc9k+sRhTfdOSZyvBWx3asZUUtSkn9jpjmg3ODRKRiRcdL3esx7tA2oMqV205zj789eJdYwRX/uVq4ylrt3ByDt0zkQhgA90ab1KSRj1IWFUwIHBhFE6JnBIbVn5c5co9VZr6pKB7aeGMeLB1rXFhFi2+J0+WdFCUce0cJtSHIOgp3oaebf7gChg/8PlJPeQ19KJGspztFEdyj+T7/wJdANYxwgTY/X7Au3jZEwa3uj0RLhkNVK/lntDsrrfRaUmUYq9XnboJRmYExZEKVDXIojDdepMIMLEHriR0iYAtOryLeCBB+X+kfssuK2l+8grPNPykG7mFcLryxCgQENVpTvP7fPGVpA2sbQVSm9vTx2R4/RWZWc4n0R3KMf9v2UoBMq5uWdtJslZ5V38q8UV9bjbCEp9hBMLynS72iwqFg01NJweCy/wM1+CQJ3CjX2IkDulFITTgcpR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x9ED/b X-OriginatorOrg: kunbus.com X-MS-Exchange-CrossTenant-Network-Message-Id: 27dff2e3-7bb6-49b5-22bc-08dc56997ed4 X-MS-Exchange-CrossTenant-AuthSource: VI1P193MB0413.EURP193.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Apr 2024 00:27:23.8632 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: aaa4d814-e659-4b0a-9698-1c671f11520b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Tz9noLmjXEAJ4Vamt9ERBseMcntCl/KZUUengqyovaoD+i3sgazoZ6gj8Pw91M6KwfEKXX2+DRzeYCKK/C2imw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9P193MB1339 In case that no RTS GPIO is available do not use a dedicated nullified serial_rs485 struct to disable RS485 support, but simply delete the SER_RS485_ENABLED flag in the ports rs485_supported struct. This make the structure superfluous and it can be removed. Signed-off-by: Lino Sanfilippo --- drivers/tty/serial/ar933x_uart.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/tty/serial/ar933x_uart.c b/drivers/tty/serial/ar933x_uart.c index 8d09ace062e5..be9ea988d136 100644 --- a/drivers/tty/serial/ar933x_uart.c +++ b/drivers/tty/serial/ar933x_uart.c @@ -699,7 +699,6 @@ static struct uart_driver ar933x_uart_driver = { .cons = NULL, /* filled in runtime */ }; -static const struct serial_rs485 ar933x_no_rs485 = {}; static const struct serial_rs485 ar933x_rs485_supported = { .flags = SER_RS485_ENABLED | SER_RS485_RTS_ON_SEND | SER_RS485_RTS_AFTER_SEND, }; @@ -795,7 +794,7 @@ static int ar933x_uart_probe(struct platform_device *pdev) up->rts_gpiod = mctrl_gpio_to_gpiod(up->gpios, UART_GPIO_RTS); if (!up->rts_gpiod) { - port->rs485_supported = ar933x_no_rs485; + port->rs485_supported.flags &= ~SER_RS485_ENABLED; if (port->rs485.flags & SER_RS485_ENABLED) { dev_err(&pdev->dev, "lacking rts-gpio, disabling RS485\n"); port->rs485.flags &= ~SER_RS485_ENABLED;