lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+G9fYtQobCEno5oRgqPzhHrjff4zMki=9fWwJ1NPtKeKQ+aUg@mail.gmail.com>
Date: Mon, 4 Mar 2024 20:25:38 +0530
From: Naresh Kamboju <naresh.kamboju@...aro.org>
To: Jani Nikula <jani.nikula@...el.com>
Cc: Michael Ellerman <mpe@...erman.id.au>, linuxppc-dev@...ts.ozlabs.org, 
	dri-devel@...ts.freedesktop.org, lkft-triage@...ts.linaro.org, 
	linux-kernel@...r.kernel.org, Thomas Zimmermann <tzimmermann@...e.de>, 
	Helge Deller <deller@....de>, linux-fbdev@...r.kernel.org, 
	Uwe Kleine-König <u.kleine-koenig@...gutronix.de>, 
	Benjamin Herrenschmidt <benh@...nel.crashing.org>
Subject: Re: [PATCH] powerpc: include linux/backlight.h from asm/backlight.h

Hi Jani and Benjamin,

On Mon, 4 Mar 2024 at 15:31, Jani Nikula <jani.nikula@...el.com> wrote:
>
> On Mon, 04 Mar 2024, Jani Nikula <jani.nikula@...el.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@...aro.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@...e.de>
> > Cc: Helge Deller <deller@....de>
> > Cc: linux-fbdev@...r.kernel.org
> > Signed-off-by: Jani Nikula <jani.nikula@...el.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@...aro.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ