Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp824538rdb; Wed, 6 Dec 2023 00:28:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IEtNUQFteVrWi7w5kH0vyp8Nj3wUp9iHzK7TLnUC7oPu8pQRwxK81stPL6SQReFmuzU6e4e X-Received: by 2002:a17:906:51d9:b0:a1d:5483:d152 with SMTP id v25-20020a17090651d900b00a1d5483d152mr1122426ejk.68.1701851283869; Wed, 06 Dec 2023 00:28:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701851283; cv=none; d=google.com; s=arc-20160816; b=Ta4PF4rCaZrHeY5qnm0166YggjqM0RxAThhvM9NiYItZbHztuaEJzNfPmScKqQdfiq WUJ16TV3xD9FILfvWDh8aTkolHM/Etnj4+G6XSElVjhQqp11MK1Yk14FYRboBMIKzdQN hgTGLgFJuWst/uDp7M/uvCau6taE8CKV74dLrQaBwTTE9vlTCw6Mlg/MwajXQ7VDWNDM 4rJtt0rPmw9yJKEGNH6nSHwBXfEX93BzpFzmLiLEqCMLggDEWw2jD6b1odHTVff+Autc uZI1QG+vmPtPe18P4X8RgKWi4vViiwtVGle49oEtaRVqdk3VPeFN2hBHNa5k78Kykx3U Lbyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence; bh=J96bjVl10/YZKpO0+pJdZW7wN1/H6wsxpMA2dwhuCto=; fh=soNs+i+4UPG3oJkfZuXUj7BlxCqlY0DkNaeR1PZ88AU=; b=BQc86u27sih9eaXLoAcXuOxB72x/Omi2oH7aOEWfQZhbO0dGMHsO4x/HgkAk8RZMne e9b+LCIyNcF6gM+ql4ZT6heOuE8tAeywTJ2QvXTAF9e3ZRRrI/fYaAra7RNeWfOTN7n6 xtjvWtgNFdZcuhyHJy7Nj3HWDJOeuyhTu0n6qqogujktspEYXswW8P860fVYLnGVMXWZ D81b6EUmWtZO/6FB7z0jRgxeiZ9lAjx3+KrFcr0p9jquOhwapzgvVw0/8fC+PDFnpVoF 9KMzpx3ZALlHGHfCGPy9K5b/v1E9L+9Vu2k+Prq362GDjYw8DWMyq4uqZWhL9MehQMQg sPSg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth+bounces-412-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-412-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 og4-20020a1709071dc400b00a1ad6cba592si3905920ejc.838.2023.12.06.00.28.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 00:28:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-412-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; spf=pass (google.com: domain of linux-bluetooth+bounces-412-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-412-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 952871F21585 for ; Wed, 6 Dec 2023 08:28:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 17E4D199A3; Wed, 6 Dec 2023 08:27:54 +0000 (UTC) X-Original-To: linux-bluetooth@vger.kernel.org Received: from mail-yw1-f175.google.com (mail-yw1-f175.google.com [209.85.128.175]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF97718D; Wed, 6 Dec 2023 00:27:50 -0800 (PST) Received: by mail-yw1-f175.google.com with SMTP id 00721157ae682-5d3758fdd2eso65829367b3.0; Wed, 06 Dec 2023 00:27:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701851270; x=1702456070; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=J96bjVl10/YZKpO0+pJdZW7wN1/H6wsxpMA2dwhuCto=; b=XAynB3JCLszm0lxVYNuTjTlEcATT/a2lKcjWUIHgSh2fSrA1SLp6ZsCwPOqktu21Py R78ahdnOX10qTPaB5LAZDlo4VQsvs6zwRCMVkSxb0BZoS6f8uyPZLShWImdPXEQDtzu3 zlWPzrw33NohyAWiRFxfHkYB8HlEkJoCMD8qu0DEuGG2ERMwVvYV0oUak7YP/bZkykxV Y/LWEhJbbC64Nle/BVyJb4L8KmMdMgI2hpRym3/5Hx8vaLFta1SIZTIXfJVoYQm4qAvZ cVmiNdwVBugOZqpF8sa5zHHGn3z0Ea6/vHAEdf+dWKXfeVZoT7N8JVmvnBVsQl8bDMmi +5/g== X-Gm-Message-State: AOJu0YyXNilsgdZZY08iKrxGrJTBcuH8E5cYffJUqJCfIdp4RhOFzY8H 7RUsX9zPIPcudFBUnLIn2lSS9RPQy3C7EA== X-Received: by 2002:a0d:eb0d:0:b0:5d7:1941:3576 with SMTP id u13-20020a0deb0d000000b005d719413576mr457636ywe.93.1701851269662; Wed, 06 Dec 2023 00:27:49 -0800 (PST) Received: from mail-yb1-f178.google.com (mail-yb1-f178.google.com. [209.85.219.178]) by smtp.gmail.com with ESMTPSA id c6-20020a814e06000000b005d364adb887sm4689374ywb.26.2023.12.06.00.27.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 06 Dec 2023 00:27:49 -0800 (PST) Received: by mail-yb1-f178.google.com with SMTP id 3f1490d57ef6-da077db5145so4339070276.0; Wed, 06 Dec 2023 00:27:48 -0800 (PST) X-Received: by 2002:a25:6607:0:b0:db7:dad0:76ac with SMTP id a7-20020a256607000000b00db7dad076acmr407887ybc.72.1701851268359; Wed, 06 Dec 2023 00:27:48 -0800 (PST) Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20231206073712.17776-1-jirislaby@kernel.org> <20231206073712.17776-5-jirislaby@kernel.org> In-Reply-To: <20231206073712.17776-5-jirislaby@kernel.org> From: Geert Uytterhoeven Date: Wed, 6 Dec 2023 09:27:36 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 04/27] tty: make tty_operations::send_xchar accept u8 char To: "Jiri Slaby (SUSE)" Cc: gregkh@linuxfoundation.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Karsten Keil , Ulf Hansson , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , netdev@vger.kernel.org, linux-mmc@vger.kernel.org, linux-bluetooth@vger.kernel.org, linux-m68k Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable CC linux-m68k On Wed, Dec 6, 2023 at 8:37=E2=80=AFAM Jiri Slaby (SUSE) wrote: > tty_operations::send_xchar is one of the last users of 'char' type for > characters in the tty layer. Convert it to u8 now. > > Signed-off-by: Jiri Slaby (SUSE) > drivers/tty/amiserial.c | 2 +- Reviewed-by: Geert Uytterhoeven > --- a/drivers/tty/amiserial.c > +++ b/drivers/tty/amiserial.c > @@ -811,7 +811,7 @@ static void rs_flush_buffer(struct tty_struct *tty) > * This function is used to send a high-priority XON/XOFF character to > * the device > */ > -static void rs_send_xchar(struct tty_struct *tty, char ch) > +static void rs_send_xchar(struct tty_struct *tty, u8 ch) > { > struct serial_state *info =3D tty->driver_data; > unsigned long flags; Looks like this might fix an actual (harmless?) bug, if anyone evers configures a VSTOP or VSTART character with bit 7 set? info->x_char =3D ch; // x_char is int, hence sign-extended transmit_chars() does: amiga_custom.serdat =3D info->x_char | 0x100; which will inadvertently have all high bits sets, including the bit 9, which is only used if PARENB is enabled. But as it looks like PARENB handling is broken in amiseral anyway, this doesn't matter much... include/linux/tty.h:#define STOP_CHAR(tty) ((tty)->termios.c_cc[VSTOP]) include/linux/tty.h:#define START_CHAR(tty) ((tty)->termios.c_cc[VSTART]) Gr{oetje,eeting}s, Geert --=20 Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k= .org In personal conversations with technical people, I call myself a hacker. Bu= t when I'm talking to journalists I just say "programmer" or something like t= hat. -- Linus Torvalds