lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdX_n4kifH6F20tt-umtL3rY9zb6=XmgrnXvuOJSibhrEQ@mail.gmail.com>
Date: Thu, 11 Apr 2024 09:30:31 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: linux-kernel@...r.kernel.org, Andy Shevchenko <andy@...nel.org>
Subject: Re: [PATCH v1 2/2] auxdisplay: charlcd: Provide a forward declaration

Hi Andy,

On Tue, Apr 9, 2024 at 6:15 PM Andy Shevchenko
<andriy.shevchenko@...ux.intel.com> wrote:
> While there is no compilation error, strictly speaking compiler
> should know about used types beforehand. Provide a forward decoration

declaration

> for struct charlcd_ops before using it in struct charlcd.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>

> --- a/drivers/auxdisplay/charlcd.h
> +++ b/drivers/auxdisplay/charlcd.h
> @@ -36,6 +36,8 @@ enum charlcd_lines {
>         CHARLCD_LINES_2,
>  };
>
> +struct charlcd_ops;
> +
>  struct charlcd {
>         const struct charlcd_ops *ops;

No forward declaration is needed at this point, as ops is a _pointer_ to
the structure.

>         const unsigned char *char_conv; /* Optional */

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ