From nobody Wed Dec 17 23:26:29 2025 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) (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 36DF6153595; Thu, 2 May 2024 14:46:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.19 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714661197; cv=none; b=ETSa4JP2GZg51qyggVYHymBy666BGxkC8q8Oz/zPUjOxlt3OI4Oib+vwAzxDro2ViksJ23eDSoAG1MJVuVLDA4hKjbGKjIxspPGDu48TtNOSTILhWt8VaxdGrdUE1W1GHvjfTEIaCCFJ27NOaJAyf6PbvOJIYUkdAI2CFevEVYI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714661197; c=relaxed/simple; bh=t4GElT9Cf8GLEDUkp9KzuLxTLCrrLC4H8X0vZ1KYv78=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DZ9joTKHao51bOntg2faZM4KNy2xoVolTa67D5mGdbIj8/HPgFhD1KCW37HjYI0dbNZrcjHL+bVdROwJDxVBwJRfv8MAi2LmcRW33Mms4NVnKA9Cs6r1on1pd/ZowQgLUC8zXiCo1zbCnVPw9R7yhnU6hV64XqFb0aKD4zavGW4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=ThqCYQDF; arc=none smtp.client-ip=192.198.163.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="ThqCYQDF" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714661196; x=1746197196; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=t4GElT9Cf8GLEDUkp9KzuLxTLCrrLC4H8X0vZ1KYv78=; b=ThqCYQDFUOlrNiGxLtw33KUmNRnPYKyMnMiKj9ewXTUUG17m/ULFle7A kbut+qZE7qW1jsQKSmm3N1/LNUVOnwaq9hG8KR5VEkWj0CqgYuCY8l343 JzHj15LBz0izDtkWhg8mDVA9wvhm6BimJl4jZncB/p7HjnwepRtvluH/X Fi1JuyKyh+kom26fbSq7MKf1NYFzJR4WYHrO0O1skpI+6QE4Zgy0UsGw/ BF7bn9rsy+uszjM99s5rpCrGAdkWdti7L69DLVrTyVOSXwVaxpvQjMbXh kX0W7vYS3iioj6lu9Y9jmlpEc4nnTtdFKUZrJVqnAWqxkPVugO/GruwV4 Q==; X-CSE-ConnectionGUID: mQZsRzl1TtWPFyU4JW49Ng== X-CSE-MsgGUID: vKaX7NizSpmLJAmNTM7hMg== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="10306067" X-IronPort-AV: E=Sophos;i="6.07,247,1708416000"; d="scan'208";a="10306067" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 May 2024 07:46:33 -0700 X-CSE-ConnectionGUID: vRzOV0x3Rh2SfIeOYYrczw== X-CSE-MsgGUID: bPR2IJ0GT2Wt+HPIdtznag== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,247,1708416000"; d="scan'208";a="31632826" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa003.fm.intel.com with ESMTP; 02 May 2024 07:46:32 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id C03DC161; Thu, 2 May 2024 17:46:30 +0300 (EEST) From: Andy Shevchenko To: Parker Newman , Andy Shevchenko , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Cc: Greg Kroah-Hartman , Jiri Slaby Subject: [PATCH v1 01/13] serial: 8250_exar: Don't return positive values as error codes Date: Thu, 2 May 2024 17:43:55 +0300 Message-ID: <20240502144626.2716994-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240502144626.2716994-1-andriy.shevchenko@linux.intel.com> References: <20240502144626.2716994-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" PCI core may return positive codes for the specific errors. There is a special API to convert them to negative stanrard ones. Use that API to avoid returning positive values as error codes. Fixes: f7ce07062988 ("serial: exar: add CTI specific setup code") Signed-off-by: Andy Shevchenko --- drivers/tty/serial/8250/8250_exar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/= 8250_exar.c index 5e42558cbb01..9930668610ca 100644 --- a/drivers/tty/serial/8250/8250_exar.c +++ b/drivers/tty/serial/8250/8250_exar.c @@ -1162,12 +1162,12 @@ static int cti_board_init_fpga(struct exar8250 *pri= v, struct pci_dev *pcidev) // Enable external interrupts in special cfg space register ret =3D pci_read_config_word(pcidev, CTI_FPGA_CFG_INT_EN_REG, &cfg_val); if (ret) - return ret; + return pcibios_err_to_errno(ret); =20 cfg_val |=3D CTI_FPGA_CFG_INT_EN_EXT_BIT; ret =3D pci_write_config_word(pcidev, CTI_FPGA_CFG_INT_EN_REG, cfg_val); if (ret) - return ret; + return pcibios_err_to_errno(ret); =20 // RS485 gate needs to be enabled; otherwise RTS/CTS will not work exar_write_reg(priv, CTI_FPGA_RS485_IO_REG, 0x01); --=20 2.43.0.rc1.1336.g36b5255a03ac From nobody Wed Dec 17 23:26:29 2025 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) (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 9EDC4153BDA; Thu, 2 May 2024 14:46:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.19 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714661201; cv=none; b=egAaDwjAa331fZO7TY7HHBARR3rB+tFVtEJeAWPyAZNAk/ePxutfHTbLsQO44Zyb8NK+4ij68zSKZcRfjwAgBovg0GhGXYLGCA7J0qoHjMbZYc7F1gOSOCgQK+YP6rGOlckKnvArOQBky0z0iZscWamTJmBgcgr+4sDOkoY3plk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714661201; c=relaxed/simple; bh=gwi0Y1q+5n0D0n3Bzr328+LnxrPKT8VdPbVuxfggMIE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=iqNKCBIsjFkhcqPmMt+WDETeSUlyTk7FImHDGcJC3rErlnh8bNuWeyQiKLV2tZwK1T7YEfINRhSFt+oRUfudgbNv/xTdwQ+JX4G7w6jbihnE5/roDx3ZQxaZdMDzA8fSwCQ5yE+gdy6a7jolp+jlne/VR9+2UFlDGX/W9v2HCOE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=YHWSMkkJ; arc=none smtp.client-ip=192.198.163.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="YHWSMkkJ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714661199; x=1746197199; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=gwi0Y1q+5n0D0n3Bzr328+LnxrPKT8VdPbVuxfggMIE=; b=YHWSMkkJxWBAJ4y7LaUSux6J6V17SgYTS7Iqj8Hu2qhy7qdseezv+BrG 0ltE5tU8zLPcJ1vDxetLcgnmRqftbvXFyEoZuRFCSfUjpzo7AjwdTJN57 f1jYda1BXysk0144pab6Io1cYgOdGpVWGQAheCPqEb7Fb+C3IQe0zu4+m Eru8VtuHn8aismiiyaOVdNsMq4Jwa9klus1+6GiqgNNMjQ64Hk8m0gEpk TvEF/oIFfkMdsJs8tPxIkkj+kyFAQ1d1eYZIUJs/RKFJswz9aAQgIYQ3P Qn1LdKM8zD8Q/Fe3a9mc+5+rGcfYCRysHSk+b/EkZff9s7oQ6bXYEZkiY A==; X-CSE-ConnectionGUID: NPRm8N1nRj6DEbQ8xjexIg== X-CSE-MsgGUID: V9IVdJrmS2e8NKfkpaxoAg== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="10306082" X-IronPort-AV: E=Sophos;i="6.07,247,1708416000"; d="scan'208";a="10306082" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 May 2024 07:46:34 -0700 X-CSE-ConnectionGUID: qd5YiABuQtCuxaNPVaecrg== X-CSE-MsgGUID: aLo5MOr0QiGn4zKxz6NZCg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,247,1708416000"; d="scan'208";a="31632824" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa003.fm.intel.com with ESMTP; 02 May 2024 07:46:32 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id D55A61A5; Thu, 2 May 2024 17:46:30 +0300 (EEST) From: Andy Shevchenko To: Parker Newman , Andy Shevchenko , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Cc: Greg Kroah-Hartman , Jiri Slaby Subject: [PATCH v1 02/13] serial: 8250_exar: Describe all parameters in kernel doc Date: Thu, 2 May 2024 17:43:56 +0300 Message-ID: <20240502144626.2716994-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240502144626.2716994-1-andriy.shevchenko@linux.intel.com> References: <20240502144626.2716994-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Kernel doc validator is not happy: warning: Function parameter or struct member 'pcidev' not described in 'ct= i_get_port_type_xr17c15x_xr17v25x' warning: Function parameter or struct member 'pcidev' not described in 'ct= i_get_port_type_fpga' warning: Function parameter or struct member 'pcidev' not described in 'ct= i_get_port_type_xr17v35x' Add missed descriptions. Fixes: f7ce07062988 ("serial: exar: add CTI specific setup code") Signed-off-by: Andy Shevchenko --- drivers/tty/serial/8250/8250_exar.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/= 8250_exar.c index 9930668610ca..150c4abd92fc 100644 --- a/drivers/tty/serial/8250/8250_exar.c +++ b/drivers/tty/serial/8250/8250_exar.c @@ -715,6 +715,7 @@ static int cti_read_osc_freq(struct exar8250 *priv, u8 = eeprom_offset) /** * cti_get_port_type_xr17c15x_xr17v25x() - Get port type of xr17c15x/xr17v= 25x * @priv: Device's private structure + * @pcidev: Pointer to the PCI device for this port * @port_num: Port to get type of * * CTI xr17c15x and xr17v25x based cards port types are based on PCI IDs. @@ -807,6 +808,7 @@ static enum cti_port_type cti_get_port_type_xr17c15x_xr= 17v25x(struct exar8250 *p /** * cti_get_port_type_fpga() - Get the port type of a CTI FPGA card * @priv: Device's private structure + * @pcidev: Pointer to the PCI device for this port * @port_num: Port to get type of * * FPGA based cards port types are based on PCI IDs. @@ -836,6 +838,7 @@ static enum cti_port_type cti_get_port_type_fpga(struct= exar8250 *priv, /** * cti_get_port_type_xr17v35x() - Read port type from the EEPROM * @priv: Device's private structure + * @pcidev: Pointer to the PCI device for this port * @port_num: port offset * * CTI XR17V35X based cards have the port types stored in the EEPROM. --=20 2.43.0.rc1.1336.g36b5255a03ac From nobody Wed Dec 17 23:26:29 2025 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) (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 D599915380F; Thu, 2 May 2024 14:46:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.19 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714661199; cv=none; b=a5GMkyezCWwCLi7rdRWOFrFAgSV6ddn7nNrSXq4Q0Q+jFrAsCfLw83RMVCMqYh3Q2JqLkGgtwhXUfLWrXqT179GZg2e2bQQC185iO9rTrxMDEd89S5crP0VfyE/uunmK9oTNScF1SFgFo6Hsd1gqNxS1frmQuxtP0fXGoSJlCC8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714661199; c=relaxed/simple; bh=MNevgiHkmuCG//FLCxCfm2v7RKLaRbqWb2DHuURYI4c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=K2K2LL1vetQtbl0oRZqOgsVIEriYhYCBaUND0y2jHYykMRrbBAbWtnkGqAU97W75BChLkm2uSxaU3EYQKZ9J2kn/AlEkgOm7GYRG+NRjJgivO0XnJ4aXPONWR4Y3J6EImBQELQeymh/ApKJoqhf7iY+EBvZSEPI/OqhgQRUeidM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=A0YExunH; arc=none smtp.client-ip=192.198.163.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="A0YExunH" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714661197; x=1746197197; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=MNevgiHkmuCG//FLCxCfm2v7RKLaRbqWb2DHuURYI4c=; b=A0YExunHNrfAX9vW+fEn9kWNL/UHKSxBMz3Wk6uIrTY+ELm7cBszWYck 2j+lDfBsjN2Zkwb+4S74R1Ltu/rK6+RMZOlj2UwqfWo9zaUQBNOqUd1d/ wXuKeuDS57fmI7XEs7hiq+aqbO/6YnGX0xKrU+CiEOx2PigKvLEOKC90f fSlLRSsbiPxIJWEVxMwhhBASxqDmin3D0T+nmh3Myhki3HOrgDhNkeVNF l1rT/V2Sv5Ll6ZyLMHHmvMSbTmA6QMUmd2XyrlVoLiiEX9P/Y3+FuWAJ/ ZyMwBUFij3VyeYdmc3RAgfFtojp/rs75CQyff+rGPzgqgMKxuAEMWTyso A==; X-CSE-ConnectionGUID: KdfRmQtuRxiFDvQIeZBLbA== X-CSE-MsgGUID: 3oUMpcGERiWhTzFEldt5uw== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="10306073" X-IronPort-AV: E=Sophos;i="6.07,247,1708416000"; d="scan'208";a="10306073" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 May 2024 07:46:34 -0700 X-CSE-ConnectionGUID: LOXpM/xoTNS3EhxQvU/jNA== X-CSE-MsgGUID: 5k9v+jPRTbOPJDH7ZomXuQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,247,1708416000"; d="scan'208";a="31632825" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa003.fm.intel.com with ESMTP; 02 May 2024 07:46:32 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id E089B21A; Thu, 2 May 2024 17:46:30 +0300 (EEST) From: Andy Shevchenko To: Parker Newman , Andy Shevchenko , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Cc: Greg Kroah-Hartman , Jiri Slaby Subject: [PATCH v1 03/13] serial: 8250_exar: Kill CTI_PCI_DEVICE() Date: Thu, 2 May 2024 17:43:57 +0300 Message-ID: <20240502144626.2716994-4-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240502144626.2716994-1-andriy.shevchenko@linux.intel.com> References: <20240502144626.2716994-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The CTI_PCI_DEVICE() duplicates EXAR_DEVICE(). Kill the former. Signed-off-by: Andy Shevchenko --- drivers/tty/serial/8250/8250_exar.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/= 8250_exar.c index 150c4abd92fc..ab0abc14ecf8 100644 --- a/drivers/tty/serial/8250/8250_exar.c +++ b/drivers/tty/serial/8250/8250_exar.c @@ -1737,7 +1737,6 @@ static const struct exar8250_board pbn_exar_XR17V8358= =3D { .exit =3D pci_xr17v35x_exit, }; =20 -// For Connect Tech cards with Exar vendor/device PCI IDs #define CTI_EXAR_DEVICE(devid, bd) { \ PCI_DEVICE_SUB( \ PCI_VENDOR_ID_EXAR, \ @@ -1747,16 +1746,6 @@ static const struct exar8250_board pbn_exar_XR17V835= 8 =3D { (kernel_ulong_t)&bd \ } =20 -// For Connect Tech cards with Connect Tech vendor/device PCI IDs (FPGA ba= sed) -#define CTI_PCI_DEVICE(devid, bd) { \ - PCI_DEVICE_SUB( \ - PCI_VENDOR_ID_CONNECT_TECH, \ - PCI_DEVICE_ID_CONNECT_TECH_PCI_##devid, \ - PCI_ANY_ID, \ - PCI_ANY_ID), 0, 0, \ - (kernel_ulong_t)&bd \ - } - #define EXAR_DEVICE(vend, devid, bd) { PCI_DEVICE_DATA(vend, devid, &bd) } =20 #define IBM_DEVICE(devid, sdevid, bd) { \ @@ -1786,6 +1775,7 @@ static const struct pci_device_id exar_pci_tbl[] =3D { EXAR_DEVICE(ACCESSIO, COM_4SM, pbn_exar_XR17C15x), EXAR_DEVICE(ACCESSIO, COM_8SM, pbn_exar_XR17C15x), =20 + /* Connect Tech cards with Exar vendor/device PCI IDs */ CTI_EXAR_DEVICE(XR17C152, pbn_cti_xr17c15x), CTI_EXAR_DEVICE(XR17C154, pbn_cti_xr17c15x), CTI_EXAR_DEVICE(XR17C158, pbn_cti_xr17c15x), @@ -1798,9 +1788,10 @@ static const struct pci_device_id exar_pci_tbl[] =3D= { CTI_EXAR_DEVICE(XR17V354, pbn_cti_xr17v35x), CTI_EXAR_DEVICE(XR17V358, pbn_cti_xr17v35x), =20 - CTI_PCI_DEVICE(XR79X_12_XIG00X, pbn_cti_fpga), - CTI_PCI_DEVICE(XR79X_12_XIG01X, pbn_cti_fpga), - CTI_PCI_DEVICE(XR79X_16, pbn_cti_fpga), + /* Connect Tech cards with Connect Tech vendor/device PCI IDs (FPGA based= ) */ + EXAR_DEVICE(CONNECT_TECH, PCI_XR79X_12_XIG00X, pbn_cti_fpga), + EXAR_DEVICE(CONNECT_TECH, PCI_XR79X_12_XIG01X, pbn_cti_fpga), + EXAR_DEVICE(CONNECT_TECH, PCI_XR79X_16, pbn_cti_fpga), =20 IBM_DEVICE(XR17C152, SATURN_SERIAL_ONE_PORT, pbn_exar_ibm_saturn), =20 --=20 2.43.0.rc1.1336.g36b5255a03ac From nobody Wed Dec 17 23:26:29 2025 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) (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 1648A15359D; Thu, 2 May 2024 14:46:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.19 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714661199; cv=none; b=jsKJnmFK8IfbBEaJV75mO/0frfDe9iov48vI4UCylzGEOIPgsTG6JcePlwYV31Pe+Qa3K0/mvvN91+VXyjShuTwzpp7yyxkOBfnp0wfCj4SnZApigieCZhQYJ6nt1Ek3iYC1189kedNNzYvGNtZ003a85uZm92BeLYEn8ZlrlGM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714661199; c=relaxed/simple; bh=0VpPJMdPe+aSRC95rZ8nfI5XtCmL1qQshMgBSd3OLKA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=GjBayxX0uZEFnOcOIdFh1idD3ZE7UFPtxPHShY2UVIU8uKOPefEN1iSJSLWfkEX90oAV7McUfvbQeQzFs946RBE261epykwwI7X8CvIX9E5sPkuZvqnofMf4cgUh6263ShynjiP94kuRTiA1x81ICEQ12bGkpRIaCDpPehecwTg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=TQigFkEW; arc=none smtp.client-ip=192.198.163.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="TQigFkEW" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714661198; x=1746197198; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=0VpPJMdPe+aSRC95rZ8nfI5XtCmL1qQshMgBSd3OLKA=; b=TQigFkEWmlrk5+0gOR0qF17reSu1owWkSkJfspYPEMsiG2LldBbqZ3iy +l9TkxjYyf7LmCcvxFoQHn69+3hbSUgGLrybmP7wBcsGEXpelU+swhjVJ +uCK/D2x0EmcPtcGj16Sh8KqwoeAVCMfmtgo+CzCRqhqonIQvX0o1UPJn XP1HdEqnNl+o6KGSPoX0ACQ6QQ6lHicSb3qK4orsrWTyyVblO0vGA0pmx uVr/5eMc7IDQ7wP1RJX2ia9iX8Kf16zqo6v6ee20pbaDNL8XWK7pN3spx cTh7pYoRW7Z4saQ8amLWY8So3dZALUXoXT//ycrVrI5lTngdWBBIuh77M A==; X-CSE-ConnectionGUID: E53Lzz/DRYmCj65zm71TWA== X-CSE-MsgGUID: sM+tYp9pRs+DqSbmhWKCbg== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="10306078" X-IronPort-AV: E=Sophos;i="6.07,247,1708416000"; d="scan'208";a="10306078" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 May 2024 07:46:34 -0700 X-CSE-ConnectionGUID: pP7p5MdcRnW8B9meZxA4sw== X-CSE-MsgGUID: lzzrS8VmRkqlzhn1cjUivA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,247,1708416000"; d="scan'208";a="31632827" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa003.fm.intel.com with ESMTP; 02 May 2024 07:46:32 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id EA5DE194; Thu, 2 May 2024 17:46:30 +0300 (EEST) From: Andy Shevchenko To: Parker Newman , Andy Shevchenko , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Cc: Greg Kroah-Hartman , Jiri Slaby Subject: [PATCH v1 04/13] serial: 8250_exar: Use PCI_SUBVENDOR_ID_IBM for subvendor ID Date: Thu, 2 May 2024 17:43:58 +0300 Message-ID: <20240502144626.2716994-5-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240502144626.2716994-1-andriy.shevchenko@linux.intel.com> References: <20240502144626.2716994-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use PCI_SUBVENDOR_ID_IBM for subvendor ID instead of vendor one. Signed-off-by: Andy Shevchenko --- drivers/tty/serial/8250/8250_exar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/= 8250_exar.c index ab0abc14ecf8..5405a1f463f1 100644 --- a/drivers/tty/serial/8250/8250_exar.c +++ b/drivers/tty/serial/8250/8250_exar.c @@ -1752,7 +1752,7 @@ static const struct exar8250_board pbn_exar_XR17V8358= =3D { PCI_DEVICE_SUB( \ PCI_VENDOR_ID_EXAR, \ PCI_DEVICE_ID_EXAR_##devid, \ - PCI_VENDOR_ID_IBM, \ + PCI_SUBVENDOR_ID_IBM, \ PCI_SUBDEVICE_ID_IBM_##sdevid), 0, 0, \ (kernel_ulong_t)&bd \ } --=20 2.43.0.rc1.1336.g36b5255a03ac From nobody Wed Dec 17 23:26:29 2025 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) (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 0AE04154C0B; Thu, 2 May 2024 14:46:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.19 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714661201; cv=none; b=HF5Elm8LSfFYrzuOI9rAwbKSArx6hFNfQQaZK4nW7fC+P+CC9iOCKsuqnhZuLQJ2v1JurWHwM1YrItFHh4PlGOi4ABrMYAolh9YSzPRT2nTtiO/KZhQJZ28qtHgCLs6zLxiZlMWeDuWBdAL1l8I7rLSvDboxV5z4LLoWmxArcrk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714661201; c=relaxed/simple; bh=MPc1IkmPTaUhh/egUaTmEy/dFmjevrLUOTFIWjFB7BM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gur0/ointqfAiP+msdyaWSEY6kYLrURWYv4JZORdJ/AyDQ9/0bF83fFGHs6nDHnO/ruwyrSiyPwyDp7un1YTgpC1oQz6Ki4awdw4zIM+1i4I4VuBiXbsN6qWztYEIvTnKqwP8ntOclX/sQFLksU2hyRtZqAcuC3jfsjgtEfQdI0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=gs/hIpM0; arc=none smtp.client-ip=192.198.163.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="gs/hIpM0" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714661200; x=1746197200; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=MPc1IkmPTaUhh/egUaTmEy/dFmjevrLUOTFIWjFB7BM=; b=gs/hIpM0hhZtGuIADMwkxkOoJ6U0AsRjOQpfD4ygDtbADaQHdpPNgqmO 1wwXsRcoI5TgALagPhZFWcm9ezb4IuwH6otyRY7q2fzh8kQfUW/enHnFc rdWd1FrS1tZ7KHj6BHkMDbBEv1uBkNoHcBT2+XlQVgiF/HqVYtnQ+ujJg p2Ec9d1XZdfOPf9letjj6Yc+uNKKf+2OtQliWihJ7qth6rlw4KspZI4dL vW+DhfWwxaY3WNRbxhtSQIeebDQSbPQ49alcDGCE8VrhHbgZco4JQWPNm A6GgSXXGfn6WeXGcYdtBYzzryaoCGC/UjD2/wa63GIgOIMJjrRxckSfpo w==; X-CSE-ConnectionGUID: aw2hvlB1TeKPl75n0xWKfA== X-CSE-MsgGUID: vvp73YNlTSiEmvaYzB/yhQ== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="10306093" X-IronPort-AV: E=Sophos;i="6.07,247,1708416000"; d="scan'208";a="10306093" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 May 2024 07:46:36 -0700 X-CSE-ConnectionGUID: +4o5sW/LS8S3PHuUrIkjgQ== X-CSE-MsgGUID: Y6sdbkf9Rsy1dYR6SFPFLA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,247,1708416000"; d="scan'208";a="31632840" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa003.fm.intel.com with ESMTP; 02 May 2024 07:46:34 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 054FE4B9; Thu, 2 May 2024 17:46:30 +0300 (EEST) From: Andy Shevchenko To: Parker Newman , Andy Shevchenko , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Cc: Greg Kroah-Hartman , Jiri Slaby Subject: [PATCH v1 05/13] serial: 8250_exar: Trivia typo fixes Date: Thu, 2 May 2024 17:43:59 +0300 Message-ID: <20240502144626.2716994-6-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240502144626.2716994-1-andriy.shevchenko@linux.intel.com> References: <20240502144626.2716994-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Trivia typo fixes: interupts --> interrupts and others. Signed-off-by: Andy Shevchenko --- drivers/tty/serial/8250/8250_exar.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/= 8250_exar.c index 5405a1f463f1..ac373cde7e39 100644 --- a/drivers/tty/serial/8250/8250_exar.c +++ b/drivers/tty/serial/8250/8250_exar.c @@ -641,7 +641,7 @@ pci_fastcom335_setup(struct exar8250 *priv, struct pci_= dev *pcidev, * @port_num: Port number to set tristate off * * Most RS485 capable cards have a power on tristate jumper/switch that en= sures - * the RS422/RS485 transciever does not drive a multi-drop RS485 bus when = it is + * the RS422/RS485 transceiver does not drive a multi-drop RS485 bus when = it is * not the master. When this jumper is installed the user must set the RS4= 85 * mode to Full or Half duplex to disable tristate prior to using the port. * @@ -666,7 +666,7 @@ static int cti_tristate_disable(struct exar8250 *priv, = unsigned int port_num) * @priv: Device's private structure * * Some older CTI cards require MPIO_0 to be set low to enable the - * interupts from the UART to the PLX PCI->PCIe bridge. + * interrupts from the UART to the PLX PCI->PCIe bridge. * * Return: 0 on success, negative error code on failure */ @@ -927,7 +927,7 @@ static int cti_port_setup_fpga(struct exar8250 *priv, =20 port_type =3D cti_get_port_type_fpga(priv, pcidev, idx); =20 - // FPGA shares port offests with XR17C15X + // FPGA shares port offsets with XR17C15X offset =3D idx * UART_EXAR_XR17C15X_PORT_OFFSET; port->port.type =3D PORT_XR17D15X; =20 @@ -1109,7 +1109,7 @@ static int cti_board_init_xr17v25x(struct exar8250 *p= riv, =20 priv->osc_freq =3D osc_freq; =20 - /* enable interupts on cards that need the "PLX fix" */ + /* enable interrupts on cards that need the "PLX fix" */ switch (pcidev->subsystem_device) { case PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8_XPRS: case PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_16_XPRS_A: --=20 2.43.0.rc1.1336.g36b5255a03ac From nobody Wed Dec 17 23:26:29 2025 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) (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 B2FBB154457; Thu, 2 May 2024 14:46:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.19 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714661201; cv=none; b=u6gcqORzfHODL3geDi6DEF2c9MtbnScNrdZrau45HnIVJjOYucB/p8AIm8HbZ1hUcRnQU2CwS8qxY+s1xDM1ReVCP+TcHq08AWGDZ+AZ0poViez0/7nteDoLTB+pqENFueAn7LETaBvdb6TEGYewXjXEugPG5mraw1Bv4HfFEhE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714661201; c=relaxed/simple; bh=Hcgz7372JSWmrvRQywcGylEztD7txJvhGznmILq6zB4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=B3fTEEY6rIFE+LiFBeSw/SRWycJk87Md3gD9aCGMzEKBtJJqiQISwXbtp4EGuk6qCx3PMvBSN/koBlfvFzb262fqJeDzD27L9oVlR0af3PoBy7RMDJNoYfySVJbMW/GDzUcFVHeqzVFJdcce48sOxvr0niCRNnv1uR/K/6YSvpw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=baMpMNDh; arc=none smtp.client-ip=192.198.163.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="baMpMNDh" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714661200; x=1746197200; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Hcgz7372JSWmrvRQywcGylEztD7txJvhGznmILq6zB4=; b=baMpMNDha+lS/OM2L2RU9zVWLDaSM/jo9FTlQ+d4VDdKJx5pCPKPkizA qqwoytYPoCFIQ+ncPCHE/4P54ZlXujc2CqypOhml+nFuTpd7MeqsLn9X+ GHJQiHBRG5wVBsms2F1oOvCB6LADz6kOk0mHnmoJAhuS0Wr8/5qmYZKf7 0O42wLHgfSvi9Axn4veozXAf0tdujplZJ0CK2XpmFiguNAFG+I7SnCW8p U1n21WSXt1CvKXHG2DlZJXdNCYVavbpgZcAHlhl3GuzafcxvPwhaVQ06V rKV/KJxHi4o1hnWa/xlNSqJjGNxb4J7Gci7pHbyq0IdB4Td9zhSFM7nMn g==; X-CSE-ConnectionGUID: EZFUb5FxQ6qM12Y6MizAaw== X-CSE-MsgGUID: /x5PAul6Tvq+EX9GX4jQYQ== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="10306088" X-IronPort-AV: E=Sophos;i="6.07,247,1708416000"; d="scan'208";a="10306088" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 May 2024 07:46:36 -0700 X-CSE-ConnectionGUID: JE3IlubBTXmx4RwteMZowg== X-CSE-MsgGUID: 0tBQAtizQmqMuQz6s6D+hg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,247,1708416000"; d="scan'208";a="31632839" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa003.fm.intel.com with ESMTP; 02 May 2024 07:46:34 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 12FC322C; Thu, 2 May 2024 17:46:31 +0300 (EEST) From: Andy Shevchenko To: Parker Newman , Andy Shevchenko , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Cc: Greg Kroah-Hartman , Jiri Slaby Subject: [PATCH v1 06/13] serial: 8250_exar: Extract cti_board_init_osc_freq() helper Date: Thu, 2 May 2024 17:44:00 +0300 Message-ID: <20240502144626.2716994-7-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240502144626.2716994-1-andriy.shevchenko@linux.intel.com> References: <20240502144626.2716994-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Extract cti_board_init_osc_freq() helper to avoid code duplication. Signed-off-by: Andy Shevchenko --- drivers/tty/serial/8250/8250_exar.c | 48 ++++++++++++----------------- 1 file changed, 19 insertions(+), 29 deletions(-) diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/= 8250_exar.c index ac373cde7e39..956323e2de4a 100644 --- a/drivers/tty/serial/8250/8250_exar.c +++ b/drivers/tty/serial/8250/8250_exar.c @@ -695,7 +695,6 @@ static int cti_read_osc_freq(struct exar8250 *priv, u8 = eeprom_offset) { u16 lower_word; u16 upper_word; - int osc_freq; =20 lower_word =3D exar_ee_read(priv, eeprom_offset); // Check if EEPROM word was blank @@ -706,10 +705,8 @@ static int cti_read_osc_freq(struct exar8250 *priv, u8= eeprom_offset) if (upper_word =3D=3D 0xFFFF) return -EIO; =20 - osc_freq =3D FIELD_PREP(CTI_EE_MASK_OSC_FREQ_LOWER, lower_word) | - FIELD_PREP(CTI_EE_MASK_OSC_FREQ_UPPER, upper_word); - - return osc_freq; + return FIELD_PREP(CTI_EE_MASK_OSC_FREQ_LOWER, lower_word) | + FIELD_PREP(CTI_EE_MASK_OSC_FREQ_UPPER, upper_word); } =20 /** @@ -890,6 +887,19 @@ static int cti_rs485_config_mpio_tristate(struct uart_= port *port, return cti_tristate_disable(priv, port->port_id); } =20 +static void cti_board_init_osc_freq(struct exar8250 *priv, struct pci_dev = *pcidev, u8 eeprom_offset) +{ + int osc_freq; + + osc_freq =3D cti_read_osc_freq(priv, eeprom_offset); + if (osc_freq <=3D 0) { + dev_warn(&pcidev->dev, "failed to read OSC freq from EEPROM, using defau= lt\n"); + osc_freq =3D CTI_DEFAULT_PCI_OSC_FREQ; + } + + priv->osc_freq =3D osc_freq; +} + static int cti_port_setup_common(struct exar8250 *priv, struct pci_dev *pcidev, int idx, unsigned int offset, @@ -1095,19 +1105,9 @@ static int cti_board_init_xr17v35x(struct exar8250 *= priv, return 0; } =20 -static int cti_board_init_xr17v25x(struct exar8250 *priv, - struct pci_dev *pcidev) +static int cti_board_init_xr17v25x(struct exar8250 *priv, struct pci_dev *= pcidev) { - int osc_freq; - - osc_freq =3D cti_read_osc_freq(priv, CTI_EE_OFF_XR17V25X_OSC_FREQ); - if (osc_freq < 0) { - dev_warn(&pcidev->dev, - "failed to read osc freq from EEPROM, using default\n"); - osc_freq =3D CTI_DEFAULT_PCI_OSC_FREQ; - } - - priv->osc_freq =3D osc_freq; + cti_board_init_osc_freq(priv, pcidev, CTI_EE_OFF_XR17V25X_OSC_FREQ); =20 /* enable interrupts on cards that need the "PLX fix" */ switch (pcidev->subsystem_device) { @@ -1123,19 +1123,9 @@ static int cti_board_init_xr17v25x(struct exar8250 *= priv, return 0; } =20 -static int cti_board_init_xr17c15x(struct exar8250 *priv, - struct pci_dev *pcidev) +static int cti_board_init_xr17c15x(struct exar8250 *priv, struct pci_dev *= pcidev) { - int osc_freq; - - osc_freq =3D cti_read_osc_freq(priv, CTI_EE_OFF_XR17C15X_OSC_FREQ); - if (osc_freq <=3D 0) { - dev_warn(&pcidev->dev, - "failed to read osc freq from EEPROM, using default\n"); - osc_freq =3D CTI_DEFAULT_PCI_OSC_FREQ; - } - - priv->osc_freq =3D osc_freq; + cti_board_init_osc_freq(priv, pcidev, CTI_EE_OFF_XR17C15X_OSC_FREQ); =20 /* enable interrupts on cards that need the "PLX fix" */ switch (pcidev->subsystem_device) { --=20 2.43.0.rc1.1336.g36b5255a03ac From nobody Wed Dec 17 23:26:29 2025 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) (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 C2DB5155340; Thu, 2 May 2024 14:46:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.19 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714661203; cv=none; b=hHpRcpCfe83KLaDNx1m/fDgflK69DWpA27leuZl58GkUL0kz/AnINfItfocsOXla4dZ7z1JFA8pGeaBVWigZ5avdqXkGg8Rpmhk3vGEPTV56d3r/NvTP/P+cmuPGI+jfabjzSum85+06JfmwbKz3ZZIwlKd6zcddfj41dA2DhWo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714661203; c=relaxed/simple; bh=t7c+p4jpADujsd+7SJ8cKecOyJnSYgDmtGkvtDrO4RE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=D9hqyv1U9QsTUDr8nkgwa87FImhKyt3Zt9EuzA/o4eSmMfBxZqFdHuQl2uCw/h2RLPici5Ei5fC/etD8gqmnE24YEPnyRo9fhVcNvwokah04SJrmh3gCp6e2J6G9qPUGYf+9ZNc58VMxWketyPXNtkAmbfobxD85Y/SWFTA12Og= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=ILNUOo1r; arc=none smtp.client-ip=192.198.163.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="ILNUOo1r" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714661202; x=1746197202; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=t7c+p4jpADujsd+7SJ8cKecOyJnSYgDmtGkvtDrO4RE=; b=ILNUOo1r4yp7MPCg0rOXPfrbsgcX+TGbP+PXdf6dSnb+UuE0WGS7QeQe COuLAUVvL2Ei7oVi6Sv5azasjKVSSXGfWBStMFfwZ/hftoQn7PjhSqgtL dZEJ2+EcWuZQB+G15CV1rnh0QOo6ZvEVy9E3o4Zk1+RtCV23HlpZjZoOo 09JsnNxeQl8/Dd8/6KY5HSt2kUsjfBmiByoNB/jWrPRPKvvYTkB4d38Nu ZE9o5aFblSz/BAcvcDh4FvuxltQnvpDKQ/N070DW1wWdggU+LKyYttlsP ZguPL7ijEXPIdXJX9w3tufd4KVi1OIIgoJ33CYpLJqcGTLB9YCEVxU4U1 A==; X-CSE-ConnectionGUID: yCSM5PVPT6aZfyO7DEMKiA== X-CSE-MsgGUID: Gp4Z4xP1QgyO0jPdZ6iCRA== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="10306101" X-IronPort-AV: E=Sophos;i="6.07,247,1708416000"; d="scan'208";a="10306101" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 May 2024 07:46:36 -0700 X-CSE-ConnectionGUID: WWNSwq7zRQ+GYX9GIrSUHQ== X-CSE-MsgGUID: ymqFtbLvRBmDHxrPJrkCug== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,247,1708416000"; d="scan'208";a="31632844" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa003.fm.intel.com with ESMTP; 02 May 2024 07:46:34 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 257A960A; Thu, 2 May 2024 17:46:31 +0300 (EEST) From: Andy Shevchenko To: Parker Newman , Andy Shevchenko , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Cc: Greg Kroah-Hartman , Jiri Slaby Subject: [PATCH v1 07/13] serial: 8250_exar: Kill unneeded ->board_init() Date: Thu, 2 May 2024 17:44:01 +0300 Message-ID: <20240502144626.2716994-8-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240502144626.2716994-1-andriy.shevchenko@linux.intel.com> References: <20240502144626.2716994-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" We may reuse ->setup() for the same purpose as it was done before. Signed-off-by: Andy Shevchenko --- drivers/tty/serial/8250/8250_exar.c | 171 +++++++++++++--------------- 1 file changed, 81 insertions(+), 90 deletions(-) diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/= 8250_exar.c index 956323e2de4a..4e683ca76de0 100644 --- a/drivers/tty/serial/8250/8250_exar.c +++ b/drivers/tty/serial/8250/8250_exar.c @@ -237,14 +237,12 @@ struct exar8250_platform { * struct exar8250_board - board information * @num_ports: number of serial ports * @reg_shift: describes UART register mapping in PCI memory - * @board_init: quirk run once at ->probe() stage before setting up ports * @setup: quirk run at ->probe() stage for each port * @exit: quirk run at ->remove() stage */ struct exar8250_board { unsigned int num_ports; unsigned int reg_shift; - int (*board_init)(struct exar8250 *priv, struct pci_dev *pcidev); int (*setup)(struct exar8250 *priv, struct pci_dev *pcidev, struct uart_8250_port *port, int idx); void (*exit)(struct pci_dev *pcidev); @@ -907,9 +905,6 @@ static int cti_port_setup_common(struct exar8250 *priv, { int ret; =20 - if (priv->osc_freq =3D=3D 0) - return -EINVAL; - port->port.port_id =3D idx; port->port.uartclk =3D priv->osc_freq; =20 @@ -927,6 +922,30 @@ static int cti_port_setup_common(struct exar8250 *priv, return 0; } =20 +static int cti_board_init_fpga(struct exar8250 *priv, struct pci_dev *pcid= ev) +{ + int ret; + u16 cfg_val; + + // FPGA OSC is fixed to the 33MHz PCI clock + priv->osc_freq =3D CTI_DEFAULT_FPGA_OSC_FREQ; + + // Enable external interrupts in special cfg space register + ret =3D pci_read_config_word(pcidev, CTI_FPGA_CFG_INT_EN_REG, &cfg_val); + if (ret) + return pcibios_err_to_errno(ret); + + cfg_val |=3D CTI_FPGA_CFG_INT_EN_EXT_BIT; + ret =3D pci_write_config_word(pcidev, CTI_FPGA_CFG_INT_EN_REG, cfg_val); + if (ret) + return pcibios_err_to_errno(ret); + + // RS485 gate needs to be enabled; otherwise RTS/CTS will not work + exar_write_reg(priv, CTI_FPGA_RS485_IO_REG, 0x01); + + return 0; +} + static int cti_port_setup_fpga(struct exar8250 *priv, struct pci_dev *pcidev, struct uart_8250_port *port, @@ -934,6 +953,13 @@ static int cti_port_setup_fpga(struct exar8250 *priv, { enum cti_port_type port_type; unsigned int offset; + int ret; + + if (idx =3D=3D 0) { + ret =3D cti_board_init_fpga(priv, pcidev); + if (ret) + return ret; + } =20 port_type =3D cti_get_port_type_fpga(priv, pcidev, idx); =20 @@ -953,6 +979,12 @@ static int cti_port_setup_fpga(struct exar8250 *priv, return cti_port_setup_common(priv, pcidev, idx, offset, port); } =20 +static void cti_board_init_xr17v35x(struct exar8250 *priv, struct pci_dev = *pcidev) +{ + // XR17V35X uses the PCIe clock rather than an oscillator + priv->osc_freq =3D CTI_DEFAULT_PCIE_OSC_FREQ; +} + static int cti_port_setup_xr17v35x(struct exar8250 *priv, struct pci_dev *pcidev, struct uart_8250_port *port, @@ -962,6 +994,9 @@ static int cti_port_setup_xr17v35x(struct exar8250 *pri= v, unsigned int offset; int ret; =20 + if (idx =3D=3D 0) + cti_board_init_xr17v35x(priv, pcidev); + port_type =3D cti_get_port_type_xr17v35x(priv, pcidev, idx); =20 offset =3D idx * UART_EXAR_XR17V35X_PORT_OFFSET; @@ -999,6 +1034,22 @@ static int cti_port_setup_xr17v35x(struct exar8250 *p= riv, return 0; } =20 +static void cti_board_init_xr17v25x(struct exar8250 *priv, struct pci_dev = *pcidev) +{ + cti_board_init_osc_freq(priv, pcidev, CTI_EE_OFF_XR17V25X_OSC_FREQ); + + /* enable interrupts on cards that need the "PLX fix" */ + switch (pcidev->subsystem_device) { + case PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8_XPRS: + case PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_16_XPRS_A: + case PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_16_XPRS_B: + cti_plx_int_enable(priv); + break; + default: + break; + } +} + static int cti_port_setup_xr17v25x(struct exar8250 *priv, struct pci_dev *pcidev, struct uart_8250_port *port, @@ -1008,6 +1059,9 @@ static int cti_port_setup_xr17v25x(struct exar8250 *p= riv, unsigned int offset; int ret; =20 + if (idx =3D=3D 0) + cti_board_init_xr17v25x(priv, pcidev); + port_type =3D cti_get_port_type_xr17c15x_xr17v25x(priv, pcidev, idx); =20 offset =3D idx * UART_EXAR_XR17V25X_PORT_OFFSET; @@ -1055,6 +1109,25 @@ static int cti_port_setup_xr17v25x(struct exar8250 *= priv, return 0; } =20 +static void cti_board_init_xr17c15x(struct exar8250 *priv, struct pci_dev = *pcidev) +{ + cti_board_init_osc_freq(priv, pcidev, CTI_EE_OFF_XR17C15X_OSC_FREQ); + + /* enable interrupts on cards that need the "PLX fix" */ + switch (pcidev->subsystem_device) { + case PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2_XPRS: + case PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_XPRS_A: + case PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_XPRS_B: + case PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2_XPRS_OPTO: + case PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_XPRS_OPTO_A: + case PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_XPRS_OPTO_B: + cti_plx_int_enable(priv); + break; + default: + break; + } +} + static int cti_port_setup_xr17c15x(struct exar8250 *priv, struct pci_dev *pcidev, struct uart_8250_port *port, @@ -1063,6 +1136,9 @@ static int cti_port_setup_xr17c15x(struct exar8250 *p= riv, enum cti_port_type port_type; unsigned int offset; =20 + if (idx =3D=3D 0) + cti_board_init_xr17c15x(priv, pcidev); + port_type =3D cti_get_port_type_xr17c15x_xr17v25x(priv, pcidev, idx); =20 offset =3D idx * UART_EXAR_XR17C15X_PORT_OFFSET; @@ -1096,78 +1172,6 @@ static int cti_port_setup_xr17c15x(struct exar8250 *= priv, return cti_port_setup_common(priv, pcidev, idx, offset, port); } =20 -static int cti_board_init_xr17v35x(struct exar8250 *priv, - struct pci_dev *pcidev) -{ - // XR17V35X uses the PCIe clock rather than an oscillator - priv->osc_freq =3D CTI_DEFAULT_PCIE_OSC_FREQ; - - return 0; -} - -static int cti_board_init_xr17v25x(struct exar8250 *priv, struct pci_dev *= pcidev) -{ - cti_board_init_osc_freq(priv, pcidev, CTI_EE_OFF_XR17V25X_OSC_FREQ); - - /* enable interrupts on cards that need the "PLX fix" */ - switch (pcidev->subsystem_device) { - case PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8_XPRS: - case PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_16_XPRS_A: - case PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_16_XPRS_B: - cti_plx_int_enable(priv); - break; - default: - break; - } - - return 0; -} - -static int cti_board_init_xr17c15x(struct exar8250 *priv, struct pci_dev *= pcidev) -{ - cti_board_init_osc_freq(priv, pcidev, CTI_EE_OFF_XR17C15X_OSC_FREQ); - - /* enable interrupts on cards that need the "PLX fix" */ - switch (pcidev->subsystem_device) { - case PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2_XPRS: - case PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_XPRS_A: - case PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_XPRS_B: - case PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2_XPRS_OPTO: - case PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_XPRS_OPTO_A: - case PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_XPRS_OPTO_B: - cti_plx_int_enable(priv); - break; - default: - break; - } - - return 0; -} - -static int cti_board_init_fpga(struct exar8250 *priv, struct pci_dev *pcid= ev) -{ - int ret; - u16 cfg_val; - - // FPGA OSC is fixed to the 33MHz PCI clock - priv->osc_freq =3D CTI_DEFAULT_FPGA_OSC_FREQ; - - // Enable external interrupts in special cfg space register - ret =3D pci_read_config_word(pcidev, CTI_FPGA_CFG_INT_EN_REG, &cfg_val); - if (ret) - return pcibios_err_to_errno(ret); - - cfg_val |=3D CTI_FPGA_CFG_INT_EN_EXT_BIT; - ret =3D pci_write_config_word(pcidev, CTI_FPGA_CFG_INT_EN_REG, cfg_val); - if (ret) - return pcibios_err_to_errno(ret); - - // RS485 gate needs to be enabled; otherwise RTS/CTS will not work - exar_write_reg(priv, CTI_FPGA_RS485_IO_REG, 0x01); - - return 0; -} - static int pci_xr17c154_setup(struct exar8250 *priv, struct pci_dev *pcidev, struct uart_8250_port *port, int idx) @@ -1574,15 +1578,6 @@ exar_pci_probe(struct pci_dev *pcidev, const struct = pci_device_id *ent) if (rc) return rc; =20 - if (board->board_init) { - rc =3D board->board_init(priv, pcidev); - if (rc) { - dev_err_probe(&pcidev->dev, rc, - "failed to init serial board\n"); - return rc; - } - } - for (i =3D 0; i < nr_ports && i < maxnr; i++) { rc =3D board->setup(priv, pcidev, &uart, i); if (rc) { @@ -1664,22 +1659,18 @@ static const struct exar8250_board pbn_fastcom335_8= =3D { }; =20 static const struct exar8250_board pbn_cti_xr17c15x =3D { - .board_init =3D cti_board_init_xr17c15x, .setup =3D cti_port_setup_xr17c15x, }; =20 static const struct exar8250_board pbn_cti_xr17v25x =3D { - .board_init =3D cti_board_init_xr17v25x, .setup =3D cti_port_setup_xr17v25x, }; =20 static const struct exar8250_board pbn_cti_xr17v35x =3D { - .board_init =3D cti_board_init_xr17v35x, .setup =3D cti_port_setup_xr17v35x, }; =20 static const struct exar8250_board pbn_cti_fpga =3D { - .board_init =3D cti_board_init_fpga, .setup =3D cti_port_setup_fpga, }; =20 --=20 2.43.0.rc1.1336.g36b5255a03ac From nobody Wed Dec 17 23:26:29 2025 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) (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 A14541553AB; Thu, 2 May 2024 14:46:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.19 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714661203; cv=none; b=qagacFaE3ImeaKPYH7svdOpMhDVJ+PnrulBxBRA2OxyGcKicSE8Zlo4x5xWfEsWi3Ud7t7IsBn498zGssQWVPrZNhz373GVnQ6FKhC7nQRtqKoroZdRGfFvPQkCgkfy/DrE3sF7BdvP/r42huUXEOtzvu9UzAiul8HfaS5n3tRY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714661203; c=relaxed/simple; bh=0P8W5/r5S5k6SwXf7VCCJC2Qrhne6InBiWz5NUC6oPI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JaaZcTUcEx7+CQI3vDoX+5luqOZaHaKZTC68SC2YBBv83MyRYvTUNj6XBxCLI3Hi1jl5PQyssBewX82feWHHwXPvEguKMKgLzR1eUtQpWl2UvVwspb4VV3tWievV7iIAKdBAGX729ovrKA8SxqfPM7mFUEETYdti3WMC8/uddmc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=k47X1Aol; arc=none smtp.client-ip=192.198.163.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="k47X1Aol" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714661202; x=1746197202; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=0P8W5/r5S5k6SwXf7VCCJC2Qrhne6InBiWz5NUC6oPI=; b=k47X1AolQEI3+pcY8kk8c06lJaFkRiORLHFBjsxj/NeMHSM8yJbArj0+ 61/h3BHGkPox8741QyZMQuMHH/BKqASghK7cTB6qd2iVJYLPka425EF72 Hl+HX8kQAwldmYJzNyolLCQRu9IKx2HlRf2zYkGR4F+5c8QKSn7avkvnD wcilkU6J3n7UD5eG1lOYKHzMMXiY2zqMvuFoFL8secgfNnfevFyY5ZaGQ xj6gtSoW2s8m/uacrxlDamOpPOvCqLXohcrZ0oIds/c1z+zE7KNUEu+cO DV6fX+LmbfvkMEIeIVb4STexCFeoaZtqEGKNQpdOTAWKkgKcbsCTuIrbL A==; X-CSE-ConnectionGUID: vH+ivrqOQbO5Iw2FrJDH6A== X-CSE-MsgGUID: 8ft5TfkmS36GJXleSbYPxg== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="10306100" X-IronPort-AV: E=Sophos;i="6.07,247,1708416000"; d="scan'208";a="10306100" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 May 2024 07:46:36 -0700 X-CSE-ConnectionGUID: lPqpcRXZQ7G6j85bTC2Seg== X-CSE-MsgGUID: hal1lxgoQ9iQOfA48KEMwQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,247,1708416000"; d="scan'208";a="31632843" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa003.fm.intel.com with ESMTP; 02 May 2024 07:46:34 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 2F37D590; Thu, 2 May 2024 17:46:31 +0300 (EEST) From: Andy Shevchenko To: Parker Newman , Andy Shevchenko , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Cc: Greg Kroah-Hartman , Jiri Slaby Subject: [PATCH v1 08/13] serial: 8250_exar: Decrease indentation level Date: Thu, 2 May 2024 17:44:02 +0300 Message-ID: <20240502144626.2716994-9-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240502144626.2716994-1-andriy.shevchenko@linux.intel.com> References: <20240502144626.2716994-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Decrease indentation level in some places. No functional change intended. Signed-off-by: Andy Shevchenko --- drivers/tty/serial/8250/8250_exar.c | 100 ++++++++++++++-------------- 1 file changed, 50 insertions(+), 50 deletions(-) diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/= 8250_exar.c index 4e683ca76de0..1f04d4562878 100644 --- a/drivers/tty/serial/8250/8250_exar.c +++ b/drivers/tty/serial/8250/8250_exar.c @@ -607,28 +607,30 @@ pci_fastcom335_setup(struct exar8250 *priv, struct pc= i_dev *pcidev, writeb(32, p + UART_EXAR_TXTRG); writeb(32, p + UART_EXAR_RXTRG); =20 + /* Skip the initial (per device) setup */ + if (idx) + return 0; + /* * Setup Multipurpose Input/Output pins. */ - if (idx =3D=3D 0) { - switch (pcidev->device) { - case PCI_DEVICE_ID_COMMTECH_4222PCI335: - case PCI_DEVICE_ID_COMMTECH_4224PCI335: - writeb(0x78, p + UART_EXAR_MPIOLVL_7_0); - writeb(0x00, p + UART_EXAR_MPIOINV_7_0); - writeb(0x00, p + UART_EXAR_MPIOSEL_7_0); - break; - case PCI_DEVICE_ID_COMMTECH_2324PCI335: - case PCI_DEVICE_ID_COMMTECH_2328PCI335: - writeb(0x00, p + UART_EXAR_MPIOLVL_7_0); - writeb(0xc0, p + UART_EXAR_MPIOINV_7_0); - writeb(0xc0, p + UART_EXAR_MPIOSEL_7_0); - break; - } - writeb(0x00, p + UART_EXAR_MPIOINT_7_0); - writeb(0x00, p + UART_EXAR_MPIO3T_7_0); - writeb(0x00, p + UART_EXAR_MPIOOD_7_0); + switch (pcidev->device) { + case PCI_DEVICE_ID_COMMTECH_4222PCI335: + case PCI_DEVICE_ID_COMMTECH_4224PCI335: + writeb(0x78, p + UART_EXAR_MPIOLVL_7_0); + writeb(0x00, p + UART_EXAR_MPIOINV_7_0); + writeb(0x00, p + UART_EXAR_MPIOSEL_7_0); + break; + case PCI_DEVICE_ID_COMMTECH_2324PCI335: + case PCI_DEVICE_ID_COMMTECH_2328PCI335: + writeb(0x00, p + UART_EXAR_MPIOLVL_7_0); + writeb(0xc0, p + UART_EXAR_MPIOINV_7_0); + writeb(0xc0, p + UART_EXAR_MPIOSEL_7_0); + break; } + writeb(0x00, p + UART_EXAR_MPIOINT_7_0); + writeb(0x00, p + UART_EXAR_MPIO3T_7_0); + writeb(0x00, p + UART_EXAR_MPIOOD_7_0); =20 return 0; } @@ -853,21 +855,19 @@ static enum cti_port_type cti_get_port_type_xr17v35x(= struct exar8250 *priv, port_flags =3D exar_ee_read(priv, offset); =20 port_type =3D FIELD_GET(CTI_EE_MASK_PORT_FLAGS_TYPE, port_flags); - if (!CTI_PORT_TYPE_VALID(port_type)) { - /* - * If the port type is missing the card assume it is a - * RS232/RS422/RS485 card to be safe. - * - * There is one known board (BEG013) that only has - * 3 of 4 port types written to the EEPROM so this - * acts as a work around. - */ - dev_warn(&pcidev->dev, - "failed to get port %d type from EEPROM\n", port_num); - port_type =3D CTI_PORT_TYPE_RS232_422_485_HW; - } + if (CTI_PORT_TYPE_VALID(port_type)) + return port_type; =20 - return port_type; + /* + * If the port type is missing the card assume it is a + * RS232/RS422/RS485 card to be safe. + * + * There is one known board (BEG013) that only has 3 of 4 port types + * written to the EEPROM so this acts as a work around. + */ + dev_warn(&pcidev->dev, "failed to get port %d type from EEPROM\n", port_n= um); + + return CTI_PORT_TYPE_RS232_422_485_HW; } =20 static int cti_rs485_config_mpio_tristate(struct uart_port *port, @@ -1190,11 +1190,10 @@ static void setup_gpio(struct pci_dev *pcidev, u8 _= _iomem *p) * devices will export them as GPIOs, so we pre-configure them safely * as inputs. */ - u8 dir =3D 0x00; =20 if ((pcidev->vendor =3D=3D PCI_VENDOR_ID_EXAR) && - (pcidev->subsystem_vendor !=3D PCI_VENDOR_ID_SEALEVEL)) { + (pcidev->subsystem_vendor !=3D PCI_VENDOR_ID_SEALEVEL)) { // Configure GPIO as inputs for Commtech adapters dir =3D 0xff; } else { @@ -1284,27 +1283,28 @@ static int sealevel_rs485_config(struct uart_port *= port, struct ktermios *termio if (ret) return ret; =20 - if (rs485->flags & SER_RS485_ENABLED) { - old_lcr =3D readb(p + UART_LCR); + if (!(rs485->flags & SER_RS485_ENABLED)) + return 0; =20 - /* Set EFR[4]=3D1 to enable enhanced feature registers */ - efr =3D readb(p + UART_XR_EFR); - efr |=3D UART_EFR_ECB; - writeb(efr, p + UART_XR_EFR); + old_lcr =3D readb(p + UART_LCR); =20 - /* Set MCR to use DTR as Auto-RS485 Enable signal */ - writeb(UART_MCR_OUT1, p + UART_MCR); + /* Set EFR[4]=3D1 to enable enhanced feature registers */ + efr =3D readb(p + UART_XR_EFR); + efr |=3D UART_EFR_ECB; + writeb(efr, p + UART_XR_EFR); =20 - /* Set LCR[7]=3D1 to enable access to DLD register */ - writeb(old_lcr | UART_LCR_DLAB, p + UART_LCR); + /* Set MCR to use DTR as Auto-RS485 Enable signal */ + writeb(UART_MCR_OUT1, p + UART_MCR); =20 - /* Set DLD[7]=3D1 for inverted RS485 Enable logic */ - dld =3D readb(p + UART_EXAR_DLD); - dld |=3D UART_EXAR_DLD_485_POLARITY; - writeb(dld, p + UART_EXAR_DLD); + /* Set LCR[7]=3D1 to enable access to DLD register */ + writeb(old_lcr | UART_LCR_DLAB, p + UART_LCR); =20 - writeb(old_lcr, p + UART_LCR); - } + /* Set DLD[7]=3D1 for inverted RS485 Enable logic */ + dld =3D readb(p + UART_EXAR_DLD); + dld |=3D UART_EXAR_DLD_485_POLARITY; + writeb(dld, p + UART_EXAR_DLD); + + writeb(old_lcr, p + UART_LCR); =20 return 0; } --=20 2.43.0.rc1.1336.g36b5255a03ac From nobody Wed Dec 17 23:26:29 2025 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) (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 A658B158A12; Thu, 2 May 2024 14:46:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.19 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714661205; cv=none; b=derreMWAYtxQFuBTKA3MW7DqDZzAY+oibuqkWStmZqmaysi9q3J3daVWc+Y7GUTHgDGIGLYaybd3w01cSlr2bp/LIzIOVTAY0SDB4O9ZGLhTDGF/LOiU/gnJieu0pZ1NgKLmRxJpzHNTfWLxQfUpI2JuVn3JRM+ZjWuHAOpv3uE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714661205; c=relaxed/simple; bh=lcpyqo/kIZ8bG16xlC0SZOBkBwextMe9kvhdGFvCZgI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=o5dJfOlDJ7Dztt1NwuwQo8+xEnhJbNt1twYquiQLU1xF5q2CcEsANpfE4/U6xCPkp6ElhmajH0xmtD1r2XFdHEH+E0TzztK+TbuMeDKOKEyo/pZbAMWg8Jj5ttrwwKQmr0gx/KuUZHZWNQbIfouL7lZQ0umzhY6DxK5HAm4oiXg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=acEX/PIL; arc=none smtp.client-ip=192.198.163.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="acEX/PIL" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714661204; x=1746197204; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=lcpyqo/kIZ8bG16xlC0SZOBkBwextMe9kvhdGFvCZgI=; b=acEX/PILDDr15Q5ul0WGPxrwR9Jr0HT4raootaOZGI+83s9ZgApXKqAY wIBSeu2waegmiQmKsCRQSINMGOPNaYeUBALOY48Orx3XmszTw5CpSDgrA 9Rnf3rcZxk3hP6Y/1bCk2JEges9v4v/n6an7++daJfWS+Om/XW3DSNseC hTt1r91IYGrJegPx+7DuAPsBzG4YXY96KVZGm1YAPZRmajnMPdE22UslB NPMCWGdxTwGj59OnlIOP+T2+vQkyte8PFYd1LDSDGZ/fhc3TJFKcGP1kR 61Cyo7aJ/loq7dyeBwd8v6GjhcgnXMMHs743fjENN3CtYM+K02oJlX32H g==; X-CSE-ConnectionGUID: IxKRMC/mRkC6sdvNgFFPsg== X-CSE-MsgGUID: lbpNRUeASKSzk8ir0qxowg== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="10306116" X-IronPort-AV: E=Sophos;i="6.07,247,1708416000"; d="scan'208";a="10306116" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 May 2024 07:46:36 -0700 X-CSE-ConnectionGUID: 3bhdqyNtSre0Jzcary/QMA== X-CSE-MsgGUID: URBp+H6SSLicbhPXDz23OA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,247,1708416000"; d="scan'208";a="31632846" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa003.fm.intel.com with ESMTP; 02 May 2024 07:46:34 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 3D2BDB5F; Thu, 2 May 2024 17:46:31 +0300 (EEST) From: Andy Shevchenko To: Parker Newman , Andy Shevchenko , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Cc: Greg Kroah-Hartman , Jiri Slaby Subject: [PATCH v1 09/13] serial: 8250_exar: Return directly from switch-cases Date: Thu, 2 May 2024 17:44:03 +0300 Message-ID: <20240502144626.2716994-10-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240502144626.2716994-1-andriy.shevchenko@linux.intel.com> References: <20240502144626.2716994-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" There are two similar switch-cases which use different style. Unify them and one more to return from the cases directly. While at it, add missing default in another switch-case. Signed-off-by: Andy Shevchenko --- drivers/tty/serial/8250/8250_exar.c | 80 +++++++++++------------------ 1 file changed, 29 insertions(+), 51 deletions(-) diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/= 8250_exar.c index 1f04d4562878..51f6af16c557 100644 --- a/drivers/tty/serial/8250/8250_exar.c +++ b/drivers/tty/serial/8250/8250_exar.c @@ -627,6 +627,8 @@ pci_fastcom335_setup(struct exar8250 *priv, struct pci_= dev *pcidev, writeb(0xc0, p + UART_EXAR_MPIOINV_7_0); writeb(0xc0, p + UART_EXAR_MPIOSEL_7_0); break; + default: + break; } writeb(0x00, p + UART_EXAR_MPIOINT_7_0); writeb(0x00, p + UART_EXAR_MPIO3T_7_0); @@ -723,8 +725,6 @@ static enum cti_port_type cti_get_port_type_xr17c15x_xr= 17v25x(struct exar8250 *p struct pci_dev *pcidev, unsigned int port_num) { - enum cti_port_type port_type; - switch (pcidev->subsystem_device) { // RS232 only cards case PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2_232: @@ -734,24 +734,17 @@ static enum cti_port_type cti_get_port_type_xr17c15x_= xr17v25x(struct exar8250 *p case PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8_SP_232_NS: case PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8_XPRS_LP_232: case PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8_XPRS_LP_232_NS: - port_type =3D CTI_PORT_TYPE_RS232; - break; + return CTI_PORT_TYPE_RS232; // 1x RS232, 1x RS422/RS485 case PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_1_1: - port_type =3D (port_num =3D=3D 0) ? - CTI_PORT_TYPE_RS232 : CTI_PORT_TYPE_RS422_485; - break; + return (port_num =3D=3D 0) ? CTI_PORT_TYPE_RS232 : CTI_PORT_TYPE_RS422_4= 85; // 2x RS232, 2x RS422/RS485 case PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2_2: - port_type =3D (port_num < 2) ? - CTI_PORT_TYPE_RS232 : CTI_PORT_TYPE_RS422_485; - break; + return (port_num < 2) ? CTI_PORT_TYPE_RS232 : CTI_PORT_TYPE_RS422_485; // 4x RS232, 4x RS422/RS485 case PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_4: case PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_4_SP: - port_type =3D (port_num < 4) ? - CTI_PORT_TYPE_RS232 : CTI_PORT_TYPE_RS422_485; - break; + return (port_num < 4) ? CTI_PORT_TYPE_RS232 : CTI_PORT_TYPE_RS422_485; // RS232/RS422/RS485 HW (jumper) selectable case PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2: case PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4: @@ -774,32 +767,24 @@ static enum cti_port_type cti_get_port_type_xr17c15x_= xr17v25x(struct exar8250 *p case PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_XP_OPTO: case PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_4_XPRS_OPTO: case PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8_XPRS_LP: - port_type =3D CTI_PORT_TYPE_RS232_422_485_HW; - break; + return CTI_PORT_TYPE_RS232_422_485_HW; // RS422/RS485 HW (jumper) selectable case PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2_485: case PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_485: case PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8_485: case PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8_SP_485: case PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8_XPRS_LP_485: - port_type =3D CTI_PORT_TYPE_RS422_485; - break; + return CTI_PORT_TYPE_RS422_485; // 6x RS232, 2x RS422/RS485 case PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_6_2_SP: - port_type =3D (port_num < 6) ? - CTI_PORT_TYPE_RS232 : CTI_PORT_TYPE_RS422_485; - break; + return (port_num < 6) ? CTI_PORT_TYPE_RS232 : CTI_PORT_TYPE_RS422_485; // 2x RS232, 6x RS422/RS485 case PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2_6_SP: - port_type =3D (port_num < 2) ? - CTI_PORT_TYPE_RS232 : CTI_PORT_TYPE_RS422_485; - break; + return (port_num < 2) ? CTI_PORT_TYPE_RS232 : CTI_PORT_TYPE_RS422_485; default: dev_err(&pcidev->dev, "unknown/unsupported device\n"); - port_type =3D CTI_PORT_TYPE_NONE; + return CTI_PORT_TYPE_NONE; } - - return port_type; } =20 /** @@ -816,20 +801,15 @@ static enum cti_port_type cti_get_port_type_fpga(stru= ct exar8250 *priv, struct pci_dev *pcidev, unsigned int port_num) { - enum cti_port_type port_type; - switch (pcidev->device) { case PCI_DEVICE_ID_CONNECT_TECH_PCI_XR79X_12_XIG00X: case PCI_DEVICE_ID_CONNECT_TECH_PCI_XR79X_12_XIG01X: case PCI_DEVICE_ID_CONNECT_TECH_PCI_XR79X_16: - port_type =3D CTI_PORT_TYPE_RS232_422_485_HW; - break; + return CTI_PORT_TYPE_RS232_422_485_HW; default: dev_err(&pcidev->dev, "unknown/unsupported device\n"); return CTI_PORT_TYPE_NONE; } - - return port_type; } =20 /** @@ -1493,35 +1473,33 @@ static irqreturn_t exar_misc_handler(int irq, void = *data) return IRQ_HANDLED; } =20 -static unsigned int exar_get_nr_ports(struct exar8250_board *board, - struct pci_dev *pcidev) +static unsigned int exar_get_nr_ports(struct exar8250_board *board, struct= pci_dev *pcidev) { - unsigned int nr_ports =3D 0; + if (pcidev->vendor =3D=3D PCI_VENDOR_ID_ACCESSIO) + return BIT(((pcidev->device & 0x38) >> 3) - 1); =20 - if (pcidev->vendor =3D=3D PCI_VENDOR_ID_ACCESSIO) { - nr_ports =3D BIT(((pcidev->device & 0x38) >> 3) - 1); - } else if (board->num_ports > 0) { - // Check if board struct overrides number of ports - nr_ports =3D board->num_ports; - } else if (pcidev->vendor =3D=3D PCI_VENDOR_ID_EXAR) { - // Exar encodes # ports in last nibble of PCI Device ID ex. 0358 - nr_ports =3D pcidev->device & 0x0f; - } else if (pcidev->vendor =3D=3D PCI_VENDOR_ID_CONNECT_TECH) { - // Handle CTI FPGA cards + // Check if board struct overrides number of ports + if (board->num_ports > 0) + return board->num_ports; + + // Exar encodes # ports in last nibble of PCI Device ID ex. 0358 + if (pcidev->vendor =3D=3D PCI_VENDOR_ID_EXAR) + return pcidev->device & 0x0f; + + // Handle CTI FPGA cards + if (pcidev->vendor =3D=3D PCI_VENDOR_ID_CONNECT_TECH) { switch (pcidev->device) { case PCI_DEVICE_ID_CONNECT_TECH_PCI_XR79X_12_XIG00X: case PCI_DEVICE_ID_CONNECT_TECH_PCI_XR79X_12_XIG01X: - nr_ports =3D 12; - break; + return 12; case PCI_DEVICE_ID_CONNECT_TECH_PCI_XR79X_16: - nr_ports =3D 16; - break; + return 16; default: - break; + return 0; } } =20 - return nr_ports; + return 0; } =20 static int --=20 2.43.0.rc1.1336.g36b5255a03ac From nobody Wed Dec 17 23:26:29 2025 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) (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 DDFAF1591F6; Thu, 2 May 2024 14:46:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.19 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714661205; cv=none; b=pLYeb1VD9EL890ReRJ1rIfspUjyWzjMpwleOZ/VYDDlp0bcRm4SxOrp+KiydKt/Ry0WhVx63zJ2YaJHgjPYo6t75KatBJIDtC/t5AoPWpj/Bvvl93Ig+ywV0IFevBO3iwpT6nMvYxUqti6mh6eleuMFZSIYOyY93ViGp6Xmlyf4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714661205; c=relaxed/simple; bh=HSPO3BYYrHNKLlywx1qmFZnk+RVxu/4s6sl1HAdCBHQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rRLKHSjYOHdq0CVAkwNmcC3dAcLktgbIX0bi3sdaO+Spl8UspdsuwHMANrWPZvmAoQldLbhJ/Y9Hbuv8dfghov8BVsjw20hNM/siCVW498vXtGSDF9oQjh8q4FN/TAritNOPYs+KGEnfYyQlGxn8BmbrnVmyCGE7txTVFUuNOE8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=PvmcOPeO; arc=none smtp.client-ip=192.198.163.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="PvmcOPeO" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714661204; x=1746197204; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=HSPO3BYYrHNKLlywx1qmFZnk+RVxu/4s6sl1HAdCBHQ=; b=PvmcOPeOuJ8nduja8qSHFdp4c/KDnRTWIUov+H/c+NcdYzxFSW/womri OJqKMb2xwkvCLnhWLXGWbyIZjQ+aDaFV8paV8gpfsiCbwGWd6Drf9mIjN 89A7/c0RcBXWyPajiUwnWZPI4c1vZzFTooqgYrtlb+oh62QONCC3S7vL+ Eeavd9ZLbhxUrOnNF2y53YnrDoK8hMnpwd8IahmzHXXvkUIAuhjMM7rmC LyZewBANcEHGXoLqXqsYiWADrGtH1A8rySr6mNSG7NQQJAUiBKfHIpL85 yWR+/yMcleVkuFSYTtrljYPB6p7DYh8tI0h7k4u5qrAcKSrYbvLJaK5qA w==; X-CSE-ConnectionGUID: Dc1aEHjWRB+VBRE9xKuk6Q== X-CSE-MsgGUID: 3MMmZuRjTk6pKM4K9sRLRA== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="10306108" X-IronPort-AV: E=Sophos;i="6.07,247,1708416000"; d="scan'208";a="10306108" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 May 2024 07:46:36 -0700 X-CSE-ConnectionGUID: ydObUywyQCS8i0iX4ZKWng== X-CSE-MsgGUID: HDeGRwNCR4Wbj1bmJdvCJg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,247,1708416000"; d="scan'208";a="31632845" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa003.fm.intel.com with ESMTP; 02 May 2024 07:46:34 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 44F2AC32; Thu, 2 May 2024 17:46:31 +0300 (EEST) From: Andy Shevchenko To: Parker Newman , Andy Shevchenko , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Cc: Greg Kroah-Hartman , Jiri Slaby Subject: [PATCH v1 10/13] serial: 8250_exar: Switch to use dev_err_probe() Date: Thu, 2 May 2024 17:44:04 +0300 Message-ID: <20240502144626.2716994-11-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240502144626.2716994-1-andriy.shevchenko@linux.intel.com> References: <20240502144626.2716994-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Switch to use dev_err_probe() to simplify the error path and unify a message template. Signed-off-by: Andy Shevchenko --- drivers/tty/serial/8250/8250_exar.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/= 8250_exar.c index 51f6af16c557..306bc6d7c141 100644 --- a/drivers/tty/serial/8250/8250_exar.c +++ b/drivers/tty/serial/8250/8250_exar.c @@ -889,11 +889,8 @@ static int cti_port_setup_common(struct exar8250 *priv, port->port.uartclk =3D priv->osc_freq; =20 ret =3D serial8250_pci_setup_port(pcidev, port, 0, offset, 0); - if (ret) { - dev_err(&pcidev->dev, - "failed to setup pci for port %d err: %d\n", idx, ret); + if (ret) return ret; - } =20 port->port.private_data =3D (void *)priv; port->port.pm =3D exar_pm; @@ -1522,11 +1519,8 @@ exar_pci_probe(struct pci_dev *pcidev, const struct = pci_device_id *ent) maxnr =3D pci_resource_len(pcidev, bar) >> (board->reg_shift + 3); =20 nr_ports =3D exar_get_nr_ports(board, pcidev); - if (nr_ports =3D=3D 0) { - dev_err_probe(&pcidev->dev, -ENODEV, - "failed to get number of ports\n"); - return -ENODEV; - } + if (nr_ports =3D=3D 0) + return dev_err_probe(&pcidev->dev, -ENODEV, "failed to get number of por= ts\n"); =20 priv =3D devm_kzalloc(&pcidev->dev, struct_size(priv, line, nr_ports), GF= P_KERNEL); if (!priv) @@ -1559,7 +1553,7 @@ exar_pci_probe(struct pci_dev *pcidev, const struct p= ci_device_id *ent) for (i =3D 0; i < nr_ports && i < maxnr; i++) { rc =3D board->setup(priv, pcidev, &uart, i); if (rc) { - dev_err(&pcidev->dev, "Failed to setup port %u\n", i); + dev_err_probe(&pcidev->dev, rc, "Failed to setup port %u\n", i); break; } =20 @@ -1568,10 +1562,9 @@ exar_pci_probe(struct pci_dev *pcidev, const struct = pci_device_id *ent) =20 priv->line[i] =3D serial8250_register_8250_port(&uart); if (priv->line[i] < 0) { - dev_err(&pcidev->dev, - "Couldn't register serial port %lx, irq %d, type %d, error %d\n", - uart.port.iobase, uart.port.irq, - uart.port.iotype, priv->line[i]); + dev_err_probe(&pcidev->dev, priv->line[i], + "Couldn't register serial port %lx, type %d, irq %d\n", + uart.port.iobase, uart.port.iotype, uart.port.irq); break; } } --=20 2.43.0.rc1.1336.g36b5255a03ac From nobody Wed Dec 17 23:26:29 2025 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15]) (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 CC73115380B; Thu, 2 May 2024 14:46:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.15 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714661198; cv=none; b=L8mXZev4GMVVNyEbYApdrW8XE9BYw/u/5e4IgjeXE7G0c0LA+OwcSlJmMMtqGVuWoL5+twfDo6Y+33EtqrZoZ22F+MLDm8ZxVt+LRfw+3WY1EJvHZPOd1/bGeBsDUsI4+f7TvTgPwO6DPIqsNsbGNXKhlFDVkN7npp66yVqyOtQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714661198; c=relaxed/simple; bh=HwZRHpqXAKSgF7uYpTCL5EyzBalalYcUyQjZhusykaw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UtXslmTuIJpqFFqKEj9SzX2Mh5aZ3dVeU5Qt9C59rpi9sRxvh7tX/wA3nvh2i1GgESDRP2E/0zPk+m4LE9uHX/NUfXPmGttZZfloSM5yqLX/Gr6jI75vlvGX9tYFPDJOTfFkOoeeX2B8H+Of0TPiOKXuddx7ZyvqajEuJwqlgAU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=LTWgcac4; arc=none smtp.client-ip=192.198.163.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="LTWgcac4" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714661197; x=1746197197; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=HwZRHpqXAKSgF7uYpTCL5EyzBalalYcUyQjZhusykaw=; b=LTWgcac41CsQNVS3lMo+b5fziaOARi3EVnRBKmnAqWqDRz47S5HCn4oq 6bd+LvYNrCc7fQxqXtBOuq6BCaAxDsqIwQf2Tkv8Yy+SjiGCIfgbj95b/ iIuvJI5hHgUEPIAETH0a5h3dNEH3AIs0N+3kf4ADitYwNzdd7NhyrXQme M/iVn0wZ8Xrq+LkvQLepE0UNsgJBee4v40JmJhcy0Yh1SLGuPCQmBrjdH nSslbQhuBOdfmJtzh+hJj8pA0qQ5sQpjzpeLShyv8iyeRDYSgnwBHWlXw h1A94gknxSFJCeoK05a/Re+PRffT1C6+bUle9hnUS0AKCn0zoy/DXRz+4 w==; X-CSE-ConnectionGUID: idAx8vOhRBex+Ik8jkl+MQ== X-CSE-MsgGUID: fHTMoC1ST+iVdR7BgahOFA== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="10590806" X-IronPort-AV: E=Sophos;i="6.07,247,1708416000"; d="scan'208";a="10590806" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 May 2024 07:46:36 -0700 X-CSE-ConnectionGUID: AhbXdLd3QNqEqCnADN94yQ== X-CSE-MsgGUID: gDcM4FSqR+GDYZNbsAVGWg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,247,1708416000"; d="scan'208";a="31753961" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa004.fm.intel.com with ESMTP; 02 May 2024 07:46:34 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 5254ED5D; Thu, 2 May 2024 17:46:31 +0300 (EEST) From: Andy Shevchenko To: Parker Newman , Andy Shevchenko , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Cc: Greg Kroah-Hartman , Jiri Slaby Subject: [PATCH v1 11/13] serial: 8250_exar: Use BIT() in exar_ee_read() Date: Thu, 2 May 2024 17:44:05 +0300 Message-ID: <20240502144626.2716994-12-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240502144626.2716994-1-andriy.shevchenko@linux.intel.com> References: <20240502144626.2716994-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use BIT() in exar_ee_read() like other functions do. Signed-off-by: Andy Shevchenko --- drivers/tty/serial/8250/8250_exar.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/= 8250_exar.c index 306bc6d7c141..bf3730f4231d 100644 --- a/drivers/tty/serial/8250/8250_exar.c +++ b/drivers/tty/serial/8250/8250_exar.c @@ -340,13 +340,13 @@ static u16 exar_ee_read(struct exar8250 *priv, u8 ee_= addr) exar_ee_write_bit(priv, 0); =20 // Send address to read from - for (i =3D 1 << (UART_EXAR_REGB_EE_ADDR_SIZE - 1); i; i >>=3D 1) - exar_ee_write_bit(priv, (ee_addr & i)); + for (i =3D UART_EXAR_REGB_EE_ADDR_SIZE - 1; i >=3D 0; i--) + exar_ee_write_bit(priv, ee_addr & BIT(i)); =20 // Read data 1 bit at a time for (i =3D 0; i <=3D UART_EXAR_REGB_EE_DATA_SIZE; i++) { - data <<=3D 1; - data |=3D exar_ee_read_bit(priv); + if (exar_ee_read_bit(priv)) + data |=3D BIT(i); } =20 exar_ee_deselect(priv); --=20 2.43.0.rc1.1336.g36b5255a03ac From nobody Wed Dec 17 23:26:29 2025 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15]) (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 7B5F8153BCA; Thu, 2 May 2024 14:46:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.15 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714661200; cv=none; b=BokSVHhjLk80FffXdj9Eo8P8d4Thlm3di9x1waQUnYcD2u2x/DFZxWzjKe3C+CQPnyBpQGhNtB5zr6VHOBUTFDqhZ36e04R+Y0GFRhVfxCvXgU37+VKuPYesrbBOZ6gjL2HFjgRpxTYFyzxW+b/Oir4+kCY0HvAW66eiux1orVY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714661200; c=relaxed/simple; bh=KxyK8ZGKsiW++U8bXvlHx6KRpe2z/axkKPSBZA7qYtk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=shIVPV4mOt4ByJL7rE9QfEXAToxKmjQvxSqc59XEgn6gKKfX0k3ahaqVj7bzHNlN9ODzKomuXe5328TGeP3+wf4wlIuXK9SymQqvcqva/dt/ienoSC3rchShuPksaPz0H4KtLy/izhwCxOmSCVfKiNR5xbyPNEYDYM09vqZsIpg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=h3jjlIN6; arc=none smtp.client-ip=192.198.163.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="h3jjlIN6" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714661199; x=1746197199; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=KxyK8ZGKsiW++U8bXvlHx6KRpe2z/axkKPSBZA7qYtk=; b=h3jjlIN6lbGFL02iqpdcYbdFIff9IVpBwsdDbLZkITit4nzZsrivbKS3 aTGcdiL7eOBw1onrt52fCCdysrEPWmdaTB+WvJAVmZUY6rdSqzNNmZVnN P7CVpQID2sZMPwCOMuSuea3XrOYFQq9dIUgSjEX740qK4Up3vMtVbZ8qE OS7BeWkTdxotKIBzceJjDZp3F9feghpQJlpfoX6Ep1Z9Oq97g+gnGx6/1 N8hjdFp9XLpVdrOYXM2oc+okKrAOajaApE5JqIqj7MHdyI0zJpY2h3pFw qk3CazPVIYcPy8FMR5pI03T9gUkWm6jvswSUvtIvCGaNY7+pgsxIanRTj A==; X-CSE-ConnectionGUID: JWyTZYIgQ56DQj/DU1XFRg== X-CSE-MsgGUID: 8dRMQNf8SmK7DjrSKfRfog== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="10590811" X-IronPort-AV: E=Sophos;i="6.07,247,1708416000"; d="scan'208";a="10590811" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 May 2024 07:46:36 -0700 X-CSE-ConnectionGUID: MuZk85TcQr+yqM9qgiA6Cg== X-CSE-MsgGUID: Yfo8qtO5T3O63GTpzpmeYw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,247,1708416000"; d="scan'208";a="31753962" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa004.fm.intel.com with ESMTP; 02 May 2024 07:46:34 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 5A44AD79; Thu, 2 May 2024 17:46:31 +0300 (EEST) From: Andy Shevchenko To: Parker Newman , Andy Shevchenko , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Cc: Greg Kroah-Hartman , Jiri Slaby Subject: [PATCH v1 12/13] serial: 8250_exar: Make type of bit the same in exar_ee_*_bit() Date: Thu, 2 May 2024 17:44:06 +0300 Message-ID: <20240502144626.2716994-13-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240502144626.2716994-1-andriy.shevchenko@linux.intel.com> References: <20240502144626.2716994-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Make type of bit parameter and returned one the same in exar_ee_*_bit(). Signed-off-by: Andy Shevchenko --- drivers/tty/serial/8250/8250_exar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/= 8250_exar.c index bf3730f4231d..6764aaa20df2 100644 --- a/drivers/tty/serial/8250/8250_exar.c +++ b/drivers/tty/serial/8250/8250_exar.c @@ -280,7 +280,7 @@ static inline void exar_ee_deselect(struct exar8250 *pr= iv) exar_write_reg(priv, UART_EXAR_REGB, 0x00); } =20 -static inline void exar_ee_write_bit(struct exar8250 *priv, int bit) +static inline void exar_ee_write_bit(struct exar8250 *priv, u8 bit) { u8 value =3D UART_EXAR_REGB_EECS; =20 --=20 2.43.0.rc1.1336.g36b5255a03ac From nobody Wed Dec 17 23:26:29 2025 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) (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 ED034155754; Thu, 2 May 2024 14:46:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.19 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714661203; cv=none; b=smEeDdjbjM+ur3HOWJFlZKHptz8xg57Vi95DZ/qOPyE2jFxtgNTNFzZoqhrvF4cM1kKI/33OcBOblIC6w4j0Na0evkpHemgsWK52Ctp6jZts42e9sOs9NtilbdxE2PnupUqnpAfbLmG678AyYaLgJaqvDeSquQIJHwmcgyGTyZg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714661203; c=relaxed/simple; bh=5DuY6WAqhp93PuCEXWGtdXgyMtCRkfRxNV8OoPPbmFw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=R916URJFkT12sdbqT0sfo+b5DFA7QVcADCR6TG7JbaqMySmfEevhYmsI8qApWhizhUxCtfd/bwBjur6t92bvub8Y4t9ozriqHS1yPKwOMeXTaVPUVv57pppLLDu52C58InpubrLHa3QwD2BPgzBAoWAP8gSDsxyZjrriKjstydM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=BzHwtzpI; arc=none smtp.client-ip=192.198.163.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="BzHwtzpI" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714661202; x=1746197202; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=5DuY6WAqhp93PuCEXWGtdXgyMtCRkfRxNV8OoPPbmFw=; b=BzHwtzpIj/Q7lIzqDc1qKrbshA5DBrOUUbOrRx9iF90NtCm8VjPbco7R 10HOcOjwsesObBK1l4t0wK1PlvDU9TtyKMZw36XKUzRgp35cp3dw3FLk3 zNTfa0+J9nRMC5DHYQAt2pii2Fth0n9ljxy4TfYCNYJ474CHQI9AKt4U8 IW1dZdbrH6WKgZxI50Hg+Ns3ojUL925hCPWDyCNR97GZF5RV3YYRFKjor V/89gOitJ0WRBPBiLHdAxLWSOBfnddpErk7zGJ3dR0Q8Xv6PfPY4C4BFK 5hlgZ+RSectAdcbGkKUQCaFapuM+X8xOjwDfADF7syVM1gzKOlGiUQqLA w==; X-CSE-ConnectionGUID: FeMKodL1SMG/Y8EOGl3slA== X-CSE-MsgGUID: 8igCV2YmRM6alVirLeCdfA== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="10306114" X-IronPort-AV: E=Sophos;i="6.07,247,1708416000"; d="scan'208";a="10306114" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 May 2024 07:46:36 -0700 X-CSE-ConnectionGUID: qJ8afCjLRHqiHGILVtcUxw== X-CSE-MsgGUID: kCr9v5D4RFqX2hhhss3x1A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,247,1708416000"; d="scan'208";a="31632847" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa003.fm.intel.com with ESMTP; 02 May 2024 07:46:34 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 62589D7B; Thu, 2 May 2024 17:46:31 +0300 (EEST) From: Andy Shevchenko To: Parker Newman , Andy Shevchenko , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Cc: Greg Kroah-Hartman , Jiri Slaby Subject: [PATCH v1 13/13] serial: 8250_exar: Keep the includes sorted Date: Thu, 2 May 2024 17:44:07 +0300 Message-ID: <20240502144626.2716994-14-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240502144626.2716994-1-andriy.shevchenko@linux.intel.com> References: <20240502144626.2716994-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Keep the includes sorted. Signed-off-by: Andy Shevchenko --- drivers/tty/serial/8250/8250_exar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/= 8250_exar.c index 6764aaa20df2..dd179a291594 100644 --- a/drivers/tty/serial/8250/8250_exar.c +++ b/drivers/tty/serial/8250/8250_exar.c @@ -6,6 +6,7 @@ * * Copyright (C) 2017 Sudip Mukherjee, All Rights Reserved. */ +#include #include #include #include @@ -20,7 +21,6 @@ #include #include #include -#include =20 #include #include --=20 2.43.0.rc1.1336.g36b5255a03ac