CC: kbuild-all(a)lists.01.org In-Reply-To: <20210712201732.31808-3-viktor.prutyanov@phystech.edu> References: <20210712201732.31808-3-viktor.prutyanov@phystech.edu> TO: Viktor Prutyanov TO: sean(a)mess.org TO: mchehab(a)kernel.org TO: robh+dt(a)kernel.org TO: khilman(a)baylibre.com TO: narmstrong(a)baylibre.com CC: jbrunet(a)baylibre.com CC: martin.blumenstingl(a)googlemail.com CC: linux-media(a)vger.kernel.org CC: devicetree(a)vger.kernel.org CC: linux-kernel(a)vger.kernel.org Hi Viktor, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linuxtv-media/master] [also build test WARNING on v5.14-rc1 next-20210712] [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/Viktor-Prutyanov/media-rc-add-support-for-Amlogic-Meson-IR-blaster/20210713-041906 base: git://linuxtv.org/media_tree.git master :::::: branch date: 13 hours ago :::::: commit date: 13 hours ago config: sh-randconfig-s031-20210713 (attached as .config) compiler: sh4-linux-gcc (GCC) 9.3.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # apt-get install sparse # sparse version: v0.6.3-341-g8af24329-dirty # https://github.com/0day-ci/linux/commit/f74878fc5e09af1a0ea3a7e0c37badd2d3d0963f git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Viktor-Prutyanov/media-rc-add-support-for-Amlogic-Meson-IR-blaster/20210713-041906 git checkout f74878fc5e09af1a0ea3a7e0c37badd2d3d0963f # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=sh SHELL=/bin/bash drivers/media/rc/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot sparse warnings: (new ones prefixed by >>) >> drivers/media/rc/meson-ir-tx.c:235:12: sparse: sparse: context imbalance in 'meson_irtx_transmit' - different lock contexts for basic block vim +/meson_irtx_transmit +235 drivers/media/rc/meson-ir-tx.c f74878fc5e09af1a Viktor Prutyanov 2021-07-12 234 f74878fc5e09af1a Viktor Prutyanov 2021-07-12 @235 static int meson_irtx_transmit(struct rc_dev *rc, unsigned int *buf, f74878fc5e09af1a Viktor Prutyanov 2021-07-12 236 unsigned int len) f74878fc5e09af1a Viktor Prutyanov 2021-07-12 237 { f74878fc5e09af1a Viktor Prutyanov 2021-07-12 238 unsigned long flags; f74878fc5e09af1a Viktor Prutyanov 2021-07-12 239 struct meson_irtx *ir = rc->priv; f74878fc5e09af1a Viktor Prutyanov 2021-07-12 240 f74878fc5e09af1a Viktor Prutyanov 2021-07-12 241 if (!meson_irtx_check_buf(ir, buf, len)) f74878fc5e09af1a Viktor Prutyanov 2021-07-12 242 return -EINVAL; f74878fc5e09af1a Viktor Prutyanov 2021-07-12 243 f74878fc5e09af1a Viktor Prutyanov 2021-07-12 244 spin_lock_irqsave(&ir->lock, flags); f74878fc5e09af1a Viktor Prutyanov 2021-07-12 245 ir->buf = kmalloc_array(len, sizeof(u32), GFP_KERNEL); f74878fc5e09af1a Viktor Prutyanov 2021-07-12 246 if (!ir->buf) f74878fc5e09af1a Viktor Prutyanov 2021-07-12 247 return -ENOMEM; f74878fc5e09af1a Viktor Prutyanov 2021-07-12 248 f74878fc5e09af1a Viktor Prutyanov 2021-07-12 249 ir->buf_len = len; f74878fc5e09af1a Viktor Prutyanov 2021-07-12 250 ir->buf_head = 0; f74878fc5e09af1a Viktor Prutyanov 2021-07-12 251 meson_irtx_fill_buf(ir, buf); f74878fc5e09af1a Viktor Prutyanov 2021-07-12 252 spin_unlock_irqrestore(&ir->lock, flags); f74878fc5e09af1a Viktor Prutyanov 2021-07-12 253 f74878fc5e09af1a Viktor Prutyanov 2021-07-12 254 reinit_completion(&ir->completion); f74878fc5e09af1a Viktor Prutyanov 2021-07-12 255 dev_dbg(ir->dev, "tx started, buffer length = %u\n", ir->buf_len); f74878fc5e09af1a Viktor Prutyanov 2021-07-12 256 f74878fc5e09af1a Viktor Prutyanov 2021-07-12 257 spin_lock_irqsave(&ir->lock, flags); f74878fc5e09af1a Viktor Prutyanov 2021-07-12 258 meson_irtx_send_buffer(ir); f74878fc5e09af1a Viktor Prutyanov 2021-07-12 259 spin_unlock_irqrestore(&ir->lock, flags); f74878fc5e09af1a Viktor Prutyanov 2021-07-12 260 f74878fc5e09af1a Viktor Prutyanov 2021-07-12 261 wait_for_completion_interruptible(&ir->completion); f74878fc5e09af1a Viktor Prutyanov 2021-07-12 262 dev_dbg(ir->dev, "tx completed\n"); f74878fc5e09af1a Viktor Prutyanov 2021-07-12 263 f74878fc5e09af1a Viktor Prutyanov 2021-07-12 264 spin_lock_irqsave(&ir->lock, flags); f74878fc5e09af1a Viktor Prutyanov 2021-07-12 265 kfree(ir->buf); f74878fc5e09af1a Viktor Prutyanov 2021-07-12 266 ir->buf = NULL; f74878fc5e09af1a Viktor Prutyanov 2021-07-12 267 ir->buf_len = 0; f74878fc5e09af1a Viktor Prutyanov 2021-07-12 268 spin_unlock_irqrestore(&ir->lock, flags); f74878fc5e09af1a Viktor Prutyanov 2021-07-12 269 f74878fc5e09af1a Viktor Prutyanov 2021-07-12 270 return len; f74878fc5e09af1a Viktor Prutyanov 2021-07-12 271 } f74878fc5e09af1a Viktor Prutyanov 2021-07-12 272 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org