Re: [PATCH 16/36] tty: use u8 for chars
From: Andy Shevchenko
Date: Thu Aug 31 2023 - 14:33:33 EST
On Fri, Aug 11, 2023 at 01:28:56PM +0300, Ilpo Järvinen wrote:
> On Thu, 10 Aug 2023, Jiri Slaby (SUSE) wrote:
...
> > @@ -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?
It might be the performance issue due to unaligned accesses on some
architectures. But I'm just speculating...
--
With Best Regards,
Andy Shevchenko