public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 2/2] auxdisplay: charlcd: Provide a forward declaration
Date: Tue, 7 May 2024 19:36:05 +0300	[thread overview]
Message-ID: <ZjpYdYqlzAQ0NJXE@smile.fi.intel.com> (raw)
In-Reply-To: <ZifjNpEetImWWcOb@smile.fi.intel.com>

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@linux.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



      reply	other threads:[~2024-05-07 16:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-09 16:14 [PATCH v1 0/2] auxdisplay: charlcd: Add missing macro and forward declaration Andy Shevchenko
2024-04-09 16:14 ` [PATCH v1 1/2] auxdisplay: charlcd: Add missing MODULE_DESCRIPTION() Andy Shevchenko
2024-04-11  7:31   ` Geert Uytterhoeven
2024-04-11 10:32     ` Andy Shevchenko
2024-04-09 16:14 ` [PATCH v1 2/2] auxdisplay: charlcd: Provide a forward declaration Andy Shevchenko
2024-04-11  7:30   ` Geert Uytterhoeven
2024-04-11 10:30     ` Andy Shevchenko
2024-04-23 16:35       ` Andy Shevchenko
2024-05-07 16:36         ` Andy Shevchenko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZjpYdYqlzAQ0NJXE@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox