auxdisplay: charlcd: Add missing macro and forward declaration
cover auxdisplay: charlcd: Add missing macro and forward declaration
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(+)
Signature · 1 line
2.43.0.rc1.1.gbec44491f096
PATCH 1/2 auxdisplay: charlcd: Add missing MODULE_DESCRIPTION()
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.
--- drivers/auxdisplay/charlcd.c | 1 + 1 file changed, 1 insertion(+)
drivers/auxdisplay/charlcd.c +1 -0
@@ -678,4 +678,5 @@ int charlcd_unregister(struct charlcd *lcd) }EXPORT_SYMBOL_GPL (charlcd_unregister); +MODULE_DESCRIPTION ("Character LCD core support" );MODULE_LICENSE ("GPL" );
Signature · 1 line
2.43.0.rc1.1.gbec44491f096
Re: [PATCH v1 1/2] auxdisplay: charlcd: Add missing MODULE_DESCRIPTION()
Quoted 9 lines · Andy Shevchenko
The modpost script is not happy
WARNING: modpost: missing
MODULE_DESCRIPTION()indrivers/auxdisplay/charlcd.obecause there is a missing module description.
Add it to the module.
Signed-off-by Andy Shevchenko <[email protected]>
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] 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
Re: [PATCH v1 1/2] auxdisplay: charlcd: Add missing MODULE_DESCRIPTION()
Quoted 6 lines · Geert Uytterhoeven
Quoted 4 lines · Andy Shevchenko
The modpost script is not happy
WARNING: modpost: missing
MODULE_DESCRIPTION()indrivers/auxdisplay/charlcd.o
Quoted 7 lines
Quoted 5 lines
because there is a missing module description.
Add it to the module.
Signed-off-by Andy Shevchenko <[email protected]>Reviewed-by Geert Uytterhoeven <[email protected]>
Pushed to my review and testing queue, thanks!
Signature · 2 lines
With Best Regards, Andy Shevchenko
PATCH 2/2 auxdisplay: charlcd: Provide a forward declaration
In reply to Andy ShevchenkoWhile 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.
--- drivers/auxdisplay/charlcd.h | 2 ++ 1 file changed, 2 insertions(+)
drivers/auxdisplay/charlcd.h +2 -0
@@ -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 */
Signature · 1 line
2.43.0.rc1.1.gbec44491f096
Geert Uytterhoeven
reviewerRe: [PATCH v1 2/2] auxdisplay: charlcd: Provide a forward declaration
Hi Andy,
Quoted 2 lines · Andy Shevchenko
While there is no compilation error, strictly speaking compiler should know about used types beforehand. Provide a forward decoration
declaration
Quoted 7 lines
for struct
charlcd_opsbefore using it in struct charlcd.Signed-off-by Andy Shevchenko <[email protected]>
drivers/auxdisplay/charlcd.h enum charlcd_lines { · line 42
Quoted 7 lines
drivers/auxdisplay/charlcd.h +2
-0@@ -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.
drivers/auxdisplay/charlcd.h enum charlcd_lines { · line 43
Quoted 1 line
drivers/auxdisplay/charlcd.h +0
-0const unsigned char *char_conv;/* Optional */
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] 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
Re: [PATCH v1 2/2] auxdisplay: charlcd: Provide a forward declaration
Quoted 6 lines · Geert Uytterhoeven
Quoted 2 lines · Andy Shevchenko
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.
Quoted 1 line
Quoted 1 line
for struct
charlcd_opsbefore using it in struct charlcd.
...
Quoted 7 lines
drivers/auxdisplay/charlcd.h enum charlcd_lines { · line 42
Quoted 4 lines
drivers/auxdisplay/charlcd.h +2
-0+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_.
Quoted 1 line
Quoted 1 line
const unsigned char
*char_conv; /* Optional */
Signature · 2 lines
With Best Regards, Andy Shevchenko
Re: [PATCH v1 2/2] auxdisplay: charlcd: Provide a forward declaration
Quoted 11 lines · Andy Shevchenko
Quoted 6 lines · Geert Uytterhoeven
Quoted 2 lines · Andy Shevchenko
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.
Quoted 1 line
Quoted 1 line
for struct
charlcd_opsbefore using it in struct charlcd.
...
Quoted 8 lines
Quoted 7 lines
drivers/auxdisplay/charlcd.h enum charlcd_lines { · line 42
Quoted 4 lines
drivers/auxdisplay/charlcd.h +2
-0+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.
Quoted 6 lines
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_.
Quoted 1 line
Quoted 1 line
const unsigned char
*char_conv; /* Optional */
Hmm, so what's the conclusion?
Signature · 2 lines
With Best Regards, Andy Shevchenko
Re: [PATCH v1 2/2] auxdisplay: charlcd: Provide a forward declaration
Quoted 12 lines · Andy Shevchenko
Quoted 11 lines · Andy Shevchenko
Quoted 6 lines · Geert Uytterhoeven
Quoted 2 lines · Andy Shevchenko
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.
Quoted 1 line
Quoted 1 line
for struct
charlcd_opsbefore using it in struct charlcd.
...
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
drivers/auxdisplay/charlcd.h enum charlcd_lines { · line 42
Quoted 4 lines
drivers/auxdisplay/charlcd.h +2
-0+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.
Quoted 8 lines
Quoted 6 lines
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_.
Quoted 1 line
Quoted 1 line
const unsigned char
*char_conv; /* Optional */Hmm, so what's the conclusion?
I'm going to apply this. Share you objections if any,
Signature · 2 lines
With Best Regards, Andy Shevchenko