Messages in this thread | | | From | Geert Uytterhoeven <> | Date | Thu, 15 Feb 2024 09:16:05 +0100 | Subject | Re: [PATCH v2 12/15] auxdisplay: ht16k33: Switch to use line display character mapping |
| |
Hi Andy,
On Mon, Feb 12, 2024 at 6:04 PM Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote: > Since line display library supports necessary bits to map the characters > (if required), switch this driver to use that. > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Thanks for your patch!
> --- a/drivers/auxdisplay/ht16k33.c > +++ b/drivers/auxdisplay/ht16k33.c
> +static int ht16k33_linedisp_get_map_type(struct linedisp *linedisp) > +{ > + struct ht16k33_priv *priv = container_of(linedisp, struct ht16k33_priv, > + seg.linedisp); > + > + switch (priv->type) { > + case DISP_MATRIX: > + /* not handled here */ > + return -EINVAL; > + > + case DISP_QUAD_7SEG: > + INIT_DELAYED_WORK(&priv->work, ht16k33_seg7_update); > + return LINEDISP_MAP_SEG7; > + > + case DISP_QUAD_14SEG: > + INIT_DELAYED_WORK(&priv->work, ht16k33_seg14_update); > + return LINEDISP_MAP_SEG14; > + }
error: control reaches end of non-void function [-Werror=return-type]
Missing "return -EINVAL";
This case cannot happen, so it wasn't handled in the old code. But with the new code, it fails at compile-time.
Gr{oetje,eeting}s,
Geert
-- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68korg
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
| |