From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1C433EB64DD for ; Thu, 17 Aug 2023 10:43:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349734AbjHQKnD (ORCPT ); Thu, 17 Aug 2023 06:43:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242143AbjHQKml (ORCPT ); Thu, 17 Aug 2023 06:42:41 -0400 Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com [209.85.218.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 721B930C0; Thu, 17 Aug 2023 03:42:39 -0700 (PDT) Received: by mail-ej1-f42.google.com with SMTP id a640c23a62f3a-99c4923195dso1020097066b.2; Thu, 17 Aug 2023 03:42:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692268958; x=1692873758; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Nx8C1TQb0Mqh/RAxYdompjsQPHnLTeqEO4RjNoQPyqc=; b=JMTBNEQb3zwn01i7/j64vn4Dt5ze+hbtlda/91SkWIbSWr7VztQwm0zAvFXBvCSAk4 BzJPvTH7NymYUo4Unv79GUHn/TPUd3fnspIkMSqN9kG39A9oU1DzLRNnHVJ9/fRBYD9H /073fqYf6AqZU04iwIdaOpsYr+Xe9Xo5nLf3oDnZp/Gqt+52UdNDYkbSrkIOqd1qXRYL 7Fu4LvvD/0oOV5N+QBM1jjzVVbabno/JfnFBxyrcgALm1WD+zKo33d3Y1WnyIdXTbYxD eJf6QpX181ouzCpktNidKoaOHPVCA3JbMHQo04ycMh7xJVIuopjIQzHeop23YnFW+2Y1 rRjQ== X-Gm-Message-State: AOJu0YxmVKVYpEuqkVDAh4o1k4TuzAZrG8SzgSQdIaiqMtfsxHf/ceoc hJH+QjVMfLFYyrPDSHYFHEs= X-Google-Smtp-Source: AGHT+IHYPovmnZkm2UjGEgpa8Ye7BOl9mgW7wDmffHz5AIot8qURL7uylDpLtKqfpKP6SEkkWwseoA== X-Received: by 2002:a17:907:1df2:b0:99d:fc31:242f with SMTP id og50-20020a1709071df200b0099dfc31242fmr2431853ejc.66.1692268957473; Thu, 17 Aug 2023 03:42:37 -0700 (PDT) Received: from [192.168.1.58] (185-219-167-24-static.vivo.cz. [185.219.167.24]) by smtp.gmail.com with ESMTPSA id jj27-20020a170907985b00b0099cb0a7098dsm10065306ejc.19.2023.08.17.03.42.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 17 Aug 2023 03:42:36 -0700 (PDT) Message-ID: Date: Thu, 17 Aug 2023 12:42:34 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 Subject: Re: [PATCH 27/36] tty: propagate u8 data to tty_operations::write() Content-Language: en-US To: Alexander Gordeev Cc: gregkh@linuxfoundation.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Richard Henderson , Ivan Kokshaysky , Matt Turner , Geert Uytterhoeven , Richard Weinberger , Anton Ivanov , Johannes Berg , Chris Zankel , Max Filippov , Arnd Bergmann , Vaibhav Gupta , Jens Taprogge , Karsten Keil , Scott Branden , Ulf Hansson , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , Sven Schnelle , David Lin , Johan Hovold , Alex Elder , Laurentiu Tudor , Jiri Kosina , David Sterba , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Arnaud Pouliquen , Oliver Neukum , Mathias Nyman , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz References: <20230810091510.13006-1-jirislaby@kernel.org> <20230810091510.13006-28-jirislaby@kernel.org> From: Jiri Slaby In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org 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