Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp593874lqt; Fri, 19 Apr 2024 05:17:46 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWYHlo7POtN7JMP3eZtwRmnQ7PSjXUm+Ykd1rJayx21MPR9xlaZQveIrOs7sP3O1SixIM+bOZTbrh50R1h5d5QcrwhOD76XXjIMPXbeAQ== X-Google-Smtp-Source: AGHT+IHI086o4ozBIMdIYh+At6Ags58jZUj2iVUiCtKzPhCbvi6UyKrtRheOFthGjmibPIGFMMZd X-Received: by 2002:a2e:8519:0:b0:2da:9ed:9b43 with SMTP id j25-20020a2e8519000000b002da09ed9b43mr1217749lji.31.1713529066775; Fri, 19 Apr 2024 05:17:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713529066; cv=pass; d=google.com; s=arc-20160816; b=D5WjQIrqcTSStRihVMLOHG4rtX6hGc9ukB7rcS99Chn5vroc5poM143GaO4NGXPVBm GMKZkiTNaW/qx2iSBRADT+11PnVju6/CXPz9FBfn+nPYz6mvPSIIW6lMdyY7/9VqLKb8 qCSCJCwVNu5SNY2dVfntekd90+hFHhTVJeHlYjVtVGCzmREb+KN/k0Yjo18auFO83f2t FzLMihZakZ/T3Ccu+1uY286+/dva/wupCtOmoNW53pzMqFlT/LODyodAbK5VRTi5p1nl Z24j50GK2GpL+6lQjYX86ILtE3oBrhUBgKM31BmOmvGJ11j9uZyqtztKr60jTC5vF/I4 1vsw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=ui-outboundreport:content-transfer-encoding:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:organization :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=zjXiCeJOhApVkHhy6q6UaYGTLYoMq1CAu9WyY+sDNVA=; fh=zMAX/ngdKAC7cO6i3s1Omlxs3KfsUKCIfv0FNsHVpVE=; b=ZdKNf+iANyBVfDovciw2sGLpQ4bBM/sBWJAzgRdYhFIyFnsPd3xBOFDSq2I6eFJNgH slUIt0S09fUqMCHhRE9ZEWWK5WSw0JCrYxrGa8o/kEcHViU6u75It65UKC7nIF9jPbSM a6kyETc/C41efcXR2kozatFVWVEhFCfcz4QMhhyibB/FVivnDIyAiRRJjFa13z1iT5B2 oDTV16Hqm7RtwgCqP5G8zwqzuCUg3wjTtVvhviwPe7jUTxbV/IxTfq3ZW9B473XuExKo jD8Gek1OtXkHB4YGNhMEo9fZtPA4lQbaioBS8g3PzR0J13g8Ab6YzGhWPAs0lg2VJA0i vzkA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@finest.io header.s=s1-ionos header.b=DJ1Tf+Wq; arc=pass (i=1 spf=pass spfdomain=finest.io dkim=pass dkdomain=finest.io); spf=pass (google.com: domain of linux-kernel+bounces-151401-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151401-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id q26-20020aa7da9a000000b0056fd7f58fbdsi2019900eds.259.2024.04.19.05.17.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Apr 2024 05:17:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-151401-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@finest.io header.s=s1-ionos header.b=DJ1Tf+Wq; arc=pass (i=1 spf=pass spfdomain=finest.io dkim=pass dkdomain=finest.io); spf=pass (google.com: domain of linux-kernel+bounces-151401-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151401-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 7A9501F22185 for ; Fri, 19 Apr 2024 12:17:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3E8088562E; Fri, 19 Apr 2024 12:17:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=finest.io header.i=parker@finest.io header.b="DJ1Tf+Wq" 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 30933839EB; Fri, 19 Apr 2024 12:17:36 +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=1713529059; cv=none; b=kyS1H5u0lTQYQTHU3JB7XV8UQTsQg1ezSPgkVoM60k1PpVcw2yHajoOAdyDvHyO8BIivt0/pHvStBygHAiuKDRBlkPgjyt4q9lIBsSpOXfSpHvDprjzJYztdUrPlT5ZKX2MOm83wveLGFHJiDi2qrp+dZt6RDQq6NIW4SXXT1z4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713529059; c=relaxed/simple; bh=HKU6lUFEObWAacDnO6tCiubDjoYhRfStCJJRtUuqz0Y=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=jsw3N8mcB1BQTVXBvr/NeP1LxG0CQ42kQS4Ny2IoqEOMyV+tkS0xWBDUiC4F8vJ6Hd9BFpvDPzQkPmJX+PNySbH8exgJk/qVR5E/o6apBtAJTpfd2gPGQ9V93h9YticWo437bI8/R8WmhMNFdJXH1lT/HMX3PIQ+n1cZZscM1vQ= 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=DJ1Tf+Wq; 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=finest.io; s=s1-ionos; t=1713529049; x=1714133849; i=parker@finest.io; bh=zjXiCeJOhApVkHhy6q6UaYGTLYoMq1CAu9WyY+sDNVA=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:Message-ID:In-Reply-To: References:MIME-Version:Content-Type:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=DJ1Tf+WqQEEYXR+vSaPf3bLV1bPpoyPuyVksY8xkQjyCHoEdj51uhVyvg0ylONoj P2WuR56/uToW0MQaxzxwnfVSg/tygn7eD2fZ6JfRCOx+JWXf3nMAblzh5bnTEw/Nm ojgbBCs3heXJXCaFS/X/FrqiqIFFEkK7l+lvoFmNwzyzoT5G6IGRB87Ryrig6GzRi bRPsMrQWDsVXrwEP/9v24VvxLhxw7JPWF0ioBf7LahKS7K7WSqoSUdyHi9g1VBIot GIA5eteN1vlv6cShLt/tHdJNzDAsuhQWI7LYtHWQT0niu6pYxziUyXQ4NrclvGd/f oQdUMIsaRYFs+xLeKA== X-UI-Sender-Class: 55c96926-9e95-11ee-ae09-1f7a4046a0f6 Received: from SWDEV2.connecttech.local ([98.159.241.229]) by mrelay.perfora.net (mreueus004 [74.208.5.2]) with ESMTPSA (Nemesis) id 1Md62J-1sWr5G0piF-00aEhF; Fri, 19 Apr 2024 14:17:29 +0200 Date: Fri, 19 Apr 2024 08:17:27 -0400 From: Parker Newman To: Jiri Slaby Cc: Greg Kroah-Hartman , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, Parker Newman , Ilpo =?UTF-8?B?SsOkcnZpbmVu?= Subject: Re: [PATCH v1 4/4] serial: exar: change port_type ternary line wrapping Message-ID: <20240419081727.435437d0@SWDEV2.connecttech.local> In-Reply-To: <379d43bd-d5eb-4877-8781-888c82821bb8@kernel.org> References: <0081b6a7bbe1ad6ce114132f9ee86677a761de6d.1713452766.git.pnewman@connecttech.com> <379d43bd-d5eb-4877-8781-888c82821bb8@kernel.org> Organization: Connect Tech Inc. X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:pwfBs002sJE5UlCclVc2gvJmpJV4N23LzQuZngqiPQGkyr43Hm9 0w+6Ea25o/Pb91LwlQ6PZ9u7Fyu7bR+WLY/VXlfCUaLa//VDgWBA+dixLzI7u69H8euyARn s9+ZRMkPxY6weoKJ5HplNHKOOS3qpOiT1Scl+yCGcMyQV3elEm5gD0/7kDaW6qOxd+wpVwu MGlyxgJlIg4X2O7kcM9Hg== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:lvffdMyJ6rI=;3x/ki+/JYMfzigA6OjZQS5lxRx7 t7CewaI8psr1Qtsj9JHgNXvVjT/Zxwl6z++Ga6+pzuXNIDNhhLbU8q3OnUljgclBliRFVz0iz BGqo//nSLxPQAJ1ZTzqaL3O+tqHn4myNDJOze+QjXifq2npjvo/f03Cpsh2ftaqj4n33EskKt Yj5uzWeCgXipUlQH72F280vvLi/QRFBGGpC7QaWxFOA9VxQZpg0DO00Gyr6nbDgihwdN/hwYd yngjPDNjahFNHYcKIqKg4Jk1OUPNHnW5Qd+bqzXHvz6Y7/gSdvfEEYMsCPNAiy3j4gugqW1s6 Pd84Z8B1HI00A17boqdLxxWAcylQj8TqfOl1CwE8fIPCuimBq+hHLV09C+alw8BfpreSaNAx+ nUjfu1acZk6qgRnrJjxiybweZhX0lZS/2zf2BCN0tzRXWBgQIonKRSk+Bzktw754AZKSkqxvh IeGfsGB8+9xuUn5dIQRkxohYd+H0F+INZQbCV9cGHoVEXNTH8+/DNdHgRruu6cdYlpW6NTwx5 UBnDQhQm+7TsQn3Y3TJFk6bSkPeWeLMQCrR4hPSoL2RxGBBSGxOOKbfGEcvezM4TTLTcreRWn Yy9WMZC9HEnVnOmcI24JyTC1WxRoM0VboBBtv429mPWK8lsSpxHXYYSqlmKc7elZuw5JC/i4i vCtfGNqlusQEsMUvOEjRiFERgSpnhFE6Iqqni4EeZuVgMRr1fgAaWkK28zLxZeWqCAJ0jQ/f2 V4UQg87BIxVc8THBiYP9K2nLhd3SVG5thMvyXTPIqv1cM8vPfHPlr4= On Fri, 19 Apr 2024 08:07:50 +0200 Jiri Slaby wrote: > On 18. 04. 24, 17:36, Parker Newman wrote: > > From: Parker Newman > > > > Change line wrapping of ternary operators in > > cti_get_port_type_xr17c15x_xr17v25x() for better readability. > > > > Old example: > > > > port_type =3D port_num =3D=3D 0 ? > > CTI_PORT_TYPE_RS232 : CTI_PORT_TYPE_RS422_485; > > > > New: > > port_type =3D port_num =3D=3D 0 ? CTI_PORT_TYPE_RS232 : > > CTI_PORT_TYPE_RS422_485; > > This is worse IMO. Ilpo suggested a bit different alignment. But still..= . > > > Based on feedback from: > > Link: https://lore.kernel.org/linux-serial/f2353b8c-2079-b895-2707-f6b= e83161288@linux.intel.com > > You should have CCed the author. > > > Signed-off-by: Parker Newman > > --- > > drivers/tty/serial/8250/8250_exar.c | 20 ++++++++++---------- > > 1 file changed, 10 insertions(+), 10 deletions(-) > > > > diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/= 8250/8250_exar.c > > index 10725ad0f3ef..a76b4e5bab4e 100644 > > --- a/drivers/tty/serial/8250/8250_exar.c > > +++ b/drivers/tty/serial/8250/8250_exar.c > > @@ -741,19 +741,19 @@ static enum cti_port_type cti_get_port_type_xr17= c15x_xr17v25x(struct exar8250 *p > > break; > > // 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; > > + port_type =3D port_num =3D=3D 0 ? CTI_PORT_TYPE_RS232 : > > + CTI_PORT_TYPE_RS422_485; > > > Well, could you initialize port_type =3D CTI_PORT_TYPE_RS232? And here d= o > only: > if (port_num > 0) > return CTI_PORT_TYPE_RS422_485; > ? > I like this idea I will move to that. Thanks. > > > break; > > // 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; > > + port_type =3D port_num < 2 ? CTI_PORT_TYPE_RS232 : > > + CTI_PORT_TYPE_RS422_485; > > And so on. > > > 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 =3D port_num < 4 ? > > - CTI_PORT_TYPE_RS232 : CTI_PORT_TYPE_RS422_485; > > + port_type =3D port_num < 4 ? CTI_PORT_TYPE_RS232 : > > + CTI_PORT_TYPE_RS422_485; > > break; > > // RS232/RS422/RS485 HW (jumper) selectable > > case PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2: > > @@ -789,13 +789,13 @@ static enum cti_port_type cti_get_port_type_xr17= c15x_xr17v25x(struct exar8250 *p > > break; > > // 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; > > + port_type =3D port_num < 6 ? CTI_PORT_TYPE_RS232 : > > + CTI_PORT_TYPE_RS422_485; > > break; > > // 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; > > + port_type =3D port_num < 2 ? CTI_PORT_TYPE_RS232 : > > + CTI_PORT_TYPE_RS422_485; > > break; > > default: > > dev_err(&pcidev->dev, "unknown/unsupported device\n"); > > -- > > 2.43.2 > > >