Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp1243401lqb; Thu, 18 Apr 2024 04:40:16 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUBmVx9kErkNKhuaM/JsLwcETYkOmdrW+m88NpIYqIPWzoQN/K53MB5X81Dv1qSyoaE+VjXOZSVCKP8LlCF69uj8SRxihOTH87mhu5xkg== X-Google-Smtp-Source: AGHT+IFVhPfm+v47bny6hSbpQB14wKazVxDB+r67MFVf/DAGJ38XwsOhP4KKuj1cBF/BZkD8QbhC X-Received: by 2002:a05:6871:5b11:b0:235:3d0:3096 with SMTP id op17-20020a0568715b1100b0023503d03096mr3076767oac.24.1713440416432; Thu, 18 Apr 2024 04:40:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713440416; cv=pass; d=google.com; s=arc-20160816; b=UuQSxAKtGLDixbJM96K3s3u9Bpn/SWCz29XKXpTZePoBMUfC01eVGFzMfdGD719KTN 90IHCEEk62KCViaPuIomCASLEMaP7qAyl7RB3QH8/4tPCAOmCFX3wwx/xjOsqE6d5R6L DD36Hu03qQEbF4ZZJgh4pMlGvE13yLn13a9ZXus8aelPVJCRrM7rRWAFgQpG9ZIee9UN CbsqmV5ZBVt5EzYUxyrN1wGLUOfpeEQFhfIKU7ZvzGeUz8F09fvf2pn+G0+L0dzNmbM7 ctQjujJL3RC683IXdoJzZkouj+GDtBf8YdTwJNOBFLkm8mt30EcO6uDYYJQeaesAE4um YFtw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:in-reply-to:subject:cc:to:date:from :dkim-signature; bh=sYu2DGCHCjYeKy6BDeCY9glucaNgaKupLfshwksml6c=; fh=guF8H1RoeP6GfOvCRP5XCy7toQePloxiU7KXyxTHOuI=; b=bUKZm6haCpxbh9ooLaZKgwsMm40Mw714nJ/V9MH237UUjWJGTxqNwnhxWZJIlegZ9d IGFIEx/vrEZEv56n2YJc92LIX0oSjEyW+wHZWaI7O/ZQU9CUoRMmdRNd+qpeUuhRbgvN iZY+PtFwaJd9sDyVQqusIIcKHwdr8JPdZKPYrCsz7JQvYaCNJYJ/5WhxeZCuAx1bAeKw /gtbYdUheMuaWOMX1oH25OJq4691qurFRAEI2zWb0tXCWVFlot704S1R07qSSxzejmp9 LEIc2qKsCUGBqaVvMdsapTn/nXlPAAIONbfTlBcrtn8pPPiAuGwIsaG23XHEyphKsDmD kJhw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=hzpIyNb0; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-149988-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-149988-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id z23-20020a631917000000b005f75190541esi1233102pgl.500.2024.04.18.04.40.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 04:40:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-149988-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=hzpIyNb0; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-149988-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-149988-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 0E931284E0F for ; Thu, 18 Apr 2024 11:40:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6D5E315F41D; Thu, 18 Apr 2024 11:37:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="hzpIyNb0" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (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 C08DE15F415; Thu, 18 Apr 2024 11:37:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713440253; cv=none; b=qJFLFuGHbcmSD5Rlj0kAjAm/88kKxnHZ0/n/MNUoxnyCTTn9ZWkZAL8dxTZT0j+lP7d0bvn2htFQOTMq5J1Ba1RVuxTkXQ+a5FMaE/dXl9EpzCJM1Xsl+Ii4YPxI9hyrgJWlsfOrWDKxWpKjN+8byGGnDh0BdUCB7L03J6mKhBc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713440253; c=relaxed/simple; bh=Nq8Yi29thlbiHkw+aSqvbgnfPnMwcMK/TIXfF/XHa/w=; h=From:Date:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=RHMIWBb8h6Y6PgF8KJJYQDTuI+cPfK6IEsOBhrtWiwZyK5qjBV8T/RM0UeOCHtF5MtsLmtjfljAkksKhpva/ThQhjqpd0xpvJhVahDPNSXkx95vVooaDCNsb9MjUg4+2t8/Ar0flm0eq8z9+9+Uto+4EmdIK951gT1lLEynAd+g= 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=hzpIyNb0; arc=none smtp.client-ip=198.175.65.11 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1713440251; x=1744976251; h=from:date:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=Nq8Yi29thlbiHkw+aSqvbgnfPnMwcMK/TIXfF/XHa/w=; b=hzpIyNb0c8FbJE+4H8P83nCa/uLGfwGkB4w+P5Y60OstHqiBi5OSvUdQ WD8GBm5bEGFIqmV8GxSWLIVic5EvdLQJ9BihVyiap5cTvKiOiK6zjDuqo vZ7Oq6D5+PjGpeOhJjisllP5s+tXhwWqjp/3dKWEUELxERmQ1AkISFfOc F05Qxb+YzJ8agY3nSGjnIm1mB3d7vmJs3xOSjv9jgX0gCabUVDu0i4r6m W03krMVJNa6AOnLvF9GubuVAbEzBvkpfUmyGTjwaBvlMKPcIEzsbqZ0yl zKLB/C4Tu670JzCrNv70WFsPFX3ksXNDXBYaIce7FVQNk3IHcfj4Y9Gg/ Q==; X-CSE-ConnectionGUID: vvauLY2pREeXZMnfJLA0Iw== X-CSE-MsgGUID: nyx8PDnhRT+oqFrcAPiGWg== X-IronPort-AV: E=McAfee;i="6600,9927,11047"; a="19541721" X-IronPort-AV: E=Sophos;i="6.07,212,1708416000"; d="scan'208";a="19541721" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Apr 2024 04:37:31 -0700 X-CSE-ConnectionGUID: hkIWchC4TPGV/XX9lMpruA== X-CSE-MsgGUID: tGJ9DO0EQC2QrHXIXcEShQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,212,1708416000"; d="scan'208";a="46246116" Received: from ijarvine-desk1.ger.corp.intel.com (HELO localhost) ([10.245.247.36]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Apr 2024 04:37:28 -0700 From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Date: Thu, 18 Apr 2024 14:37:23 +0300 (EEST) To: Parker Newman cc: Greg Kroah-Hartman , Jiri Slaby , LKML , linux-serial , Parker Newman Subject: Re: [PATCH v4 4/7] serial: exar: moved generic_rs485 further up in 8250_exar.c In-Reply-To: Message-ID: <88d1dde8-c32b-a5b2-3eaf-e133ec3c4e33@linux.intel.com> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323328-1651817364-1713440243=:986" This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323328-1651817364-1713440243=:986 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: QUOTED-PRINTABLE Hi, In shortlog (Subject),=20 - moved -> move - exar: -> 8250_exar: After those, "in 8250_exar.c" is redundant information and can be removed. > From: Parker Newman >=20 > Preparatory patch moving generic_rs485_config and Use () when talking about functions. After fixing those, feel free to add, Reviewed-by: Ilpo J=E4rvinen --=20 i. > generic_rs485_supported higher in the file to allow for CTI setup > functions to use them. >=20 > Signed-off-by: Parker Newman > --- > Changes in v3: > - split into separate preparatory patch >=20 > drivers/tty/serial/8250/8250_exar.c | 50 ++++++++++++++--------------- > 1 file changed, 25 insertions(+), 25 deletions(-) >=20 > diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/825= 0/8250_exar.c > index f14f73d250bb..e68029a59122 100644 > --- a/drivers/tty/serial/8250/8250_exar.c > +++ b/drivers/tty/serial/8250/8250_exar.c > @@ -197,6 +197,31 @@ struct exar8250 { > =09int=09=09=09line[]; > }; >=20 > +static int generic_rs485_config(struct uart_port *port, struct ktermios = *termios, > +=09=09=09=09struct serial_rs485 *rs485) > +{ > +=09bool is_rs485 =3D !!(rs485->flags & SER_RS485_ENABLED); > +=09u8 __iomem *p =3D port->membase; > +=09u8 value; > + > +=09value =3D readb(p + UART_EXAR_FCTR); > +=09if (is_rs485) > +=09=09value |=3D UART_FCTR_EXAR_485; > +=09else > +=09=09value &=3D ~UART_FCTR_EXAR_485; > + > +=09writeb(value, p + UART_EXAR_FCTR); > + > +=09if (is_rs485) > +=09=09writeb(UART_EXAR_RS485_DLY(4), p + UART_MSR); > + > +=09return 0; > +} > + > +static const struct serial_rs485 generic_rs485_supported =3D { > +=09.flags =3D SER_RS485_ENABLED | SER_RS485_RTS_ON_SEND, > +}; > + > static void exar_pm(struct uart_port *port, unsigned int state, unsigned= int old) > { > =09/* > @@ -459,27 +484,6 @@ static void xr17v35x_unregister_gpio(struct uart_825= 0_port *port) > =09port->port.private_data =3D NULL; > } >=20 > -static int generic_rs485_config(struct uart_port *port, struct ktermios = *termios, > -=09=09=09=09struct serial_rs485 *rs485) > -{ > -=09bool is_rs485 =3D !!(rs485->flags & SER_RS485_ENABLED); > -=09u8 __iomem *p =3D port->membase; > -=09u8 value; > - > -=09value =3D readb(p + UART_EXAR_FCTR); > -=09if (is_rs485) > -=09=09value |=3D UART_FCTR_EXAR_485; > -=09else > -=09=09value &=3D ~UART_FCTR_EXAR_485; > - > -=09writeb(value, p + UART_EXAR_FCTR); > - > -=09if (is_rs485) > -=09=09writeb(UART_EXAR_RS485_DLY(4), p + UART_MSR); > - > -=09return 0; > -} > - > static int sealevel_rs485_config(struct uart_port *port, struct ktermios= *termios, > =09=09=09=09 struct serial_rs485 *rs485) > { > @@ -518,10 +522,6 @@ static int sealevel_rs485_config(struct uart_port *p= ort, struct ktermios *termio > =09return 0; > } >=20 > -static const struct serial_rs485 generic_rs485_supported =3D { > -=09.flags =3D SER_RS485_ENABLED | SER_RS485_RTS_ON_SEND, > -}; > - > static const struct exar8250_platform exar8250_default_platform =3D { > =09.register_gpio =3D xr17v35x_register_gpio, > =09.unregister_gpio =3D xr17v35x_unregister_gpio, > -- > 2.43.2 >=20 >=20 --8323328-1651817364-1713440243=:986--