Re: [PATCH 16/36] tty: use u8 for chars

From
Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Date
2023-08-11 10:29:10
Also in
lkml
Reply to
Jiri Slaby (SUSE), 2023-08-10
On Thu, 10 Aug 2023, Jiri Slaby (SUSE) wrote:
This makes all those 'unsigned char's an explicit 'u8'. This is part of
the continuing unification of chars and flags to be consistent u8.

This approaches tty_port_default_receive_buf(). Flags to be next.

Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Cc: William Hubbs <w.d.hubbs@gmail.com>
Cc: Chris Brannon <chris@the-brannons.com>
Cc: Kirk Reiser <kirk@reisers.ca>
Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Max Staudt <max@enpas.org>
Cc: Wolfgang Grandegger <redacted>
Cc: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Eric Dumazet <redacted>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Paolo Abeni <pabeni@redhat.com>
Cc: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Cc: Andreas Koensgen <redacted>
Cc: Jeremy Kerr <jk@codeconstruct.com.au>
Cc: Matt Johnston <matt@codeconstruct.com.au>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.com>
Cc: Peter Ujfalusi <redacted>
---
 drivers/accessibility/speakup/spk_ttyio.c |  5 ++--
 drivers/input/serio/serport.c             |  5 ++--
 drivers/misc/ti-st/st_core.c              |  2 +-
 drivers/net/can/can327.c                  |  2 +-
 drivers/net/can/slcan/slcan-core.c        |  5 ++--
 drivers/net/hamradio/6pack.c              |  4 ++--
 drivers/net/hamradio/mkiss.c              |  2 +-
 drivers/net/mctp/mctp-serial.c            |  3 +--
 drivers/net/ppp/ppp_async.c               |  8 +++----
 drivers/net/ppp/ppp_synctty.c             | 11 ++++-----
 drivers/net/slip/slip.c                   |  2 +-
 drivers/tty/n_gsm.c                       |  2 +-
 drivers/tty/n_hdlc.c                      |  2 +-
 drivers/tty/n_tty.c                       | 28 +++++++++++------------
 drivers/tty/tty.h                         |  2 +-
 drivers/tty/tty_buffer.c                  | 21 ++++++++---------
 include/linux/tty_buffer.h                |  4 ++--
 include/linux/tty_flip.h                  | 22 ++++++++----------
 include/linux/tty_ldisc.h                 | 18 +++++++--------
 sound/soc/codecs/cx20442.c                |  4 ++--
 sound/soc/ti/ams-delta.c                  |  2 +-
 21 files changed, 73 insertions(+), 81 deletions(-)
quoted hunk ↗ jump to hunk
diff --git a/include/linux/tty_buffer.h b/include/linux/tty_buffer.h
index 6ceb2789e6c8..6f2966b15093 100644
--- a/include/linux/tty_buffer.h
+++ b/include/linux/tty_buffer.h
@@ -22,9 +22,9 @@ struct tty_buffer {
 	unsigned long data[];
 };
 
-static inline unsigned char *char_buf_ptr(struct tty_buffer *b, int ofs)
+static inline u8 *char_buf_ptr(struct tty_buffer *b, int ofs)
 {
-	return ((unsigned char *)b->data) + ofs;
+	return ((u8 *)b->data) + ofs;
 }
Any particular reason why b->data is left unsigned long?

-- 
 i.
Thread (68 messages) 68 messages, 11 authors, last reply 2023-08-31
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help