Received: by 2002:a05:7412:bb8d:b0:d7:7d3a:4fe2 with SMTP id js13csp2600169rdb; Fri, 18 Aug 2023 05:29:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEVcm4DisvSo/gmIQMApjheQqxTN8gDv37Zp+YwWPHNYkDC3fEkt7FWgG1nOWePGwSB7OJM X-Received: by 2002:a05:6512:3123:b0:4fd:d7ac:2654 with SMTP id p3-20020a056512312300b004fdd7ac2654mr1569417lfd.13.1692361741548; Fri, 18 Aug 2023 05:29:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692361741; cv=none; d=google.com; s=arc-20160816; b=GxVk8DBfOyCXBuCvDq2hXxbEx3MJw6165dy0OYN/EdhFsNFmkwy67mtM1ahhnzJVfE 0NvYGHU373zJT5UxdAIc0aMFopnlTRVsPhdDT/YcfAmVrRDDnBvlDnF5gW52Ra+HTkNi vF2nePGFjP4hgLPY+OSx9fiJYqLwAg8Gy43PTVJbUADWAKM61QwfFzxyolZVBimX+UKu dFTlT6z9cunCpw2RQfvzvlKkFRUxBtyJIoSJlXSEXa6/LnX2fQ81gTPyOcWjDYdfERzm fD2sYji+UNnuYu71Zz1o4eWPS09pvFcWmNE2u8ysRakwhHlHXkomWRsy+yHMjdn5ZrRK r5Lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=Nx8C1TQb0Mqh/RAxYdompjsQPHnLTeqEO4RjNoQPyqc=; fh=S8wvOe7wk4Meh2EUEsyztEZR7HJpFUnc/yh0waiq2fI=; b=OZJ62zziRjw30ZjMY6KVYRfiKZR0awOai/72bgRG1NtwvIiLgPJXgf382PIjZ5hU7o h80oM5EGf6U3UOcFt6tuTBPLef/moJfGj6g80QVPhJFGZFW45cDlycs1oJ6RoyylBlc1 KMVcfSi1QBmRSDElazBZu6ARo2pYKXN0sUMw5pAuAEbcETwHimMBaNG/nt1usWbaTQDr s85Wk5yCkDoukTNmcIIGRXUMF1I7lj50xLT46reUK7WYXCLX0XY+p4YDNP/BeJ1R8UEb 5+SUh/trtwnkx417QMuRqePN1RrjehaZzvPiXEqGaG+WLQNPHeheWoTAp4qWYhjJqyrd /M7Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q6-20020a170906a08600b009935121ecd6si1311722ejy.644.2023.08.18.05.28.37; Fri, 18 Aug 2023 05:29:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349983AbjHQKnD (ORCPT + 99 others); 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-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 X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, NICE_REPLY_A,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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