Re: [PATCH 2/2] leds: sunxi: New driver for the R329/D1 LED controller

From: kernel test robot
Date: Fri Sep 03 2021 - 06:07:48 EST


Hi Samuel,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on pavel-linux-leds/for-next]
[also build test ERROR on next-20210903]
[cannot apply to robh/for-next sunxi/sunxi/for-next v5.14]
[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]

url: https://github.com/0day-ci/linux/commits/Samuel-Holland/dt-bindings-leds-Add-Allwinner-R329-D1-LED-controller/20210903-074537
base: git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds.git for-next
config: alpha-randconfig-r005-20210903 (attached as .config)
compiler: alpha-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/5f2d46e769847b3716683bc93cf7568f7e994044
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Samuel-Holland/dt-bindings-leds-Add-Allwinner-R329-D1-LED-controller/20210903-074537
git checkout 5f2d46e769847b3716683bc93cf7568f7e994044
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=alpha

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

drivers/leds/leds-sunxi.c: In function 'sunxi_ledc_pio_xfer':
>> drivers/leds/leds-sunxi.c:125:9: error: implicit declaration of function 'writesl'; did you mean 'writel'? [-Werror=implicit-function-declaration]
125 | writesl(priv->base + LEDC_DATA_REG, priv->buffer + offset, burst);
| ^~~~~~~
| writel
drivers/leds/leds-sunxi.c: At top level:
drivers/leds/leds-sunxi.c:528:5: warning: no previous prototype for 'sunxi_ledc_remove' [-Wmissing-prototypes]
528 | int sunxi_ledc_remove(struct platform_device *pdev)
| ^~~~~~~~~~~~~~~~~
drivers/leds/leds-sunxi.c:535:6: warning: no previous prototype for 'sunxi_ledc_shutdown' [-Wmissing-prototypes]
535 | void sunxi_ledc_shutdown(struct platform_device *pdev)
| ^~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors


vim +125 drivers/leds/leds-sunxi.c

109
110 static void sunxi_ledc_pio_xfer(struct sunxi_ledc *priv, int length)
111 {
112 u32 burst, offset, val;
113
114 if (length) {
115 /* New transfer (FIFO is empty). */
116 offset = 0;
117 burst = min(length, LEDC_FIFO_DEPTH);
118 } else {
119 /* Existing transfer (FIFO is half-full). */
120 length = priv->pio_length;
121 offset = priv->pio_offset;
122 burst = min(length, LEDC_FIFO_DEPTH / 2);
123 }
124
> 125 writesl(priv->base + LEDC_DATA_REG, priv->buffer + offset, burst);
126
127 if (burst < length) {
128 priv->pio_length = length - burst;
129 priv->pio_offset = offset + burst;
130
131 if (!offset) {
132 val = readl(priv->base + LEDC_INT_CTRL_REG);
133 val |= LEDC_INT_CTRL_REG_FIFO_CPUREQ_INT_EN;
134 writel(val, priv->base + LEDC_INT_CTRL_REG);
135 }
136 } else {
137 /* Disable the request IRQ once all data is written. */
138 val = readl(priv->base + LEDC_INT_CTRL_REG);
139 val &= ~LEDC_INT_CTRL_REG_FIFO_CPUREQ_INT_EN;
140 writel(val, priv->base + LEDC_INT_CTRL_REG);
141 }
142 }
143

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip