Re: [PATCH v4 08/13] serial: sh-sci: Introduced function pointers
From: Geert Uytterhoeven
Date: Fri Mar 14 2025 - 07:06:18 EST
Hi Thierry,
On Thu, 6 Mar 2025 at 16:26, Thierry Bultel
<thierry.bultel.yh@xxxxxxxxxxxxxx> wrote:
> The aim here is to prepare support for new sci controllers like
> the T2H/RSCI whose registers are too much different for being
> handled in common code.
>
> This named serial controller also has 32 bits register,
> so some return types had to be changed.
>
> The needed generic functions are no longer static, with prototypes
> defined in sh-sci-common.h so that they can be used from specific
> implementation in a separate file, to keep this driver as little
> changed as possible.
>
> For doing so, a set of 'ops' is added to struct sci_port.
>
> Signed-off-by: Thierry Bultel <thierry.bultel.yh@xxxxxxxxxxxxxx>
> ---
> Changes v3->v4:
> - Add missing #include <bitfield.h>
> - Remove sci_poll_get_char sci_poll_put_char from sh-sci-common.h (both
> function are not used by rzsci yet).
> - Add missing #ifdef around .poll_put_char pointer initialization.
> - More registers to save & restore due to rebase on tty-next
Thanks for the update!
While most rough edges have been polished by now (thanks!), and the
driver seems to still work on a variety of platforms, I am still
worried about the impact of this change:
- Maintainability and future bug fixing?
- Performance of the additional indirections on slow platforms (SH)?
What do other people think?
Thanks!
Full series:
https://lore.kernel.org/all/20250306152451.2356762-1-thierry.bultel.yh@xxxxxxxxxxxxxx
My initial comments and RFC:
https://lore.kernel.org/all/CAMuHMdVD1dLP53V_zOhxpqazDdPDVafJ6iohY8u6WPQrmYH5Sw@xxxxxxxxxxxxxx
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds