Re: [PATCH 4/4] backlight: ktz8866: add definitions to make it more readable
From: kernel test robot
Date: Tue Apr 08 2025 - 01:21:48 EST
Hi Pengyu,
kernel test robot noticed the following build errors:
[auto build test ERROR on lee-backlight/for-backlight-next]
[also build test ERROR on lee-leds/for-leds-next lee-backlight/for-backlight-fixes linus/master v6.15-rc1 next-20250407]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Pengyu-Luo/dt-bindings-backlight-kinetic-ktz8866-add-ktz8866-slave-compatible/20250407-175635
base: https://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight.git for-backlight-next
patch link: https://lore.kernel.org/r/20250407095119.588920-5-mitltlatltl%40gmail.com
patch subject: [PATCH 4/4] backlight: ktz8866: add definitions to make it more readable
config: riscv-randconfig-002-20250408 (https://download.01.org/0day-ci/archive/20250408/202504081215.rL4DExNA-lkp@xxxxxxxxx/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project 92c93f5286b9ff33f27ff694d2dc33da1c07afdd)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250408/202504081215.rL4DExNA-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202504081215.rL4DExNA-lkp@xxxxxxxxx/
All errors (new ones prefixed by >>):
drivers/video/backlight/ktz8866.c:77:32: error: incompatible pointer types passing 'unsigned int **' to parameter of type 'unsigned int *'; remove & [-Werror,-Wincompatible-pointer-types]
77 | regmap_read(ktz->regmap, reg, &val);
| ^~~~
include/linux/regmap.h:1297:69: note: passing argument to parameter 'val' here
1297 | int regmap_read(struct regmap *map, unsigned int reg, unsigned int *val);
| ^
>> drivers/video/backlight/ktz8866.c:112:66: error: expected ')'
112 | ktz8866_write(ktz, BL_BRT_LSB, FIELD_GET(LOWER_BYTE, brightness);
| ^
drivers/video/backlight/ktz8866.c:112:15: note: to match this '('
112 | ktz8866_write(ktz, BL_BRT_LSB, FIELD_GET(LOWER_BYTE, brightness);
| ^
drivers/video/backlight/ktz8866.c:113:67: error: expected ')'
113 | ktz8866_write(ktz, BL_BRT_MSB, FIELD_GET(HIGHER_BYTE, brightness);
| ^
drivers/video/backlight/ktz8866.c:113:15: note: to match this '('
113 | ktz8866_write(ktz, BL_BRT_MSB, FIELD_GET(HIGHER_BYTE, brightness);
| ^
drivers/video/backlight/ktz8866.c:136:13: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand]
136 | if (!(val && CURRENT_SINKS_MASK))
| ^ ~~~~~~~~~~~~~~~~~~
drivers/video/backlight/ktz8866.c:136:13: note: use '&' for a bitwise operation
136 | if (!(val && CURRENT_SINKS_MASK))
| ^~
| &
drivers/video/backlight/ktz8866.c:136:13: note: remove constant to silence this warning
136 | if (!(val && CURRENT_SINKS_MASK))
| ^~~~~~~~~~~~~~~~~~~~~
1 warning and 3 errors generated.
vim +112 drivers/video/backlight/ktz8866.c
97
98 static int ktz8866_backlight_update_status(struct backlight_device *backlight_dev)
99 {
100 struct ktz8866 *ktz = bl_get_data(backlight_dev);
101 unsigned int brightness = backlight_get_brightness(backlight_dev);
102
103 if (!ktz->led_on && brightness > 0) {
104 ktz8866_update_bits(ktz, BL_EN, BL_EN_BIT, BL_EN_BIT);
105 ktz->led_on = true;
106 } else if (brightness == 0) {
107 ktz8866_update_bits(ktz, BL_EN, BL_EN_BIT, 0);
108 ktz->led_on = false;
109 }
110
111 /* Set brightness */
> 112 ktz8866_write(ktz, BL_BRT_LSB, FIELD_GET(LOWER_BYTE, brightness);
113 ktz8866_write(ktz, BL_BRT_MSB, FIELD_GET(HIGHER_BYTE, brightness);
114
115 return 0;
116 }
117
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki