Re: [PATCH v2 12/15] auxdisplay: ht16k33: Switch to use line display character mapping

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 15, 2024 at 09:16:05AM +0100, Geert Uytterhoeven wrote:
> On Mon, Feb 12, 2024 at 6:04 PM Andy Shevchenko
> <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:

...

> > +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.

What is the command line and compiler you are using?
I have compiled this code without issues.

-- 
With Best Regards,
Andy Shevchenko






[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux