* fbdev/chipsfb.c:401:31: error: invalid use of undefined type 'struct backlight_device'
@ 2024-03-04 8:20 Naresh Kamboju
2024-03-04 9:55 ` [PATCH] powerpc: include linux/backlight.h from asm/backlight.h Jani Nikula
0 siblings, 1 reply; 11+ messages in thread
From: Naresh Kamboju @ 2024-03-04 8:20 UTC (permalink / raw)
To: open list, linux-fbdev, dri-devel, lkft-triage
Cc: Thomas Zimmermann, Helge Deller, Arnd Bergmann
The powerpc ppc6xx_defconfig builds failed on today's Linux next tag
next-20240304.
Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
Build log:
---------
drivers/video/fbdev/chipsfb.c: In function 'chipsfb_pci_init':
drivers/video/fbdev/chipsfb.c:401:31: error: invalid use of undefined
type 'struct backlight_device'
401 | pmac_backlight->props.power = FB_BLANK_UNBLANK;
| ^~
Steps to reproduce:
# tuxmake --runtime podman --target-arch powerpc --toolchain gcc-13
--kconfig ppc6xx_defconfig
- https://storage.tuxsuite.com/public/linaro/lkft/builds/2dDE297yLFrAr3gigIDy8tIleDh/tuxmake_reproducer.sh
Links:
- https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20240304/testrun/22919857/suite/build/test/gcc-13-ppc6xx_defconfig/details/
- https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20240304/testrun/22919857/suite/build/test/gcc-13-ppc6xx_defconfig/log
- https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20240304/testrun/22919857/suite/build/test/gcc-13-ppc6xx_defconfig/history/
--
Linaro LKFT
https://lkft.linaro.org
^ permalink raw reply [flat|nested] 11+ messages in thread* [PATCH] powerpc: include linux/backlight.h from asm/backlight.h 2024-03-04 8:20 fbdev/chipsfb.c:401:31: error: invalid use of undefined type 'struct backlight_device' Naresh Kamboju @ 2024-03-04 9:55 ` Jani Nikula 2024-03-04 10:01 ` Jani Nikula 2024-03-04 10:32 ` Thomas Zimmermann 0 siblings, 2 replies; 11+ messages in thread From: Jani Nikula @ 2024-03-04 9:55 UTC (permalink / raw) To: Michael Ellerman, linuxppc-dev Cc: jani.nikula, dri-devel, lkft-triage, linux-kernel, Naresh Kamboju, Thomas Zimmermann, Helge Deller, linux-fbdev Removal of the backlight include from fb.h uncovered an implicit dependency in powerpc asm/backlight.h. Add the explicit include. Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org> Closes: https://lore.kernel.org/r/CA+G9fYsAk5TbqqxFC2W4oHLGA0CbTHMxbeq8QayFXTU75YiueA@mail.gmail.com Fixes: 11b4eedfc87d ("fbdev: Do not include <linux/backlight.h> in header") Cc: Thomas Zimmermann <tzimmermann@suse.de> Cc: Helge Deller <deller@gmx.de> Cc: linux-fbdev@vger.kernel.org Signed-off-by: Jani Nikula <jani.nikula@intel.com> --- Not even compile tested! --- arch/powerpc/include/asm/backlight.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/include/asm/backlight.h b/arch/powerpc/include/asm/backlight.h index 1b5eab62ed04..275d5bb9aa04 100644 --- a/arch/powerpc/include/asm/backlight.h +++ b/arch/powerpc/include/asm/backlight.h @@ -10,6 +10,7 @@ #define __ASM_POWERPC_BACKLIGHT_H #ifdef __KERNEL__ +#include <linux/backlight.h> #include <linux/fb.h> #include <linux/mutex.h> -- 2.39.2 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] powerpc: include linux/backlight.h from asm/backlight.h 2024-03-04 9:55 ` [PATCH] powerpc: include linux/backlight.h from asm/backlight.h Jani Nikula @ 2024-03-04 10:01 ` Jani Nikula 2024-03-04 14:55 ` Naresh Kamboju 2024-03-05 0:39 ` Michael Ellerman 2024-03-04 10:32 ` Thomas Zimmermann 1 sibling, 2 replies; 11+ messages in thread From: Jani Nikula @ 2024-03-04 10:01 UTC (permalink / raw) To: Michael Ellerman, linuxppc-dev Cc: dri-devel, lkft-triage, linux-kernel, Naresh Kamboju, Thomas Zimmermann, Helge Deller, linux-fbdev On Mon, 04 Mar 2024, Jani Nikula <jani.nikula@intel.com> wrote: > Removal of the backlight include from fb.h uncovered an implicit > dependency in powerpc asm/backlight.h. Add the explicit include. > > Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org> > Closes: https://lore.kernel.org/r/CA+G9fYsAk5TbqqxFC2W4oHLGA0CbTHMxbeq8QayFXTU75YiueA@mail.gmail.com > Fixes: 11b4eedfc87d ("fbdev: Do not include <linux/backlight.h> in header") > Cc: Thomas Zimmermann <tzimmermann@suse.de> > Cc: Helge Deller <deller@gmx.de> > Cc: linux-fbdev@vger.kernel.org > Signed-off-by: Jani Nikula <jani.nikula@intel.com> > > --- > > Not even compile tested! Naresh, please try this patch! Michael, if this is fine by you, ack to merge via the drm subsystem along with the regressing commit? BR, Jani. > --- > arch/powerpc/include/asm/backlight.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/powerpc/include/asm/backlight.h b/arch/powerpc/include/asm/backlight.h > index 1b5eab62ed04..275d5bb9aa04 100644 > --- a/arch/powerpc/include/asm/backlight.h > +++ b/arch/powerpc/include/asm/backlight.h > @@ -10,6 +10,7 @@ > #define __ASM_POWERPC_BACKLIGHT_H > #ifdef __KERNEL__ > > +#include <linux/backlight.h> > #include <linux/fb.h> > #include <linux/mutex.h> -- Jani Nikula, Intel ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] powerpc: include linux/backlight.h from asm/backlight.h 2024-03-04 10:01 ` Jani Nikula @ 2024-03-04 14:55 ` Naresh Kamboju 2024-03-05 0:39 ` Michael Ellerman 1 sibling, 0 replies; 11+ messages in thread From: Naresh Kamboju @ 2024-03-04 14:55 UTC (permalink / raw) To: Jani Nikula Cc: Michael Ellerman, linuxppc-dev, dri-devel, lkft-triage, linux-kernel, Thomas Zimmermann, Helge Deller, linux-fbdev, Uwe Kleine-König, Benjamin Herrenschmidt Hi Jani and Benjamin, On Mon, 4 Mar 2024 at 15:31, Jani Nikula <jani.nikula@intel.com> wrote: > > On Mon, 04 Mar 2024, Jani Nikula <jani.nikula@intel.com> wrote: > > Removal of the backlight include from fb.h uncovered an implicit > > dependency in powerpc asm/backlight.h. Add the explicit include. > > > > Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org> > > Closes: https://lore.kernel.org/r/CA+G9fYsAk5TbqqxFC2W4oHLGA0CbTHMxbeq8QayFXTU75YiueA@mail.gmail.com > > Fixes: 11b4eedfc87d ("fbdev: Do not include <linux/backlight.h> in header") > > Cc: Thomas Zimmermann <tzimmermann@suse.de> > > Cc: Helge Deller <deller@gmx.de> > > Cc: linux-fbdev@vger.kernel.org > > Signed-off-by: Jani Nikula <jani.nikula@intel.com> > > > > --- > > > > Not even compile tested! > > Naresh, please try this patch! Thanks for the proposed fix patch. Steps to reproduce: # tuxmake --runtime podman --target-arch powerpc --toolchain gcc-13 --kconfig ppc6xx_defconfig --kconfig-add CONFIG_PMAC_BACKLIGHT=y config debugkernel dtbs kernel modules xipkernel # Applying patch set Applying: fbdev/chipsfb: Include <linux/backlight.h> The reported build regression is fixed but build failed with below errors. My two cents, I should have copied the full build error log in the morning. Few more build errors on powerpc builds, ------------------ drivers/macintosh/via-pmu-backlight.c: In function '__pmu_backlight_update_status': drivers/macintosh/via-pmu-backlight.c:74:21: error: implicit declaration of function 'backlight_get_brightness'; did you mean 'pmu_backlight_get_level_brightness'? [-Werror=implicit-function-declaration] 74 | int level = backlight_get_brightness(bd); | ^~~~~~~~~~~~~~~~~~~~~~~~ | pmu_backlight_get_level_brightness drivers/macintosh/via-pmu-backlight.c: At top level: drivers/macintosh/via-pmu-backlight.c:108:21: error: variable 'pmu_backlight_data' has initializer but incomplete type 108 | static const struct backlight_ops pmu_backlight_data = { | ^~~~~~~~~~~~~ drivers/macintosh/via-pmu-backlight.c:109:10: error: 'const struct backlight_ops' has no member named 'update_status' 109 | .update_status = pmu_backlight_update_status, | ^~~~~~~~~~~~~ drivers/macintosh/via-pmu-backlight.c:109:27: warning: excess elements in struct initializer 109 | .update_status = pmu_backlight_update_status, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/macintosh/via-pmu-backlight.c:109:27: note: (near initialization for 'pmu_backlight_data') drivers/macintosh/via-pmu-backlight.c: In function 'pmu_backlight_init': drivers/macintosh/via-pmu-backlight.c:136:37: error: storage size of 'props' isn't known 136 | struct backlight_properties props; | ^~~~~ drivers/macintosh/via-pmu-backlight.c:154:34: error: invalid application of 'sizeof' to incomplete type 'struct backlight_properties' 154 | memset(&props, 0, sizeof(struct backlight_properties)); | ^~~~~~ drivers/macintosh/via-pmu-backlight.c:155:22: error: 'BACKLIGHT_PLATFORM' undeclared (first use in this function) 155 | props.type = BACKLIGHT_PLATFORM; | ^~~~~~~~~~~~~~~~~~ drivers/macintosh/via-pmu-backlight.c:155:22: note: each undeclared identifier is reported only once for each function it appears in drivers/macintosh/via-pmu-backlight.c:157:14: error: implicit declaration of function 'backlight_device_register'; did you mean 'root_device_register'? [-Werror=implicit-function-declaration] 157 | bd = backlight_device_register(name, NULL, NULL, &pmu_backlight_data, | ^~~~~~~~~~~~~~~~~~~~~~~~~ | root_device_register drivers/macintosh/via-pmu-backlight.c:166:19: error: invalid use of undefined type 'struct backlight_device' 166 | level = bd->props.max_brightness; | ^~ drivers/macintosh/via-pmu-backlight.c:176:35: error: invalid use of undefined type 'struct backlight_device' 176 | bd->props.max_brightness / 15); | ^~ drivers/macintosh/via-pmu-backlight.c:179:11: error: invalid use of undefined type 'struct backlight_device' 179 | bd->props.brightness = level; | ^~ drivers/macintosh/via-pmu-backlight.c:180:11: error: invalid use of undefined type 'struct backlight_device' 180 | bd->props.power = FB_BLANK_UNBLANK; | ^~ drivers/macintosh/via-pmu-backlight.c:181:9: error: implicit declaration of function 'backlight_update_status'; did you mean 'pmu_backlight_update_status'? [-Werror=implicit-function-declaration] 181 | backlight_update_status(bd); | ^~~~~~~~~~~~~~~~~~~~~~~ | pmu_backlight_update_status drivers/macintosh/via-pmu-backlight.c:136:37: warning: unused variable 'props' [-Wunused-variable] 136 | struct backlight_properties props; | ^~~~~ drivers/macintosh/via-pmu-backlight.c: At top level: drivers/macintosh/via-pmu-backlight.c:108:35: error: storage size of 'pmu_backlight_data' isn't known 108 | static const struct backlight_ops pmu_backlight_data = { | ^~~~~~~~~~~~~~~~~~ drivers/macintosh/via-pmu-backlight.c:108:35: error: storage size of 'pmu_backlight_data' isn't known cc1: some warnings being treated as errors make[5]: *** [scripts/Makefile.build:244: drivers/macintosh/via-pmu-backlight.o] Error 1 Reported-by: Linux Kernel Functional Testing <lkft@linaro.org> > Michael, if this is fine by you, ack to merge via the drm subsystem > along with the regressing commit? > > BR, > Jani. > > > --- > > arch/powerpc/include/asm/backlight.h | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/arch/powerpc/include/asm/backlight.h b/arch/powerpc/include/asm/backlight.h > > index 1b5eab62ed04..275d5bb9aa04 100644 > > --- a/arch/powerpc/include/asm/backlight.h > > +++ b/arch/powerpc/include/asm/backlight.h > > @@ -10,6 +10,7 @@ > > #define __ASM_POWERPC_BACKLIGHT_H > > #ifdef __KERNEL__ > > > > +#include <linux/backlight.h> > > #include <linux/fb.h> > > #include <linux/mutex.h> > > -- > Jani Nikula, Intel -- Linaro LKFT https://lkft.linaro.org ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] powerpc: include linux/backlight.h from asm/backlight.h 2024-03-04 10:01 ` Jani Nikula 2024-03-04 14:55 ` Naresh Kamboju @ 2024-03-05 0:39 ` Michael Ellerman 2024-03-05 8:19 ` Jani Nikula 1 sibling, 1 reply; 11+ messages in thread From: Michael Ellerman @ 2024-03-05 0:39 UTC (permalink / raw) To: Jani Nikula, linuxppc-dev Cc: dri-devel, lkft-triage, linux-kernel, Naresh Kamboju, Thomas Zimmermann, Helge Deller, linux-fbdev Jani Nikula <jani.nikula@intel.com> writes: > On Mon, 04 Mar 2024, Jani Nikula <jani.nikula@intel.com> wrote: >> Removal of the backlight include from fb.h uncovered an implicit >> dependency in powerpc asm/backlight.h. Add the explicit include. >> >> Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org> >> Closes: https://lore.kernel.org/r/CA+G9fYsAk5TbqqxFC2W4oHLGA0CbTHMxbeq8QayFXTU75YiueA@mail.gmail.com >> Fixes: 11b4eedfc87d ("fbdev: Do not include <linux/backlight.h> in header") >> Cc: Thomas Zimmermann <tzimmermann@suse.de> >> Cc: Helge Deller <deller@gmx.de> >> Cc: linux-fbdev@vger.kernel.org >> Signed-off-by: Jani Nikula <jani.nikula@intel.com> >> >> --- >> >> Not even compile tested! > > Naresh, please try this patch! > > Michael, if this is fine by you, ack to merge via the drm subsystem > along with the regressing commit? I prefer Thomas' patch, but I'm fine with either to go in via drm. cheers ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] powerpc: include linux/backlight.h from asm/backlight.h 2024-03-05 0:39 ` Michael Ellerman @ 2024-03-05 8:19 ` Jani Nikula 0 siblings, 0 replies; 11+ messages in thread From: Jani Nikula @ 2024-03-05 8:19 UTC (permalink / raw) To: Michael Ellerman, linuxppc-dev Cc: dri-devel, lkft-triage, linux-kernel, Naresh Kamboju, Thomas Zimmermann, Helge Deller, linux-fbdev On Tue, 05 Mar 2024, Michael Ellerman <mpe@ellerman.id.au> wrote: > I prefer Thomas' patch, but I'm fine with either to go in via drm. Thanks! -- Jani Nikula, Intel ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] powerpc: include linux/backlight.h from asm/backlight.h 2024-03-04 9:55 ` [PATCH] powerpc: include linux/backlight.h from asm/backlight.h Jani Nikula 2024-03-04 10:01 ` Jani Nikula @ 2024-03-04 10:32 ` Thomas Zimmermann 2024-03-04 10:40 ` Thomas Zimmermann 2024-03-04 18:13 ` Christophe Leroy 1 sibling, 2 replies; 11+ messages in thread From: Thomas Zimmermann @ 2024-03-04 10:32 UTC (permalink / raw) To: Jani Nikula, Michael Ellerman, linuxppc-dev Cc: dri-devel, lkft-triage, linux-kernel, Naresh Kamboju, Helge Deller, linux-fbdev Hi Am 04.03.24 um 10:55 schrieb Jani Nikula: > Removal of the backlight include from fb.h uncovered an implicit > dependency in powerpc asm/backlight.h. Add the explicit include. > > Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org> > Closes: https://lore.kernel.org/r/CA+G9fYsAk5TbqqxFC2W4oHLGA0CbTHMxbeq8QayFXTU75YiueA@mail.gmail.com > Fixes: 11b4eedfc87d ("fbdev: Do not include <linux/backlight.h> in header") > Cc: Thomas Zimmermann <tzimmermann@suse.de> > Cc: Helge Deller <deller@gmx.de> > Cc: linux-fbdev@vger.kernel.org > Signed-off-by: Jani Nikula <jani.nikula@intel.com> > > --- > > Not even compile tested! That's one of the cases that's hard to catch unless you get the config right. > --- > arch/powerpc/include/asm/backlight.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/powerpc/include/asm/backlight.h b/arch/powerpc/include/asm/backlight.h > index 1b5eab62ed04..275d5bb9aa04 100644 > --- a/arch/powerpc/include/asm/backlight.h > +++ b/arch/powerpc/include/asm/backlight.h > @@ -10,6 +10,7 @@ > #define __ASM_POWERPC_BACKLIGHT_H > #ifdef __KERNEL__ > > +#include <linux/backlight.h> Thanks, but I think this should go directly into chipsfb.c. I would have provided a patch already, if our mail server didn't have issues this morning. Let me try again. Best regards Thomas > #include <linux/fb.h> > #include <linux/mutex.h> > -- -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Frankenstrasse 146, 90461 Nuernberg, Germany GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman HRB 36809 (AG Nuernberg) ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] powerpc: include linux/backlight.h from asm/backlight.h 2024-03-04 10:32 ` Thomas Zimmermann @ 2024-03-04 10:40 ` Thomas Zimmermann 2024-03-04 18:13 ` Christophe Leroy 1 sibling, 0 replies; 11+ messages in thread From: Thomas Zimmermann @ 2024-03-04 10:40 UTC (permalink / raw) To: Jani Nikula, Michael Ellerman, linuxppc-dev Cc: dri-devel, lkft-triage, linux-kernel, Naresh Kamboju, Helge Deller, linux-fbdev Am 04.03.24 um 11:32 schrieb Thomas Zimmermann: [...] >> --- >> arch/powerpc/include/asm/backlight.h | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/arch/powerpc/include/asm/backlight.h >> b/arch/powerpc/include/asm/backlight.h >> index 1b5eab62ed04..275d5bb9aa04 100644 >> --- a/arch/powerpc/include/asm/backlight.h >> +++ b/arch/powerpc/include/asm/backlight.h >> @@ -10,6 +10,7 @@ >> #define __ASM_POWERPC_BACKLIGHT_H >> #ifdef __KERNEL__ >> +#include <linux/backlight.h> > > Thanks, but I think this should go directly into chipsfb.c. I would > have provided a patch already, if our mail server didn't have issues > this morning. Let me try again. Posted at https://lore.kernel.org/dri-devel/20240304103820.16708-1-tzimmermann@suse.de/T/#u > > Best regards > Thomas > >> #include <linux/fb.h> >> #include <linux/mutex.h> > -- -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Frankenstrasse 146, 90461 Nuernberg, Germany GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman HRB 36809 (AG Nuernberg) ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] powerpc: include linux/backlight.h from asm/backlight.h 2024-03-04 10:32 ` Thomas Zimmermann 2024-03-04 10:40 ` Thomas Zimmermann @ 2024-03-04 18:13 ` Christophe Leroy 2024-03-05 0:36 ` Michael Ellerman 1 sibling, 1 reply; 11+ messages in thread From: Christophe Leroy @ 2024-03-04 18:13 UTC (permalink / raw) To: Thomas Zimmermann, Jani Nikula, Michael Ellerman, linuxppc-dev@lists.ozlabs.org Cc: linux-fbdev@vger.kernel.org, Helge Deller, linux-kernel@vger.kernel.org, lkft-triage@lists.linaro.org, dri-devel@lists.freedesktop.org, Naresh Kamboju Le 04/03/2024 à 11:32, Thomas Zimmermann a écrit : > Hi > > Am 04.03.24 um 10:55 schrieb Jani Nikula: >> Removal of the backlight include from fb.h uncovered an implicit >> dependency in powerpc asm/backlight.h. Add the explicit include. >> >> Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org> >> Closes: >> https://lore.kernel.org/r/CA+G9fYsAk5TbqqxFC2W4oHLGA0CbTHMxbeq8QayFXTU75YiueA@mail.gmail.com >> Fixes: 11b4eedfc87d ("fbdev: Do not include <linux/backlight.h> in >> header") >> Cc: Thomas Zimmermann <tzimmermann@suse.de> >> Cc: Helge Deller <deller@gmx.de> >> Cc: linux-fbdev@vger.kernel.org >> Signed-off-by: Jani Nikula <jani.nikula@intel.com> >> >> --- >> >> Not even compile tested! > > That's one of the cases that's hard to catch unless you get the config > right. > >> --- >> arch/powerpc/include/asm/backlight.h | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/arch/powerpc/include/asm/backlight.h >> b/arch/powerpc/include/asm/backlight.h >> index 1b5eab62ed04..275d5bb9aa04 100644 >> --- a/arch/powerpc/include/asm/backlight.h >> +++ b/arch/powerpc/include/asm/backlight.h >> @@ -10,6 +10,7 @@ >> #define __ASM_POWERPC_BACKLIGHT_H >> #ifdef __KERNEL__ >> +#include <linux/backlight.h> > > Thanks, but I think this should go directly into chipsfb.c. I would have > provided a patch already, if our mail server didn't have issues this > morning. Let me try again. asm/backlight.h needs it for struct backlight_device At least if you don't want to include linux/backlight.h in asm/backlight.h, then you need a forward declaration of struct backlight_device; > > Best regards > Thomas > >> #include <linux/fb.h> >> #include <linux/mutex.h> > ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] powerpc: include linux/backlight.h from asm/backlight.h 2024-03-04 18:13 ` Christophe Leroy @ 2024-03-05 0:36 ` Michael Ellerman 2024-03-05 8:09 ` Thomas Zimmermann 0 siblings, 1 reply; 11+ messages in thread From: Michael Ellerman @ 2024-03-05 0:36 UTC (permalink / raw) To: Christophe Leroy, Thomas Zimmermann, Jani Nikula, linuxppc-dev@lists.ozlabs.org Cc: linux-fbdev@vger.kernel.org, Helge Deller, linux-kernel@vger.kernel.org, lkft-triage@lists.linaro.org, dri-devel@lists.freedesktop.org, Naresh Kamboju Christophe Leroy <christophe.leroy@csgroup.eu> writes: > Le 04/03/2024 à 11:32, Thomas Zimmermann a écrit : >> Hi >> >> Am 04.03.24 um 10:55 schrieb Jani Nikula: >>> Removal of the backlight include from fb.h uncovered an implicit >>> dependency in powerpc asm/backlight.h. Add the explicit include. >>> >>> Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org> >>> Closes: >>> https://lore.kernel.org/r/CA+G9fYsAk5TbqqxFC2W4oHLGA0CbTHMxbeq8QayFXTU75YiueA@mail.gmail.com >>> Fixes: 11b4eedfc87d ("fbdev: Do not include <linux/backlight.h> in >>> header") >>> Cc: Thomas Zimmermann <tzimmermann@suse.de> >>> Cc: Helge Deller <deller@gmx.de> >>> Cc: linux-fbdev@vger.kernel.org >>> Signed-off-by: Jani Nikula <jani.nikula@intel.com> >>> >>> --- >>> >>> Not even compile tested! >> >> That's one of the cases that's hard to catch unless you get the config >> right. >> >>> --- >>> arch/powerpc/include/asm/backlight.h | 1 + >>> 1 file changed, 1 insertion(+) >>> >>> diff --git a/arch/powerpc/include/asm/backlight.h >>> b/arch/powerpc/include/asm/backlight.h >>> index 1b5eab62ed04..275d5bb9aa04 100644 >>> --- a/arch/powerpc/include/asm/backlight.h >>> +++ b/arch/powerpc/include/asm/backlight.h >>> @@ -10,6 +10,7 @@ >>> #define __ASM_POWERPC_BACKLIGHT_H >>> #ifdef __KERNEL__ >>> +#include <linux/backlight.h> >> >> Thanks, but I think this should go directly into chipsfb.c. I would have >> provided a patch already, if our mail server didn't have issues this >> morning. Let me try again. > > asm/backlight.h needs it for struct backlight_device > > At least if you don't want to include linux/backlight.h in > asm/backlight.h, then you need a forward declaration of struct > backlight_device; It's preferable for asm headers not to include linux headers (to avoid loops), so a forward declaration would be better IMHO. cheers ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] powerpc: include linux/backlight.h from asm/backlight.h 2024-03-05 0:36 ` Michael Ellerman @ 2024-03-05 8:09 ` Thomas Zimmermann 0 siblings, 0 replies; 11+ messages in thread From: Thomas Zimmermann @ 2024-03-05 8:09 UTC (permalink / raw) To: Michael Ellerman, Christophe Leroy, Jani Nikula, linuxppc-dev@lists.ozlabs.org Cc: linux-fbdev@vger.kernel.org, Helge Deller, linux-kernel@vger.kernel.org, lkft-triage@lists.linaro.org, dri-devel@lists.freedesktop.org, Naresh Kamboju Hi Am 05.03.24 um 01:36 schrieb Michael Ellerman: > Christophe Leroy <christophe.leroy@csgroup.eu> writes: >> Le 04/03/2024 à 11:32, Thomas Zimmermann a écrit : >>> Hi >>> >>> Am 04.03.24 um 10:55 schrieb Jani Nikula: >>>> Removal of the backlight include from fb.h uncovered an implicit >>>> dependency in powerpc asm/backlight.h. Add the explicit include. >>>> >>>> Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org> >>>> Closes: >>>> https://lore.kernel.org/r/CA+G9fYsAk5TbqqxFC2W4oHLGA0CbTHMxbeq8QayFXTU75YiueA@mail.gmail.com >>>> Fixes: 11b4eedfc87d ("fbdev: Do not include <linux/backlight.h> in >>>> header") >>>> Cc: Thomas Zimmermann <tzimmermann@suse.de> >>>> Cc: Helge Deller <deller@gmx.de> >>>> Cc: linux-fbdev@vger.kernel.org >>>> Signed-off-by: Jani Nikula <jani.nikula@intel.com> >>>> >>>> --- >>>> >>>> Not even compile tested! >>> That's one of the cases that's hard to catch unless you get the config >>> right. >>> >>>> --- >>>> arch/powerpc/include/asm/backlight.h | 1 + >>>> 1 file changed, 1 insertion(+) >>>> >>>> diff --git a/arch/powerpc/include/asm/backlight.h >>>> b/arch/powerpc/include/asm/backlight.h >>>> index 1b5eab62ed04..275d5bb9aa04 100644 >>>> --- a/arch/powerpc/include/asm/backlight.h >>>> +++ b/arch/powerpc/include/asm/backlight.h >>>> @@ -10,6 +10,7 @@ >>>> #define __ASM_POWERPC_BACKLIGHT_H >>>> #ifdef __KERNEL__ >>>> +#include <linux/backlight.h> >>> Thanks, but I think this should go directly into chipsfb.c. I would have >>> provided a patch already, if our mail server didn't have issues this >>> morning. Let me try again. >> asm/backlight.h needs it for struct backlight_device >> >> At least if you don't want to include linux/backlight.h in >> asm/backlight.h, then you need a forward declaration of struct >> backlight_device; > It's preferable for asm headers not to include linux headers (to avoid > loops), so a forward declaration would be better IMHO. The asm header shouldn't include <linux/fb.h> either. I'll send an update to my patch to clean up everything. Best regards Thomas > > cheers -- -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Frankenstrasse 146, 90461 Nuernberg, Germany GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman HRB 36809 (AG Nuernberg) ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2024-03-05 8:19 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-03-04 8:20 fbdev/chipsfb.c:401:31: error: invalid use of undefined type 'struct backlight_device' Naresh Kamboju 2024-03-04 9:55 ` [PATCH] powerpc: include linux/backlight.h from asm/backlight.h Jani Nikula 2024-03-04 10:01 ` Jani Nikula 2024-03-04 14:55 ` Naresh Kamboju 2024-03-05 0:39 ` Michael Ellerman 2024-03-05 8:19 ` Jani Nikula 2024-03-04 10:32 ` Thomas Zimmermann 2024-03-04 10:40 ` Thomas Zimmermann 2024-03-04 18:13 ` Christophe Leroy 2024-03-05 0:36 ` Michael Ellerman 2024-03-05 8:09 ` Thomas Zimmermann
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).