auxdisplay: charlcd: Don't rebuild when CONFIG_PANEL_BOOT_MESSAGE=y
PATCH 1/1 auxdisplay: charlcd: Don't rebuild when CONFIG_PANEL_BOOT_MESSAGE=y
When CONFIG_PANEL_BOOT_MESSAGE=y the module still includes the generated header and gets rebuilt even if it doesn't use anything from that header. Include generated header conditionally to avoid unnecessary rebuilds.
--- drivers/auxdisplay/charlcd.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/auxdisplay/charlcd.c +2 -0
@@ -17,7 +17,9 @@#include <linux/uaccess.h> #include <linux/workqueue.h> +#ifndef CONFIG_PANEL_BOOT_MESSAGE #include <generated/utsrelease.h> +#endif #include "charlcd.h"
Signature · 1 line
2.43.0.rc1.1.gbec44491f096
Hi Andy,
Quoted 6 lines · Andy Shevchenko
When
CONFIG_PANEL_BOOT_MESSAGE=ythe module still includes the generated header and gets rebuilt even if it doesn't use anything from that header. Include generated header conditionally to avoid unnecessary rebuilds.Signed-off-by Andy Shevchenko <[email protected]>
Thanks for your patch!
drivers/auxdisplay/charlcd.c line 22
Quoted 9 lines
drivers/auxdisplay/charlcd.c +2
-0@@ -17,7 +17,9 @@#include <linux/uaccess.h> #include <linux/workqueue.h> +#ifndef CONFIG_PANEL_BOOT_MESSAGE #include <generated/utsrelease.h> +#endif
Perhaps move the existing "#ifdef CONFIG_PANEL_BOOT_MESSAGE"-block up, and move the #include inside the #else branch?
drivers/auxdisplay/charlcd.c line 24
Quoted 2 lines
drivers/auxdisplay/charlcd.c +0
-0#include "charlcd.h"
Regardless
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
Quoted 17 lines · Geert Uytterhoeven
Quoted 6 lines · Andy Shevchenko
When
CONFIG_PANEL_BOOT_MESSAGE=ythe module still includes the generated header and gets rebuilt even if it doesn't use anything from that header. Include generated header conditionally to avoid unnecessary rebuilds.Signed-off-by Andy Shevchenko <[email protected]>Thanks for your patch!
Quoted 6 lines
drivers/auxdisplay/charlcd.c +0
-0@@ -17,7 +17,9 @@#include <linux/uaccess.h> #include <linux/workqueue.h>
Quoted 6 lines
drivers/auxdisplay/charlcd.c line 22
Quoted 3 lines
drivers/auxdisplay/charlcd.c +2
-0+#ifndef CONFIG_PANEL_BOOT_MESSAGE #include <generated/utsrelease.h> +#endif Perhaps move the existing "#ifdef CONFIG_PANEL_BOOT_MESSAGE"-block up, and move the #include inside the #else branch?
I was thinking about it, but decided to group headers together.
Quoted 4 lines
drivers/auxdisplay/charlcd.c line 24
Quoted 1 line
drivers/auxdisplay/charlcd.c +0
-0#include "charlcd.h" Regardless
Reviewed-by Geert Uytterhoeven <[email protected]>
Pushed to my review and testing queue, thanks!
Signature · 2 lines
With Best Regards, Andy Shevchenko