Linux Power Management development
 help / color / mirror / Atom feed
* [amd-pstate:superm1/backlight-property-v4 3/9] drivers/gpu/drm/drm_backlight.c:101:62: error: passing 'const char *const[2]' to parameter of type 'char **' discards qualifiers in nested pointer types
@ 2026-05-28 13:56 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-05-28 13:56 UTC (permalink / raw)
  To: Mario Limonciello (AMD); +Cc: llvm, oe-kbuild-all, linux-pm

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/superm1/linux.git superm1/backlight-property-v4
head:   d6dda4e35a589d00e7be9db8c45aef13547401f2
commit: 838d0906592749f46424cbf58eb20a85a95efd27 [3/9] drm: link connectors to backlight devices
config: x86_64-rhel-9.4-rust (https://download.01.org/0day-ci/archive/20260528/202605281543.JSTIO0Te-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
rustc: rustc 1.88.0 (6b00bc388 2025-06-23)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260528/202605281543.JSTIO0Te-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202605281543.JSTIO0Te-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/gpu/drm/drm_backlight.c:101:62: error: passing 'const char *const[2]' to parameter of type 'char **' discards qualifiers in nested pointer types [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
     101 |                 kobject_uevent_env(&b->connector->kdev->kobj, KOBJ_CHANGE, ep);
         |                                                                            ^~
   include/linux/kobject.h:216:10: note: passing argument to parameter 'envp' here
     216 |                         char *envp[]);
         |                               ^
   drivers/gpu/drm/drm_backlight.c:321:5: error: no member named 'luminance_clients' in 'struct drm_backlight'
     321 |         b->luminance_clients++;
         |         ~  ^
   drivers/gpu/drm/drm_backlight.c:323:24: error: no member named 'drm_takeover' in 'struct backlight_device'
     323 |                 atomic_inc(&b->link->drm_takeover);
         |                             ~~~~~~~  ^
   drivers/gpu/drm/drm_backlight.c:315:6: warning: no previous prototype for function 'drm_backlight_inhibit_legacy' [-Wmissing-prototypes]
     315 | void drm_backlight_inhibit_legacy(struct drm_backlight *b)
         |      ^
   drivers/gpu/drm/drm_backlight.c:315:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     315 | void drm_backlight_inhibit_legacy(struct drm_backlight *b)
         | ^
         | static 
   drivers/gpu/drm/drm_backlight.c:340:17: error: no member named 'luminance_clients' in 'struct drm_backlight'
     340 |         if (WARN_ON(b->luminance_clients == 0))
         |                     ~  ^
   include/asm-generic/bug.h:110:25: note: expanded from macro 'WARN_ON'
     110 |         int __ret_warn_on = !!(condition);                              \
         |                                ^~~~~~~~~
   drivers/gpu/drm/drm_backlight.c:342:5: error: no member named 'luminance_clients' in 'struct drm_backlight'
     342 |         b->luminance_clients--;
         |         ~  ^
   drivers/gpu/drm/drm_backlight.c:344:24: error: no member named 'drm_takeover' in 'struct backlight_device'
     344 |                 atomic_dec(&b->link->drm_takeover);
         |                             ~~~~~~~  ^
   drivers/gpu/drm/drm_backlight.c:334:6: warning: no previous prototype for function 'drm_backlight_uninhibit_legacy' [-Wmissing-prototypes]
     334 | void drm_backlight_uninhibit_legacy(struct drm_backlight *b)
         |      ^
   drivers/gpu/drm/drm_backlight.c:334:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     334 | void drm_backlight_uninhibit_legacy(struct drm_backlight *b)
         | ^
         | static 
   drivers/gpu/drm/drm_backlight.c:356:6: warning: no previous prototype for function 'drm_backlight_inhibit_legacy_all' [-Wmissing-prototypes]
     356 | void drm_backlight_inhibit_legacy_all(struct drm_device *dev)
         |      ^
   drivers/gpu/drm/drm_backlight.c:356:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     356 | void drm_backlight_inhibit_legacy_all(struct drm_device *dev)
         | ^
         | static 
   drivers/gpu/drm/drm_backlight.c:372:6: warning: no previous prototype for function 'drm_backlight_uninhibit_legacy_all' [-Wmissing-prototypes]
     372 | void drm_backlight_uninhibit_legacy_all(struct drm_device *dev)
         |      ^
   drivers/gpu/drm/drm_backlight.c:372:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     372 | void drm_backlight_uninhibit_legacy_all(struct drm_device *dev)
         | ^
         | static 
   4 warnings and 6 errors generated.


vim +101 drivers/gpu/drm/drm_backlight.c

    74	
    75	static void __drm_backlight_worker(struct work_struct *w)
    76	{
    77		struct drm_backlight *b = container_of(w, struct drm_backlight, work);
    78		static const char * const ep[] = { "BACKLIGHT=1", NULL };
    79		struct backlight_device *bd;
    80		bool send_uevent;
    81		unsigned int v;
    82	
    83		scoped_guard(spinlock, &drm_backlight_lock) {
    84			send_uevent = b->changed;
    85			b->changed = false;
    86			v = b->set_value;
    87			bd = b->link;
    88			backlight_device_ref(bd);
    89		}
    90	
    91		if (bd) {
    92			int rc = backlight_set_brightness(bd, v, BACKLIGHT_UPDATE_DRM);
    93	
    94			WARN_ON(rc);
    95			if (rc)
    96				backlight_set_brightness(bd, U16_MAX, BACKLIGHT_UPDATE_DRM);
    97			backlight_device_unref(bd);
    98		}
    99	
   100		if (send_uevent)
 > 101			kobject_uevent_env(&b->connector->kdev->kobj, KOBJ_CHANGE, ep);
   102	}
   103	

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-05-28 13:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-28 13:56 [amd-pstate:superm1/backlight-property-v4 3/9] drivers/gpu/drm/drm_backlight.c:101:62: error: passing 'const char *const[2]' to parameter of type 'char **' discards qualifiers in nested pointer types kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox