From patchwork Fri Apr 19 14:17:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Parker Newman X-Patchwork-Id: 790653 Received: from mout.perfora.net (mout.perfora.net [74.208.4.196]) (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 E019112FB12; Fri, 19 Apr 2024 14:17:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.208.4.196 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713536260; cv=none; b=TJxIOu33kOXTFpPnAfenxMxcZTBvxm10Q+cy2AavTmYV0tLB4gWfNQPa9pnNLlRFTQzxtcBQykZTv/ooa9/QQfvZNdjanUBrVXBs9rhpQlYnmh9f6aZHhB3YRYjDRuRAQso+PbOLBUvoqQ2we+MW7FLA0Zt4sf9nipSK+cY5jlg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713536260; c=relaxed/simple; bh=OAeYXdnsHo/DbZFmMhO4X2AF1kWlsKRdM1cAg1u4sQQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=r3f/HecG4CdqYhnkiiphQ42vXh/z4h541ssQ6M8r3mJbWohEuCqclXp8Yu91hxg9YJE4lb4OruOu6Uiv3ZZybjGyiySJYSYHmfXZ+dgN+D6AC2Z8JlAEd3vfVBPI52kFTDlSk0p3H9s5gAQzPg7pjeIGaGjU/v+fEQdfWTQo0Ww= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=finest.io; spf=pass smtp.mailfrom=finest.io; dkim=pass (2048-bit key) header.d=finest.io header.i=parker@finest.io header.b=aNkmz85f; arc=none smtp.client-ip=74.208.4.196 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=finest.io Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=finest.io Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=finest.io header.i=parker@finest.io header.b="aNkmz85f" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=finest.io; s=s1-ionos; t=1713536244; x=1714141044; i=parker@finest.io; bh=+oqF0TtEVeNFKa6CNbV30K8acenVtAv92jduxJuUnGU=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:Message-ID:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=aNkmz85fYlBOaGAHBNxKdo6B3ne/qJKa3N8g5PFI8PVuslkcvP9B8HwsRwq1upGL +isq3Q29HOtExiiC3RSZL35q97bCiG6D4l1njg4JDYkjEAj8X6IT6XaNvjSSowuor vWLtKXvb9ATlqw8qRpibOKyIBcca9Uy3/umw/59J9ylcdNY0awugKjVWUeWZlQFEh Bm8jXsAc+EnuAPIAeNlZgZuRN7lIo+p+LfUAGaWtZzLcntfmSnefWDfGQ0rnLPCVN x4N0NEc3EYjBxExpAFze6xF6NDyFKYAf25Q6XV9zlrQDCp3OUeyWiGNrkT0ZchPrO XKjAmif3oVVeXV1l5g== X-UI-Sender-Class: 55c96926-9e95-11ee-ae09-1f7a4046a0f6 Received: from finest.io ([98.159.241.229]) by mrelay.perfora.net (mreueus003 [74.208.5.2]) with ESMTPSA (Nemesis) id 0MBVXk-1rpXJV2uko-00AWAU; Fri, 19 Apr 2024 16:17:23 +0200 From: Parker Newman To: Greg Kroah-Hartman , Jiri Slaby , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Cc: =?utf-8?q?Ilpo_J=C3=A4rvinen?= , Parker Newman , kernel test robot Subject: [PATCH v2 1/4] serial: exar: add missing kernel doc function parameters Date: Fri, 19 Apr 2024 10:17:01 -0400 Message-ID: X-Mailer: git-send-email 2.43.2 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Provags-ID: V03:K1:VUG1KUrvzth9u/JxCJmkf7s90ubBuIDoDNYWTM2YYLRx86BiZMw wh7jTcYzGOyVDr6C1yr4znNtQzhCoy2R6OuZxo7TA+PLrysTBK3Ni26QNCgdb9Nklquysy9 B0mUq2PyB3s00o1abSFo+PsbTUN2uVvd4apt7p82ObFHCXckFR5UQjrdTN1pazxKnKgpYMl qYbVCG0W9T96Xv4/Q+paA== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:gNPXuRkoSpQ=;Otn35BzurIR2v3UC2DIDbYyZH1c l9B3euleK2Rf87vEoM74oa8GchMDF6/cbRcFTSU7qaWla4rK8f6NaMGZS7ofdO7MrCc5jCTA0 0xfKwz8hR8m/kDAfyiC6vRUFhAiavjdpDfSsIMniWqWKiiOEhRI9+k9BjS0J/dwgPO8iLq+yC xlM5+rIuWd0zq+IJZXpyA45C2DWBUjGuBuuOu71MWxSEfono2oYsJS6UPcOgAexCFKuXw0+p0 zHSiseIRpyqKw5EaPTrEyhDT0lHQYUXOR/l1bynjVJOJiE+CBagjPDdVkTa6HycNouZziuJTL 0kFuKr/v6kJ8LKDoBoYziugROsW858LMNq91XhrloekhaA/Zr20OPR3npv6lqpK0wBvXM0FZ4 xkPm906pAmgFtrKxZnGcUIhASXhXKxYSgw0HQzzzGcCc6am9C0q6KFbFM7kajg/NlkUNmmANm yMaSdyeb1yC68QoFS895qa9xKiO2GaXQ7EVVOzbHXrWb/a0vOTThgxtnFMdEJmiE15zZZy/cf VaPBgOgCIllepLHpkzMNcNZXuROgVkS0sTk1v79K3blkpaVvcVW9VxfDpPVoIU+kFqsXjqlYi g0ztW68dCSq3I5TTpcs2Z/W0FUg+Q2T8a0Tvx5/sT8wNr9Tmnz96eGeZtuwoH9/Lf4OqSiHgr /vgUwD9sP+R+ZHfEZngJeAup6U9UjFxuF++3u08hrFxGfIEVO2XSC4ZhJYr2AHcFc6uP6Z7+8 QhDPwdYznya4dL/BPeluoIyIuvDe5aeNoaHLRsBVi5fO5Cm0h1Q2eE= From: Parker Newman Adds missing kernel doc function parameters to 3 functions. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202404181353.1VIC4cz9-lkp@intel.com/ Signed-off-by: Parker Newman --- drivers/tty/serial/8250/8250_exar.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.43.2 diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/8250_exar.c index 5e42558cbb01..a180741da634 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/xr17v25x * @priv: Device's private structure + * @pcidev: PCI device pointer * @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_xr17v25x(struct exar8250 *p /** * cti_get_port_type_fpga() - Get the port type of a CTI FPGA card * @priv: Device's private structure + * @pcidev: PCI device pointer * @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: PCI device pointer * @port_num: port offset * * CTI XR17V35X based cards have the port types stored in the EEPROM. From patchwork Fri Apr 19 14:17:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Parker Newman X-Patchwork-Id: 790440 Received: from mout.perfora.net (mout.perfora.net [74.208.4.197]) (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 C3ABE12CDBF; Fri, 19 Apr 2024 14:17:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.208.4.197 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713536254; cv=none; b=mGn6IDRMxwMLd45INnUw3NPEsqfbnQK5FcCr2UjEzPXZ7NSZUWZsetNXqLHJM1hu5d1lX4m+Zcqs0e4ArnU+2031hnEBOL2pwH8HtT+aU2wifdmK+xbY2hBRxWgj39ggRm7jhPHHe1GxUaUott1yyDZ+KrdFW7BkD3J5BfYa3Ng= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713536254; c=relaxed/simple; bh=6FcMwAVQ1oQ13VSGE3/gSNaKF921zwjZHklsSqpjmWk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=MHciLKfAnRw2CzYbOEX0Y69J3/xtoJrmyoPRKGukud72FEpzPNDDN0JginCa/8pGIuwghk8raZPDOfxu4yJaSav319cKdvSl6X1zlUEgDX1osnfmsg82J+pZmNCd+ZQt1yabJXlJyQw8LOIa8reK/cDR1awkYgC02p9oXeNUkVU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=finest.io; spf=pass smtp.mailfrom=finest.io; dkim=pass (2048-bit key) header.d=finest.io header.i=parker@finest.io header.b=OAiag4wM; arc=none smtp.client-ip=74.208.4.197 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=finest.io Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=finest.io Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=finest.io header.i=parker@finest.io header.b="OAiag4wM" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=finest.io; s=s1-ionos; t=1713536244; x=1714141044; i=parker@finest.io; bh=91znGsyHENCtexZoIjuZ12Bug2BwW+jFHp+nXCy9hyc=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:Message-ID:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=OAiag4wMjp22WE+ZuM2jreH2XJ9+fjOxATJqxVt98tunp2sH9oS/d0uemwOSEZnY fzdFYu4VNhe8gq5ev1Diu28bVBgGTafR2kSnwFyxTBKv6tkDADDzlvr3JXoZvXvXc f8yobC/DKFdYrwtjM3om7cluLs80jXe9biK8VDdxRJ/VLVudZJ8/cty1LsfKKLpqV JqaIdaKSr2fW3zScF47c5ar80jl6ypbhQQ0T1oRaEXHuYEyOAUYf9FXCsTo97Pecy PDBcGHg6jy9TcfFdx7irgJFpo/HNVN/Z0NTDm8APzvPOw5hSGiC5SwYWhBDcdm62r 8WGaEBeT4IPpfEr70w== X-UI-Sender-Class: 55c96926-9e95-11ee-ae09-1f7a4046a0f6 Received: from finest.io ([98.159.241.229]) by mrelay.perfora.net (mreueus003 [74.208.5.2]) with ESMTPSA (Nemesis) id 0LjHGD-1saAkF05Z1-00dZVz; Fri, 19 Apr 2024 16:17:24 +0200 From: Parker Newman To: Greg Kroah-Hartman , Jiri Slaby , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Cc: =?utf-8?q?Ilpo_J=C3=A4rvinen?= , Parker Newman Subject: [PATCH v2 2/4] serial: exar: use return dev_err_probe instead of returning error code Date: Fri, 19 Apr 2024 10:17:02 -0400 Message-ID: <447100ccb30be8af635fe7f07c70a7d6ddd3427f.1713533298.git.pnewman@connecttech.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Provags-ID: V03:K1:gJ/feI4o66KI/+U//3vro5I/LLpQ9rlYQ/tXWgyYls84Gd0rbm4 3Ny625v458WZpo8EV9jNl5eIJ+5t8hPuNGrIlKO2erGwDSFjdmkEyMwiaFq+TFvUOgy8Ac2 ZwmIrWW9uhQVKblGlE2o1jcJyeEE3Jp+wtvhndP59t0OLZstv6czD8p8NhejUBs6fLt6nrg 5r84oNtW6OC29t/bcivfg== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:MeJh/ngW2n0=;bulCA/JtoEuf94hMT98XK/gXUcJ grjoS1ec77wgEwoDX59KjTdvaYPg1FTSVsFnWWkCyYWCQZ0jiw0tmL0E61+HunUvp/bbAr2pO 4tBm1t3X3HjCQjm/NsjLlgWS+NXAa1O56Yb8RpJjzzKbqrbdHbpM2b5LJiAZFwYkYAOp0SbsV mZo+x6huGZ0LLvWAa2y7AO02+2XRllQ+VAV4XUejvU2wrecPKWNv6kGQfXJ0HohlkXk+DpfpZ 4Onxh3zM1+FHd6kmVERrI/Txy7PkfeoVxt28eh6pBhbuDyuqkYKWzir05ZJfziQDDrvzPcog+ JKmQ+g42DlXerE7/vL46IvgwNjSRnz4egzyzvVKK6qwjlJJ5y6MKu1D+NHQrF6Xdz03CA5cSL g6kJHRupKcinc5JeknFcV1Y5IjjfZ/xI/NiusPc5mzhyLMTjRLApjjL9XpI4WK+wNepEvx0rn F7vaUBOk5b69P5wlY33fVtA5ENmh8OeC/PtqI6bbeEdNhvgyrYI5t+4zjCKDJpvYbPPLOyjFb ShAJon5wyTb8rDngRj7QutVr97O7DiE7eETSe7khR/64wFdUOac3X/G0yls4Ubp+JvbeYwzMY yGxisWaEqD4gg5VWs31iUzTiX175Fz2BNwE24Dpy8KAlGRSBg7nyzJLXfQpSRLJCM69S+mrgB jbJsE9p52Xurmx1+1eXyXLjURBXWPdHhZ8uMFnv4gp9otIP+f068X/56tmi78TXVMgLwhLT2q eu7mmtlYsDw5JwHcNHPhEcCuxsl4/2NDQTEinr2BhQUbxd5REyEXn0= From: Parker Newman Change to returning dev_err_probe() instead of returning the error code after calling dev_err_probe(). Signed-off-by: Parker Newman --- drivers/tty/serial/8250/8250_exar.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) -- 2.43.2 diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/8250_exar.c index a180741da634..01748ddbf729 100644 --- a/drivers/tty/serial/8250/8250_exar.c +++ b/drivers/tty/serial/8250/8250_exar.c @@ -1551,9 +1551,8 @@ exar_pci_probe(struct pci_dev *pcidev, const struct pci_device_id *ent) nr_ports = exar_get_nr_ports(board, pcidev); if (nr_ports == 0) { - dev_err_probe(&pcidev->dev, -ENODEV, + return dev_err_probe(&pcidev->dev, -ENODEV, "failed to get number of ports\n"); - return -ENODEV; } priv = devm_kzalloc(&pcidev->dev, struct_size(priv, line, nr_ports), GFP_KERNEL); @@ -1587,9 +1586,8 @@ exar_pci_probe(struct pci_dev *pcidev, const struct pci_device_id *ent) if (board->board_init) { rc = board->board_init(priv, pcidev); if (rc) { - dev_err_probe(&pcidev->dev, rc, + return dev_err_probe(&pcidev->dev, rc, "failed to init serial board\n"); - return rc; } } From patchwork Fri Apr 19 14:17:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Parker Newman X-Patchwork-Id: 790655 Received: from mout.perfora.net (mout.perfora.net [74.208.4.197]) (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 6E57912CD9C; Fri, 19 Apr 2024 14:17:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.208.4.197 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713536252; cv=none; b=bX2c3qNyyaDAc7CX/yNH4my60Dai3MYNW2FMAkKpx6PBoGg+4U8L/weSPAWT+jlzlmIOdYCQ4xpdoWsRIpCk/fOfhK+7lTI2M4rShCr6iB92AjqcNutB/drF/c5cAG2sRJsVhLuWTVtC8aefojDhlbHBiwxU+w0eMbQPIFVy0s8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713536252; c=relaxed/simple; bh=HZJYsLSJO95Bda462oEdjVbzym3pJBr84Yzl4diz1Zo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NKAEzUDQrYaSvSgjLW+vigImQ954GaofEcVrpFp1t4xqVIaweQTlEYi8UoZRNFugNC3OmzThhyvHwcWsW3ofZP7BiCqxc6xJgtfhRc9vzGbu2ENK03/+7uTxXU20fqNdgMUYc8Vgh0hGSrQ6eFAGw+LwwSAPiH1qkgVI+oC3WFU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=finest.io; spf=pass smtp.mailfrom=finest.io; dkim=pass (2048-bit key) header.d=finest.io header.i=parker@finest.io header.b=F27+akl6; arc=none smtp.client-ip=74.208.4.197 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=finest.io Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=finest.io Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=finest.io header.i=parker@finest.io header.b="F27+akl6" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=finest.io; s=s1-ionos; t=1713536244; x=1714141044; i=parker@finest.io; bh=YqqvPxv1B8DJWco4lgEqCKwyKGylD23VurZSNiTLfx8=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:Message-ID:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=F27+akl6Altf+hlTr/3pT0wqU/+auQzcceKSHhbkFyvam7DdyBqHarvBlASC2EHA fYxezS/1oYkMWzQFJESXB28RNKWsndgggYC5/ZT+dtghKcHK73HlV/Twr7tmkSRCp oUt/J+tlfugKJ8F67ddo325a8J/QMERIQ7t/0alT2dqMpGfU3yZ2j/Fl3sVcKvvHm zjKCJKwfE3I/GMJQ011vQrwqP1Sf2YGyeHsCr1nVkyLV+uC6KUN2LFbKwY5QlN7Lg DaRkyT5HH3jI+XbEVpCRB/jmz0el/3PH9rYX/BiE3qeWgMKk2auqfVnhHDyZIB3Lt o+vwHgNWSclaDO8+tQ== X-UI-Sender-Class: 55c96926-9e95-11ee-ae09-1f7a4046a0f6 Received: from finest.io ([98.159.241.229]) by mrelay.perfora.net (mreueus003 [74.208.5.2]) with ESMTPSA (Nemesis) id 0LvlsI-1snWS81UMu-017SbY; Fri, 19 Apr 2024 16:17:24 +0200 From: Parker Newman To: Greg Kroah-Hartman , Jiri Slaby , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Cc: =?utf-8?q?Ilpo_J=C3=A4rvinen?= , Parker Newman Subject: [PATCH v2 3/4] serial: exar: return bool from exar_ee_read_bit() Date: Fri, 19 Apr 2024 10:17:03 -0400 Message-ID: X-Mailer: git-send-email 2.43.2 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Provags-ID: V03:K1:xzqVBhCqb/U6CtNR6GG3MzefvOY+ONp/ikI1kv8y6i8PTMvBMtq fbSB1bte7QZ1aWW7jOxQox9G3ilqoVb8j4wDXph2la30vdK5XRDSR8+k8RO10YXEd61E5Zi 2MXMUcXfZY/Hs/Eeq4g5fZ9sub9EiaCnviIJBN/D7F5+/ZDQu9gAVC0tfobXG6Voi2urrXd gGL7nWqy3CXK8m17NFAng== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:3/ULcuGN6sQ=;CxQJ8hjwFj2I82WMAcdKm0RXpjM u6Ef/vHIpgyjvEVfGcxtEdMDx7CnYWP/hhdSFnJlGxiUETGW/lTMGu8Srxvzw0QZRzfdnBvzA QotEgQS7Qjt8GFlljkyiVk7zfRNneCQUEzIK7mrHAgVIwxF+qxq7m/CW73Ug0+JytWzd2NMkA 4p8py1nE9QYpx+UB7/8KzaHUpVIf9hag7xD9dZmskfa7kMuDQkdP+hCiCXBKRmoaz9NxuSrrA hwnqZiq6CmHmwx5a1DHNPiYvTjX8GNFvpoon3OY/vpZPdOTfXcp0/H8bvHe75NzhpnZYpJoaX HREU/ZipvResBHOkMjuZwfmXGUkWGMW7qXQ8d3AD2x+pKlli+S64KbdnW7pkGZf2mN3rDIg99 H1Til+E9oLQvC/n11X5NgHBKOxLA/7CN2juHvATwXFPZOIcysRcXOIlzaKD7Dg/sghn7bM12O 54rld8JLinPd18OtIyAofWngQZYCiWNCSMpFeeNh3N6dAyPM23ZsYwpr3RZJDe+zC9oZaQgRI oy0z4eufshZdsFFVmpOX1uew2aFNlIonevimLQk08D6DuHYYXjsRSB9EZXer2WxVCGqg68vdy QdqCUILNjYF/JcUqDxWeNOjykwcDkyjkIEwQF5sJ0zhQnm8BaxXIzH6ULNmqk/IHri3jRld8v NCwCzvjEo9qrwl8ANIGtV857B/qtqhyNG7vqkZPZRAtrzv0SCxM+Ov3TP4Pv1KjDUc1zDdVtW 3MATxOZ/3TMBFpyK7CR+puKs8/NYsXngaR+LGWjk6ddUeKeOhZg2HA= From: Parker Newman Change exar_ee_read_bit() to return a bool instead of u8. Removed need for ternary or if/else for return value. Signed-off-by: Parker Newman --- Changes in v2: - Change exar_ee_read_bit() to return a bool drivers/tty/serial/8250/8250_exar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.43.2 diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/8250_exar.c index 01748ddbf729..8665d3b7b673 100644 --- a/drivers/tty/serial/8250/8250_exar.c +++ b/drivers/tty/serial/8250/8250_exar.c @@ -300,7 +300,7 @@ static inline void exar_ee_write_bit(struct exar8250 *priv, int bit) udelay(2); } -static inline u8 exar_ee_read_bit(struct exar8250 *priv) +static inline bool exar_ee_read_bit(struct exar8250 *priv) { u8 regb; u8 value = UART_EXAR_REGB_EECS; @@ -317,7 +317,7 @@ static inline u8 exar_ee_read_bit(struct exar8250 *priv) regb = exar_read_reg(priv, UART_EXAR_REGB); - return (regb & UART_EXAR_REGB_EEDO ? 1 : 0); + return regb & UART_EXAR_REGB_EEDO; } /** From patchwork Fri Apr 19 14:17:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Parker Newman X-Patchwork-Id: 790441 Received: from mout.perfora.net (mout.perfora.net [74.208.4.197]) (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 6E53912C817; Fri, 19 Apr 2024 14:17:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.208.4.197 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713536252; cv=none; b=ZCGo9PJ5kYseY3J5fhUZt0sCf6gS2b7dEuvrxw1QP/8HiGD8XIYsn00gwUhcYIoDajaXlJqxIPb+hm1x8IgMG4SE5FHFSv0XhaH6opkPT5impyEE9BUU02RSryxKsOWTw7YqdaoetvxJwtyInpLG80zaL0rOFcvX5D4+To8hhdg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713536252; c=relaxed/simple; bh=euXPQiBqqIG2+cRuTUbXpVJ3280d78ADpFb0BaPYG54=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=cqb8kk6kIykoulvCGoR1Pk78thQZ+Hz8IIz1PSv5d9bRzTGcqe/xMHEV6QcSpIWzeG14QU7eEU8+f9eWcR0cw50wfHqS/H88Tx+a/bniiVHD4eZClxAiy5dZYHzhnzibUgrUlrQXvhKkEehMLVSdjxnZYLKg/E9Ge5hM+DWVEAA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=finest.io; spf=pass smtp.mailfrom=finest.io; dkim=pass (2048-bit key) header.d=finest.io header.i=parker@finest.io header.b=C4kmhbju; arc=none smtp.client-ip=74.208.4.197 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=finest.io Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=finest.io Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=finest.io header.i=parker@finest.io header.b="C4kmhbju" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=finest.io; s=s1-ionos; t=1713536244; x=1714141044; i=parker@finest.io; bh=nWFQ37RsfGMWOYIzH+ps6Dt2wTvbrcgBevzsVRsv/OM=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:Message-ID:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=C4kmhbjuw5LZ4uH/ZvMGpZMC8feopacN9/1dZM+U2FhwgHfhiMWbLD4mW2osHRbA 4fuFeC9c+RTsKh8ZOJTkm6tfo0imZzKCQicXHDVUodnNDX1P9YVwy9PQsysVICifD uCaoS0JvMe5pvRAGvooUBLG+6qUD9eniZM+4RAuznate8zUcuroWiO9Y6WsyKHzDY Yp3kmZgz8aIDCjmkkPPY+iRuQRYLoMsgDiwc5sk66chxynEGC6o0qSEeWelIsZEFC IRrFHJfoAqSzjImeo+m9mHWBZHgmjYoF0c/LmDHD8/8uCjg0EXHUPBOpYpi7V+1Hw NCocvfFzJoOuxfc7VQ== X-UI-Sender-Class: 55c96926-9e95-11ee-ae09-1f7a4046a0f6 Received: from finest.io ([98.159.241.229]) by mrelay.perfora.net (mreueus003 [74.208.5.2]) with ESMTPSA (Nemesis) id 0MO8aA-1s3Ih62rx6-005cbY; Fri, 19 Apr 2024 16:17:24 +0200 From: Parker Newman To: Greg Kroah-Hartman , Jiri Slaby , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Cc: =?utf-8?q?Ilpo_J=C3=A4rvinen?= , Parker Newman Subject: [PATCH v2 4/4] serial: exar: remove ternaries from cti_get_port_type_xr17c15x_xr17v25x() Date: Fri, 19 Apr 2024 10:17:04 -0400 Message-ID: X-Mailer: git-send-email 2.43.2 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Provags-ID: V03:K1:e14IZuYugv8xagY2QPH0Fz/gGkBpK3QfnisJhgzbn3Dkbz+BL0I 20gTiAWsLO6wCszC1oSJiGjHckV+U3ENhRVrU3cCcVBy8hVPmU43YfgMKkkJV3Miij/2a9L qGcmxoX38afdWBqvWwRqo+26G+89lN3jxTXtOZBFEB9kLl8Vgg1dZd6LU4Byo6ownImBol+ uo/Ek/bJ2Ed823bg39t+Q== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:BwRiKUOze6Y=;EvYC6pMJhilTeMZfsCFEDNjmvwa 1xcpwMRk0KxyE0nLMPkEU8VCHdzOHujxlZjB3OMCkjSZAdAbLhTBLVv9K1GBWVfkN3YO+YZKf OjVPqHTWKP98b3oDn/jBv+k3IkDc78i7MT90/Ovn+ETgPrTWRlyHWQn49Aq6U4CDjYRyZzWBI UEJoe3inA9OSt7nHabADMY1+qH1iTq0rXrLtj1+QgSAZbgMi4HJZBow3nmDq/XfX4jXNkPAu2 4deOsTC3xvfZoQ/7R5nN+iKiZ4rxkMIhJWXbxglAT536IQxCrIy7IQzypjT4qhxCeJ6+6qDak HfPYmUumPNdTXtc3mkRPcRyYpgYvPB1tGrrA1B8VMY2tV+N0DF7BTAOGvku/LuJNYbOTPhpAg AM4N7MQlZz6i5EgaFrDiwwT50bHyJ1jQ9XsjFbawuNfJ+rRfL85Nc0OnbNkjSPWkd+HqjndDS aXkuyg6PPh2AnFJrdaVctAU3BJAKlqUDCozs23kFB9Vo5xNiI5ZYO3KVXSjUj0KQvARiQ59uh xH7HrJKBHCbbMgpPzXTROqHa2+2szeyrGP7llb+z/2cZyY5QeBoLOUvbiQ14LmiSuP9H8uVHG qTFx0BQMGMjO9vWuhm+ropH6dwk0xhagfV9vzy6qLwNQzX5pKaxawhEAp9LRG02MNGI3gEnUU 0rNYGKJqMaQMHF7S/ij2gAWzTyYLNxUIV5iZ/gN+mbtpjiGFnvDqkiUQYmWExB60KTbWC1T1P q738Vv259C7KUbOZbJzG1ousVHtm09KHepYVs1aF1H59SooDzM2xB0= From: Parker Newman Remove ternary operators from cti_get_port_type_xr17c15x_xr17v25x() for better readability. Signed-off-by: Parker Newman Reviewed-by: Jiri Slaby --- Changes in v2: - Removed ternary operators completely drivers/tty/serial/8250/8250_exar.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) -- 2.43.2 diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/8250_exar.c index 8665d3b7b673..521d2acf4004 100644 --- a/drivers/tty/serial/8250/8250_exar.c +++ b/drivers/tty/serial/8250/8250_exar.c @@ -726,7 +726,7 @@ static enum cti_port_type cti_get_port_type_xr17c15x_xr17v25x(struct exar8250 *p struct pci_dev *pcidev, unsigned int port_num) { - enum cti_port_type port_type; + enum cti_port_type port_type = CTI_PORT_TYPE_RS232; switch (pcidev->subsystem_device) { // RS232 only cards @@ -737,23 +737,22 @@ 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 = CTI_PORT_TYPE_RS232; break; // 1x RS232, 1x RS422/RS485 case PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_1_1: - port_type = (port_num == 0) ? - CTI_PORT_TYPE_RS232 : CTI_PORT_TYPE_RS422_485; + if (port_num) + port_type = CTI_PORT_TYPE_RS422_485; break; // 2x RS232, 2x RS422/RS485 case PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2_2: - port_type = (port_num < 2) ? - CTI_PORT_TYPE_RS232 : CTI_PORT_TYPE_RS422_485; + if (port_num > 1) + port_type = CTI_PORT_TYPE_RS422_485; break; // 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 = (port_num < 4) ? - CTI_PORT_TYPE_RS232 : CTI_PORT_TYPE_RS422_485; + if (port_num > 3) + port_type = CTI_PORT_TYPE_RS422_485; break; // RS232/RS422/RS485 HW (jumper) selectable case PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2: @@ -789,13 +788,13 @@ static enum cti_port_type cti_get_port_type_xr17c15x_xr17v25x(struct exar8250 *p break; // 6x RS232, 2x RS422/RS485 case PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_6_2_SP: - port_type = (port_num < 6) ? - CTI_PORT_TYPE_RS232 : CTI_PORT_TYPE_RS422_485; + if (port_num > 5) + port_type = CTI_PORT_TYPE_RS422_485; break; // 2x RS232, 6x RS422/RS485 case PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2_6_SP: - port_type = (port_num < 2) ? - CTI_PORT_TYPE_RS232 : CTI_PORT_TYPE_RS422_485; + if (port_num > 1) + port_type = CTI_PORT_TYPE_RS422_485; break; default: dev_err(&pcidev->dev, "unknown/unsupported device\n");