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] [day] [month] [year] [list]
Date: Tue, 7 May 2024 19:36:05 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1 2/2] auxdisplay: charlcd: Provide a forward declaration

On Tue, Apr 23, 2024 at 07:35:02PM +0300, Andy Shevchenko wrote:
> On Thu, Apr 11, 2024 at 01:30:25PM +0300, Andy Shevchenko wrote:
> > On Thu, Apr 11, 2024 at 09:30:31AM +0200, Geert Uytterhoeven wrote:
> > > 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
> > 
> > Thanks, I updated locally. Please, see my answer below.
> > 
> > > > for struct charlcd_ops before using it in struct charlcd.

..

> > > > +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.
> > 
> > The same way as in all other cases. We may drop all of them, but strictly
> > speaking (as I mentioned in the commit message) this is a good practice.
> > 
> > I.o.w. a forward declaration of custom data types is used for _pointers_.
> > 
> > > >         const unsigned char *char_conv; /* Optional */
> 
> Hmm, so what's the conclusion?

I'm going to apply this. Share you objections if any,

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ