* [PATCH v1 0/2] auxdisplay: charlcd: Add missing macro and forward declaration @ 2024-04-09 16:14 Andy Shevchenko 2024-04-09 16:14 ` [PATCH v1 1/2] auxdisplay: charlcd: Add missing MODULE_DESCRIPTION() Andy Shevchenko 2024-04-09 16:14 ` [PATCH v1 2/2] auxdisplay: charlcd: Provide a forward declaration Andy Shevchenko 0 siblings, 2 replies; 9+ messages in thread From: Andy Shevchenko @ 2024-04-09 16:14 UTC (permalink / raw) To: Andy Shevchenko, linux-kernel; +Cc: Andy Shevchenko, Geert Uytterhoeven Add missing macro and forward declaration. Andy Shevchenko (2): auxdisplay: charlcd: Add missing MODULE_DESCRIPTION() auxdisplay: charlcd: Provide a forward declaration drivers/auxdisplay/charlcd.c | 1 + drivers/auxdisplay/charlcd.h | 2 ++ 2 files changed, 3 insertions(+) -- 2.43.0.rc1.1.gbec44491f096 ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v1 1/2] auxdisplay: charlcd: Add missing MODULE_DESCRIPTION() 2024-04-09 16:14 [PATCH v1 0/2] auxdisplay: charlcd: Add missing macro and forward declaration Andy Shevchenko @ 2024-04-09 16:14 ` Andy Shevchenko 2024-04-11 7:31 ` Geert Uytterhoeven 2024-04-09 16:14 ` [PATCH v1 2/2] auxdisplay: charlcd: Provide a forward declaration Andy Shevchenko 1 sibling, 1 reply; 9+ messages in thread From: Andy Shevchenko @ 2024-04-09 16:14 UTC (permalink / raw) To: Andy Shevchenko, linux-kernel; +Cc: Andy Shevchenko, Geert Uytterhoeven The modpost script is not happy WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/auxdisplay/charlcd.o because there is a missing module description. Add it to the module. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> --- drivers/auxdisplay/charlcd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/auxdisplay/charlcd.c b/drivers/auxdisplay/charlcd.c index 6d309e4971b6..5df019720c56 100644 --- a/drivers/auxdisplay/charlcd.c +++ b/drivers/auxdisplay/charlcd.c @@ -678,4 +678,5 @@ int charlcd_unregister(struct charlcd *lcd) } EXPORT_SYMBOL_GPL(charlcd_unregister); +MODULE_DESCRIPTION("Character LCD core support"); MODULE_LICENSE("GPL"); -- 2.43.0.rc1.1.gbec44491f096 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v1 1/2] auxdisplay: charlcd: Add missing MODULE_DESCRIPTION() 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 0 siblings, 1 reply; 9+ messages in thread From: Geert Uytterhoeven @ 2024-04-11 7:31 UTC (permalink / raw) To: Andy Shevchenko; +Cc: linux-kernel, Andy Shevchenko On Tue, Apr 9, 2024 at 6:15 PM Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote: > The modpost script is not happy > > WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/auxdisplay/charlcd.o > > because there is a missing module description. > > Add it to the module. > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org 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 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v1 1/2] auxdisplay: charlcd: Add missing MODULE_DESCRIPTION() 2024-04-11 7:31 ` Geert Uytterhoeven @ 2024-04-11 10:32 ` Andy Shevchenko 0 siblings, 0 replies; 9+ messages in thread From: Andy Shevchenko @ 2024-04-11 10:32 UTC (permalink / raw) To: Geert Uytterhoeven; +Cc: linux-kernel On Thu, Apr 11, 2024 at 09:31:32AM +0200, Geert Uytterhoeven wrote: > On Tue, Apr 9, 2024 at 6:15 PM Andy Shevchenko > <andriy.shevchenko@linux.intel.com> wrote: > > The modpost script is not happy > > > > WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/auxdisplay/charlcd.o > > > > because there is a missing module description. > > > > Add it to the module. > > > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > > Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Pushed to my review and testing queue, thanks! -- With Best Regards, Andy Shevchenko ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v1 2/2] auxdisplay: charlcd: Provide a forward declaration 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-09 16:14 ` Andy Shevchenko 2024-04-11 7:30 ` Geert Uytterhoeven 1 sibling, 1 reply; 9+ messages in thread From: Andy Shevchenko @ 2024-04-09 16:14 UTC (permalink / raw) To: Andy Shevchenko, linux-kernel; +Cc: Andy Shevchenko, Geert Uytterhoeven While there is no compilation error, strictly speaking compiler should know about used types beforehand. Provide a forward decration for struct charlcd_ops before using it in struct charlcd. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> --- drivers/auxdisplay/charlcd.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/auxdisplay/charlcd.h b/drivers/auxdisplay/charlcd.h index eed80063a6d2..4d4287209d04 100644 --- 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; const unsigned char *char_conv; /* Optional */ -- 2.43.0.rc1.1.gbec44491f096 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v1 2/2] auxdisplay: charlcd: Provide a forward declaration 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 0 siblings, 1 reply; 9+ messages in thread From: Geert Uytterhoeven @ 2024-04-11 7:30 UTC (permalink / raw) To: Andy Shevchenko; +Cc: linux-kernel, Andy Shevchenko Hi Andy, 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 > for struct charlcd_ops before using it in struct charlcd. > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.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@linux-m68k.org 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 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v1 2/2] auxdisplay: charlcd: Provide a forward declaration 2024-04-11 7:30 ` Geert Uytterhoeven @ 2024-04-11 10:30 ` Andy Shevchenko 2024-04-23 16:35 ` Andy Shevchenko 0 siblings, 1 reply; 9+ messages in thread From: Andy Shevchenko @ 2024-04-11 10:30 UTC (permalink / raw) To: Geert Uytterhoeven; +Cc: linux-kernel 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 */ -- With Best Regards, Andy Shevchenko ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v1 2/2] auxdisplay: charlcd: Provide a forward declaration 2024-04-11 10:30 ` Andy Shevchenko @ 2024-04-23 16:35 ` Andy Shevchenko 2024-05-07 16:36 ` Andy Shevchenko 0 siblings, 1 reply; 9+ messages in thread From: Andy Shevchenko @ 2024-04-23 16:35 UTC (permalink / raw) To: Geert Uytterhoeven; +Cc: linux-kernel 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? -- With Best Regards, Andy Shevchenko ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v1 2/2] auxdisplay: charlcd: Provide a forward declaration 2024-04-23 16:35 ` Andy Shevchenko @ 2024-05-07 16:36 ` Andy Shevchenko 0 siblings, 0 replies; 9+ messages in thread From: Andy Shevchenko @ 2024-05-07 16:36 UTC (permalink / raw) To: Geert Uytterhoeven; +Cc: linux-kernel 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 ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2024-05-07 16:36 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox