From: kernel test robot <lkp@intel.com>
To: "Maíra Canal" <maira.canal@usp.br>,
lee.jones@linaro.org, daniel.thompson@linaro.org,
jingoohan1@gmail.com, thierry.reding@gmail.com
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
u.kleine-koenig@pengutronix.de, dri-devel@lists.freedesktop.org,
linux-fbdev@vger.kernel.org, linux-pwm@vger.kernel.org
Subject: Re: [PATCH] backlight: lp855x: Switch to atomic PWM API
Date: Wed, 27 Oct 2021 05:33:20 +0800 [thread overview]
Message-ID: <202110270501.kw1IHnec-lkp@intel.com> (raw)
In-Reply-To: <YXQStu5yv4bwj2Tn@fedora>
[-- Attachment #1: Type: text/plain, Size: 9396 bytes --]
Hi "Maíra,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on lee-backlight/for-backlight-next]
[also build test ERROR on v5.15-rc7 next-20211026]
[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/Ma-ra-Canal/backlight-lp855x-Switch-to-atomic-PWM-API/20211024-103835
base: https://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight.git for-backlight-next
config: riscv-buildonly-randconfig-r005-20211026 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project e5fb79b31424267704e9d2d9674089fd7316453e)
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
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://github.com/0day-ci/linux/commit/f79ab2c306d1c5d666df34f3062f9f1a0b8e4448
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Ma-ra-Canal/backlight-lp855x-Switch-to-atomic-PWM-API/20211024-103835
git checkout f79ab2c306d1c5d666df34f3062f9f1a0b8e4448
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
In file included from drivers/video/backlight/lp855x_bl.c:10:
In file included from include/linux/i2c.h:18:
In file included from include/linux/regulator/consumer.h:35:
In file included from include/linux/suspend.h:5:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:13:
In file included from include/linux/cgroup.h:26:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:136:
include/asm-generic/io.h:464:31: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
val = __raw_readb(PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:477:61: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:36:51: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
^
In file included from drivers/video/backlight/lp855x_bl.c:10:
In file included from include/linux/i2c.h:18:
In file included from include/linux/regulator/consumer.h:35:
In file included from include/linux/suspend.h:5:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:13:
In file included from include/linux/cgroup.h:26:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:136:
include/asm-generic/io.h:490:61: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:34:51: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
^
In file included from drivers/video/backlight/lp855x_bl.c:10:
In file included from include/linux/i2c.h:18:
In file included from include/linux/regulator/consumer.h:35:
In file included from include/linux/suspend.h:5:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:13:
In file included from include/linux/cgroup.h:26:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:136:
include/asm-generic/io.h:501:33: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:511:59: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:521:59: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:1024:55: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port;
~~~~~~~~~~ ^
>> drivers/video/backlight/lp855x_bl.c:242:6: error: variable 'pwm' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
if (!lp->pwm) {
^~~~~~~~
drivers/video/backlight/lp855x_bl.c:260:18: note: uninitialized use occurs here
pwm_apply_state(pwm, &state);
^~~
drivers/video/backlight/lp855x_bl.c:242:2: note: remove the 'if' if its condition is always true
if (!lp->pwm) {
^~~~~~~~~~~~~~
drivers/video/backlight/lp855x_bl.c:238:24: note: initialize the variable 'pwm' to silence this warning
struct pwm_device *pwm;
^
= NULL
8 errors generated.
vim +242 drivers/video/backlight/lp855x_bl.c
7be865ab8634d4e Kim, Milo 2012-03-23 233
8cc9764c9c7d01a Kim, Milo 2012-12-17 234 static void lp855x_pwm_ctrl(struct lp855x *lp, int br, int max_br)
8cc9764c9c7d01a Kim, Milo 2012-12-17 235 {
8cc9764c9c7d01a Kim, Milo 2012-12-17 236 unsigned int period = lp->pdata->period_ns;
8cc9764c9c7d01a Kim, Milo 2012-12-17 237 unsigned int duty = br * period / max_br;
8cc9764c9c7d01a Kim, Milo 2012-12-17 238 struct pwm_device *pwm;
f79ab2c306d1c5d Maíra Canal 2021-10-23 239 struct pwm_state state;
8cc9764c9c7d01a Kim, Milo 2012-12-17 240
8cc9764c9c7d01a Kim, Milo 2012-12-17 241 /* request pwm device with the consumer name */
8cc9764c9c7d01a Kim, Milo 2012-12-17 @242 if (!lp->pwm) {
8cc9764c9c7d01a Kim, Milo 2012-12-17 243 pwm = devm_pwm_get(lp->dev, lp->chipname);
8cc9764c9c7d01a Kim, Milo 2012-12-17 244 if (IS_ERR(pwm))
8cc9764c9c7d01a Kim, Milo 2012-12-17 245 return;
8cc9764c9c7d01a Kim, Milo 2012-12-17 246
8cc9764c9c7d01a Kim, Milo 2012-12-17 247 lp->pwm = pwm;
8cc9764c9c7d01a Kim, Milo 2012-12-17 248 }
8cc9764c9c7d01a Kim, Milo 2012-12-17 249
f79ab2c306d1c5d Maíra Canal 2021-10-23 250 pwm_init_state(pwm, &state);
f79ab2c306d1c5d Maíra Canal 2021-10-23 251
f79ab2c306d1c5d Maíra Canal 2021-10-23 252 state.duty_cycle = duty;
f79ab2c306d1c5d Maíra Canal 2021-10-23 253 state.period = period;
f79ab2c306d1c5d Maíra Canal 2021-10-23 254
8cc9764c9c7d01a Kim, Milo 2012-12-17 255 if (duty)
f79ab2c306d1c5d Maíra Canal 2021-10-23 256 state.enabled = true;
8cc9764c9c7d01a Kim, Milo 2012-12-17 257 else
f79ab2c306d1c5d Maíra Canal 2021-10-23 258 state.enabled = false;
f79ab2c306d1c5d Maíra Canal 2021-10-23 259
f79ab2c306d1c5d Maíra Canal 2021-10-23 260 pwm_apply_state(pwm, &state);
8cc9764c9c7d01a Kim, Milo 2012-12-17 261 }
8cc9764c9c7d01a Kim, Milo 2012-12-17 262
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 33917 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH] backlight: lp855x: Switch to atomic PWM API
Date: Wed, 27 Oct 2021 05:33:20 +0800 [thread overview]
Message-ID: <202110270501.kw1IHnec-lkp@intel.com> (raw)
In-Reply-To: <YXQStu5yv4bwj2Tn@fedora>
[-- Attachment #1: Type: text/plain, Size: 9564 bytes --]
Hi "Maíra,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on lee-backlight/for-backlight-next]
[also build test ERROR on v5.15-rc7 next-20211026]
[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/Ma-ra-Canal/backlight-lp855x-Switch-to-atomic-PWM-API/20211024-103835
base: https://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight.git for-backlight-next
config: riscv-buildonly-randconfig-r005-20211026 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project e5fb79b31424267704e9d2d9674089fd7316453e)
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
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://github.com/0day-ci/linux/commit/f79ab2c306d1c5d666df34f3062f9f1a0b8e4448
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Ma-ra-Canal/backlight-lp855x-Switch-to-atomic-PWM-API/20211024-103835
git checkout f79ab2c306d1c5d666df34f3062f9f1a0b8e4448
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
In file included from drivers/video/backlight/lp855x_bl.c:10:
In file included from include/linux/i2c.h:18:
In file included from include/linux/regulator/consumer.h:35:
In file included from include/linux/suspend.h:5:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:13:
In file included from include/linux/cgroup.h:26:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:136:
include/asm-generic/io.h:464:31: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
val = __raw_readb(PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:477:61: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:36:51: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
^
In file included from drivers/video/backlight/lp855x_bl.c:10:
In file included from include/linux/i2c.h:18:
In file included from include/linux/regulator/consumer.h:35:
In file included from include/linux/suspend.h:5:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:13:
In file included from include/linux/cgroup.h:26:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:136:
include/asm-generic/io.h:490:61: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:34:51: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
^
In file included from drivers/video/backlight/lp855x_bl.c:10:
In file included from include/linux/i2c.h:18:
In file included from include/linux/regulator/consumer.h:35:
In file included from include/linux/suspend.h:5:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:13:
In file included from include/linux/cgroup.h:26:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:136:
include/asm-generic/io.h:501:33: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:511:59: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:521:59: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:1024:55: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port;
~~~~~~~~~~ ^
>> drivers/video/backlight/lp855x_bl.c:242:6: error: variable 'pwm' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
if (!lp->pwm) {
^~~~~~~~
drivers/video/backlight/lp855x_bl.c:260:18: note: uninitialized use occurs here
pwm_apply_state(pwm, &state);
^~~
drivers/video/backlight/lp855x_bl.c:242:2: note: remove the 'if' if its condition is always true
if (!lp->pwm) {
^~~~~~~~~~~~~~
drivers/video/backlight/lp855x_bl.c:238:24: note: initialize the variable 'pwm' to silence this warning
struct pwm_device *pwm;
^
= NULL
8 errors generated.
vim +242 drivers/video/backlight/lp855x_bl.c
7be865ab8634d4e Kim, Milo 2012-03-23 233
8cc9764c9c7d01a Kim, Milo 2012-12-17 234 static void lp855x_pwm_ctrl(struct lp855x *lp, int br, int max_br)
8cc9764c9c7d01a Kim, Milo 2012-12-17 235 {
8cc9764c9c7d01a Kim, Milo 2012-12-17 236 unsigned int period = lp->pdata->period_ns;
8cc9764c9c7d01a Kim, Milo 2012-12-17 237 unsigned int duty = br * period / max_br;
8cc9764c9c7d01a Kim, Milo 2012-12-17 238 struct pwm_device *pwm;
f79ab2c306d1c5d Maíra Canal 2021-10-23 239 struct pwm_state state;
8cc9764c9c7d01a Kim, Milo 2012-12-17 240
8cc9764c9c7d01a Kim, Milo 2012-12-17 241 /* request pwm device with the consumer name */
8cc9764c9c7d01a Kim, Milo 2012-12-17 @242 if (!lp->pwm) {
8cc9764c9c7d01a Kim, Milo 2012-12-17 243 pwm = devm_pwm_get(lp->dev, lp->chipname);
8cc9764c9c7d01a Kim, Milo 2012-12-17 244 if (IS_ERR(pwm))
8cc9764c9c7d01a Kim, Milo 2012-12-17 245 return;
8cc9764c9c7d01a Kim, Milo 2012-12-17 246
8cc9764c9c7d01a Kim, Milo 2012-12-17 247 lp->pwm = pwm;
8cc9764c9c7d01a Kim, Milo 2012-12-17 248 }
8cc9764c9c7d01a Kim, Milo 2012-12-17 249
f79ab2c306d1c5d Maíra Canal 2021-10-23 250 pwm_init_state(pwm, &state);
f79ab2c306d1c5d Maíra Canal 2021-10-23 251
f79ab2c306d1c5d Maíra Canal 2021-10-23 252 state.duty_cycle = duty;
f79ab2c306d1c5d Maíra Canal 2021-10-23 253 state.period = period;
f79ab2c306d1c5d Maíra Canal 2021-10-23 254
8cc9764c9c7d01a Kim, Milo 2012-12-17 255 if (duty)
f79ab2c306d1c5d Maíra Canal 2021-10-23 256 state.enabled = true;
8cc9764c9c7d01a Kim, Milo 2012-12-17 257 else
f79ab2c306d1c5d Maíra Canal 2021-10-23 258 state.enabled = false;
f79ab2c306d1c5d Maíra Canal 2021-10-23 259
f79ab2c306d1c5d Maíra Canal 2021-10-23 260 pwm_apply_state(pwm, &state);
8cc9764c9c7d01a Kim, Milo 2012-12-17 261 }
8cc9764c9c7d01a Kim, Milo 2012-12-17 262
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 33917 bytes --]
next prev parent reply other threads:[~2021-10-26 21:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-23 13:48 [PATCH] backlight: lp855x: Switch to atomic PWM API Maíra Canal
2021-10-26 21:33 ` kernel test robot [this message]
2021-10-26 21:33 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202110270501.kw1IHnec-lkp@intel.com \
--to=lkp@intel.com \
--cc=daniel.thompson@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jingoohan1@gmail.com \
--cc=kbuild-all@lists.01.org \
--cc=lee.jones@linaro.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=maira.canal@usp.br \
--cc=thierry.reding@gmail.com \
--cc=u.kleine-koenig@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.