mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@kernel.org>
To: Alexander Gordeev <agordeev@linux.ibm.com>
Cc: gregkh@linuxfoundation.org, linux-serial@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Richard Henderson <richard.henderson@linaro.org>,
	Ivan Kokshaysky <ink@jurassic.park.msu.ru>,
	Matt Turner <mattst88@gmail.com>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Richard Weinberger <richard@nod.at>,
	Anton Ivanov <anton.ivanov@cambridgegreys.com>,
	Johannes Berg <johannes@sipsolutions.net>,
	Chris Zankel <chris@zankel.net>,
	Max Filippov <jcmvbkbc@gmail.com>, Arnd Bergmann <arnd@arndb.de>,
	Vaibhav Gupta <vaibhavgupta40@gmail.com>,
	Jens Taprogge <jens.taprogge@taprogge.org>,
	Karsten Keil <isdn@linux-pingi.de>,
	Scott Branden <scott.branden@broadcom.com>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Heiko Carstens <hca@linux.ibm.com>,
	Vasily Gorbik <gor@linux.ibm.com>,
	Christian Borntraeger <borntraeger@linux.ibm.com>,
	Sven Schnelle <svens@linux.ibm.com>, David Lin <dtwlin@gmail.com>,
	Johan Hovold <johan@kernel.org>, Alex Elder <elder@kernel.org>,
	Laurentiu Tudor <laurentiu.tudor@nxp.com>,
	Jiri Kosina <jikos@kernel.org>, David Sterba <dsterba@suse.com>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	NXP Linux Team <linux-imx@nxp.com>,
	Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>,
	Oliver Neukum <oneukum@suse.com>,
	Mathias Nyman <mathias.nyman@intel.com>,
	Marcel Holtmann <marcel@holtmann.org>,
	Johan Hedberg <johan.hedberg@gmail.com>,
	Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Subject: Re: [PATCH 27/36] tty: propagate u8 data to tty_operations::write()
Date: Thu, 17 Aug 2023 12:42:34 +0200	[thread overview]
Message-ID: <ad29a619-f50b-2866-b89a-8e770ca3a883@kernel.org> (raw)
In-Reply-To: <ZNYhBCKWPdyuBhtz@li-008a6a4c-3549-11b2-a85c-c5cc2836eea2.ibm.com>

Hi,

On 11. 08. 23, 13:52, Alexander Gordeev wrote:
> On Thu, Aug 10, 2023 at 11:15:01AM +0200, Jiri Slaby (SUSE) wrote:
> 
> Hi Jiri,
> 
>> Data are now typed as u8. Propagate this change to
>> tty_operations::write().
> ...
>>   drivers/s390/char/con3215.c            | 3 +--
>>   drivers/s390/char/con3270.c            | 3 +--
>>   drivers/s390/char/sclp_tty.c           | 2 +-
>>   drivers/s390/char/sclp_vt220.c         | 2 +-
> ...
>> diff --git a/drivers/s390/char/con3215.c b/drivers/s390/char/con3215.c
>> index a1fef666c9b0..16b6f430dfd3 100644
>> --- a/drivers/s390/char/con3215.c
>> +++ b/drivers/s390/char/con3215.c
>> @@ -1021,8 +1021,7 @@ static unsigned int tty3215_write_room(struct tty_struct *tty)
>>   /*
>>    * String write routine for 3215 ttys
>>    */
>> -static int tty3215_write(struct tty_struct *tty,
>> -			 const unsigned char *buf, int count)
>> +static int tty3215_write(struct tty_struct *tty, const u8 *buf, int count)
>>   {
>>   	handle_write(tty->driver_data, buf, count);
>>   	return count;
>> diff --git a/drivers/s390/char/con3270.c b/drivers/s390/char/con3270.c
>> index d9983550062d..123524bff734 100644
>> --- a/drivers/s390/char/con3270.c
>> +++ b/drivers/s390/char/con3270.c
>> @@ -1803,8 +1803,7 @@ static void tty3270_do_write(struct tty3270 *tp, struct tty_struct *tty,
>>   /*
>>    * String write routine for 3270 ttys
>>    */
>> -static int tty3270_write(struct tty_struct *tty,
>> -			 const unsigned char *buf, int count)
>> +static int tty3270_write(struct tty_struct *tty, const u8 *buf, int count)
>>   {
>>   	struct tty3270 *tp;
>>   
>> diff --git a/drivers/s390/char/sclp_tty.c b/drivers/s390/char/sclp_tty.c
>> index 971fbb52740b..cc0f6a97124e 100644
>> --- a/drivers/s390/char/sclp_tty.c
>> +++ b/drivers/s390/char/sclp_tty.c
>> @@ -230,7 +230,7 @@ static int sclp_tty_write_string(const unsigned char *str, int count, int may_fa
>>    * routine will return the number of characters actually accepted for writing.
>>    */
>>   static int
>> -sclp_tty_write(struct tty_struct *tty, const unsigned char *buf, int count)
>> +sclp_tty_write(struct tty_struct *tty, const u8 *buf, int count)
>>   {
>>   	if (sclp_tty_chars_count > 0) {
>>   		sclp_tty_write_string(sclp_tty_chars, sclp_tty_chars_count, 0);
>> diff --git a/drivers/s390/char/sclp_vt220.c b/drivers/s390/char/sclp_vt220.c
>> index a32f34a1c6d2..44974d801c1e 100644
>> --- a/drivers/s390/char/sclp_vt220.c
>> +++ b/drivers/s390/char/sclp_vt220.c
>> @@ -463,7 +463,7 @@ __sclp_vt220_write(const unsigned char *buf, int count, int do_schedule,
>>    * number of characters actually accepted for writing.
>>    */
>>   static int
>> -sclp_vt220_write(struct tty_struct *tty, const unsigned char *buf, int count)
>> +sclp_vt220_write(struct tty_struct *tty, const u8 *buf, int count)
>>   {
>>   	return __sclp_vt220_write(buf, count, 1, 0, 1);
>>   }
> ...
> 
> In this and following patch it is only ::write() (and other) callbacks
> switched to u8, while the called internal functions stay with old types.
> 
> Do you plan to follow with part II etc, or it is archs/drivers that
> are expected to sort it out eventually?

Yes, I would say something like part V. would do the job -- at least 
that's my plan. Slowly propagating from the tty core to leafs (drivers).

> (I speak for s390, but the other affected archs are in the same boat I guess).


thanks,
-- 
js
suse labs


  reply	other threads:[~2023-08-17 10:43 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-10  9:14 [PATCH 00/36] tty: type unifications -- part I Jiri Slaby (SUSE)
2023-08-10  9:14 ` [PATCH 01/36] tty: xtensa/iss: drop unneeded tty_operations hooks Jiri Slaby (SUSE)
2023-08-10 12:37   ` Max Filippov
2023-08-10  9:14 ` [PATCH 02/36] tty: ldisc: document that ldops are optional Jiri Slaby (SUSE)
2023-08-10  9:14 ` [PATCH 03/36] tty: remove dummy tty_ldisc_ops::poll() implementations Jiri Slaby (SUSE)
2023-08-10  9:14 ` [PATCH 04/36] tty: n_null: remove optional ldops Jiri Slaby (SUSE)
2023-08-10  9:14 ` [PATCH 05/36] tty: change tty_write_lock()'s ndelay parameter to bool Jiri Slaby (SUSE)
2023-08-10  9:14 ` [PATCH 06/36] tty: tty_port: rename 'disc' to 'ld' Jiri Slaby (SUSE)
2023-08-10  9:14 ` [PATCH 07/36] tty: drop tty_debug_wait_until_sent() Jiri Slaby (SUSE)
2023-08-10  9:14 ` [PATCH 08/36] tty: make tty_change_softcar() more understandable Jiri Slaby (SUSE)
2023-08-10  9:14 ` [PATCH 09/36] tty: make tty_port_client_operations operate with u8 Jiri Slaby (SUSE)
2023-08-10  9:14 ` [PATCH 10/36] tty: make counts in tty_port_client_operations hooks size_t Jiri Slaby (SUSE)
2023-08-10  9:14 ` [PATCH 11/36] tty: switch receive_buf() counts to size_t Jiri Slaby (SUSE)
2023-08-10  9:14 ` [PATCH 12/36] tty: switch count in tty_ldisc_receive_buf() " Jiri Slaby (SUSE)
2023-08-10  9:14 ` [PATCH 13/36] tty: can327: unify error paths in can327_ldisc_rx() Jiri Slaby (SUSE)
2023-08-11 21:32   ` Max Staudt
2023-08-10  9:14 ` [PATCH 14/36] tty: can327, move overflow test inside can327_ldisc_rx()'s loop Jiri Slaby (SUSE)
2023-08-11 21:34   ` Max Staudt
2023-08-10  9:14 ` [PATCH 15/36] tty: make tty_ldisc_ops::*buf*() hooks operate on size_t Jiri Slaby (SUSE)
2023-08-10 12:02   ` Mark Brown
2023-08-11 21:34   ` Max Staudt
2023-08-10  9:14 ` [PATCH 16/36] tty: use u8 for chars Jiri Slaby (SUSE)
2023-08-10 12:04   ` Mark Brown
2023-08-11 10:28   ` Ilpo Järvinen
2023-08-14  6:35     ` Jiri Slaby
2023-08-31 18:33     ` Andy Shevchenko
2023-08-11 21:34   ` Max Staudt
2023-08-10  9:14 ` [PATCH 17/36] tty: use u8 for flags Jiri Slaby (SUSE)
2023-08-10 12:05   ` Mark Brown
2023-08-11 21:35   ` Max Staudt
2023-08-10  9:14 ` [PATCH 18/36] misc: ti-st: make st_recv() conforming to tty_ldisc_ops::receive_buf() Jiri Slaby (SUSE)
2023-08-10  9:14 ` [PATCH 19/36] tty: make char_buf_ptr()/flag_buf_ptr()'s offset unsigned Jiri Slaby (SUSE)
2023-08-10  9:14 ` [PATCH 20/36] tty: tty_buffer: make all offsets unsigned Jiri Slaby (SUSE)
2023-08-10  9:14 ` [PATCH 21/36] tty: don't pass write() to do_tty_write() Jiri Slaby (SUSE)
2023-08-10  9:14 ` [PATCH 22/36] tty: rename and de-inline do_tty_write() Jiri Slaby (SUSE)
2023-08-10  9:14 ` [PATCH 23/36] tty: use min() in iterate_tty_write() Jiri Slaby (SUSE)
2023-08-10  9:14 ` [PATCH 24/36] tty: use ssize_t for iterate_tty_read() returned type Jiri Slaby (SUSE)
2023-08-10  9:14 ` [PATCH 25/36] tty: switch size and count types in iterate_tty_read() to size_t Jiri Slaby (SUSE)
2023-08-10  9:15 ` [PATCH 26/36] tty: use min() for size computation in iterate_tty_read() Jiri Slaby (SUSE)
2023-08-10  9:15 ` [PATCH 27/36] tty: propagate u8 data to tty_operations::write() Jiri Slaby (SUSE)
2023-08-11 11:52   ` Alexander Gordeev
2023-08-17 10:42     ` Jiri Slaby [this message]
2023-08-14 14:47   ` Geert Uytterhoeven
2023-08-17 10:53   ` Alexander Gordeev
2023-08-10  9:15 ` [PATCH 28/36] tty: propagate u8 data to tty_operations::put_char() Jiri Slaby (SUSE)
2023-08-14 14:44   ` Geert Uytterhoeven
2023-08-17 10:55   ` Alexander Gordeev
2023-08-10  9:15 ` [PATCH 29/36] tty: make tty_operations::write()'s count size_t Jiri Slaby (SUSE)
2023-08-14 17:58   ` Geert Uytterhoeven
2023-08-10  9:15 ` [PATCH 30/36] tty: audit: unify to u8 Jiri Slaby (SUSE)
2023-08-10  9:15 ` [PATCH 31/36] tty: ldops: " Jiri Slaby (SUSE)
2023-08-10  9:15 ` [PATCH 32/36] tty: hvc: convert counts to size_t Jiri Slaby (SUSE)
2023-08-10  9:15 ` [PATCH 33/36] tty: vcc: " Jiri Slaby (SUSE)
2023-08-10  9:15 ` [PATCH 34/36] tty: gdm724x: " Jiri Slaby (SUSE)
2023-08-10  9:42   ` Dan Carpenter
2023-08-10 10:08     ` Jiri Slaby
2023-08-10 10:39     ` [PATCH 34-and-three-quarters/36] tty: gdm724x: simplify gdm_tty_write() Jiri Slaby (SUSE)
2023-08-11  9:11       ` Ilpo Järvinen
2023-08-15 17:22   ` [PATCH 34/36] tty: gdm724x: convert counts to size_t Nathan Chancellor
2023-08-16  6:46     ` Jiri Slaby
2023-08-16  8:40       ` David Laight
2023-08-16  8:58         ` Jiri Slaby
2023-08-16  9:18           ` David Laight
2023-08-10  9:15 ` [PATCH 35/36] tty: hso: simplify hso_serial_write() Jiri Slaby (SUSE)
2023-08-10  9:15 ` [PATCH 36/36] tty: rfcomm: convert counts to size_t Jiri Slaby (SUSE)
2023-08-11 10:26 ` [PATCH 00/36] tty: type unifications -- part I Ilpo Järvinen
2023-08-14  6:59   ` Jiri Slaby
2023-08-14 14:47     ` Ilpo Järvinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ad29a619-f50b-2866-b89a-8e770ca3a883@kernel.org \
    --to=jirislaby@kernel.org \
    --cc=agordeev@linux.ibm.com \
    --cc=anton.ivanov@cambridgegreys.com \
    --cc=arnaud.pouliquen@foss.st.com \
    --cc=arnd@arndb.de \
    --cc=borntraeger@linux.ibm.com \
    --cc=chris@zankel.net \
    --cc=davem@davemloft.net \
    --cc=dsterba@suse.com \
    --cc=dtwlin@gmail.com \
    --cc=edumazet@google.com \
    --cc=elder@kernel.org \
    --cc=festevam@gmail.com \
    --cc=geert@linux-m68k.org \
    --cc=gor@linux.ibm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hca@linux.ibm.com \
    --cc=ink@jurassic.park.msu.ru \
    --cc=isdn@linux-pingi.de \
    --cc=jcmvbkbc@gmail.com \
    --cc=jens.taprogge@taprogge.org \
    --cc=jikos@kernel.org \
    --cc=johan.hedberg@gmail.com \
    --cc=johan@kernel.org \
    --cc=johannes@sipsolutions.net \
    --cc=kernel@pengutronix.de \
    --cc=kuba@kernel.org \
    --cc=laurentiu.tudor@nxp.com \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.org \
    --cc=mathias.nyman@intel.com \
    --cc=mattst88@gmail.com \
    --cc=oneukum@suse.com \
    --cc=pabeni@redhat.com \
    --cc=richard.henderson@linaro.org \
    --cc=richard@nod.at \
    --cc=s.hauer@pengutronix.de \
    --cc=scott.branden@broadcom.com \
    --cc=shawnguo@kernel.org \
    --cc=svens@linux.ibm.com \
    --cc=ulf.hansson@linaro.org \
    --cc=vaibhavgupta40@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®