Re: [PATCH v5 5/5] [media] allegro: add SPS/PPS nal unit writer (fwd)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On line 259, bit it unsigned, so it can't be less than 0.

julia

---------- Forwarded message ----------
Date: Sat, 4 May 2019 19:44:30 +0800
From: kbuild test robot <lkp@xxxxxxxxx>
To: kbuild@xxxxxx
Cc: Julia Lawall <julia.lawall@xxxxxxx>
Subject: Re: [PATCH v5 5/5] [media] allegro: add SPS/PPS nal unit writer

CC: kbuild-all@xxxxxx
In-Reply-To: <20190503122010.16663-6-m.tretter@xxxxxxxxxxxxxx>
References: <20190503122010.16663-6-m.tretter@xxxxxxxxxxxxxx>
TO: Michael Tretter <m.tretter@xxxxxxxxxxxxxx>
CC: linux-media@xxxxxxxxxxxxxxx, devicetree@xxxxxxxxxxxxxxx
CC: kernel@xxxxxxxxxxxxxx, robh+dt@xxxxxxxxxx, mchehab@xxxxxxxxxx, tfiga@xxxxxxxxxxxx, dshah@xxxxxxxxxx, hverkuil@xxxxxxxxx, Michael Tretter <m.tretter@xxxxxxxxxxxxxx>

Hi Michael,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linuxtv-media/master]
[also build test WARNING on v5.1-rc7 next-20190503]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Michael-Tretter/Add-ZynqMP-VCU-Allegro-DVT-H-264-encoder-driver/20190504-161958
base:   git://linuxtv.org/media_tree.git master
:::::: branch date: 3 hours ago
:::::: commit date: 3 hours ago

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>
Reported-by: Julia Lawall <julia.lawall@xxxxxxx>

>> drivers/media/platform/allegro-dvt/nal-h264.c:259:6-9: WARNING: Unsigned expression compared with zero: bit < 0

# https://github.com/0day-ci/linux/commit/eba69588199f08008a1fb4ad24e1f3e66d0080e3
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout eba69588199f08008a1fb4ad24e1f3e66d0080e3
vim +259 drivers/media/platform/allegro-dvt/nal-h264.c

eba69588 Michael Tretter 2019-05-03  247
eba69588 Michael Tretter 2019-05-03  248  static inline int rbsp_read_bits(struct rbsp *rbsp, int n, unsigned int *value)
eba69588 Michael Tretter 2019-05-03  249  {
eba69588 Michael Tretter 2019-05-03  250  	int i;
eba69588 Michael Tretter 2019-05-03  251  	unsigned int bit;
eba69588 Michael Tretter 2019-05-03  252  	unsigned int tmp = 0;
eba69588 Michael Tretter 2019-05-03  253
eba69588 Michael Tretter 2019-05-03  254  	if (n > 8 * sizeof(*value))
eba69588 Michael Tretter 2019-05-03  255  		return -EINVAL;
eba69588 Michael Tretter 2019-05-03  256
eba69588 Michael Tretter 2019-05-03  257  	for (i = n; i > 0; i--) {
eba69588 Michael Tretter 2019-05-03  258  		bit = rbsp_read_bit(rbsp);
eba69588 Michael Tretter 2019-05-03 @259  		if (bit < 0)
eba69588 Michael Tretter 2019-05-03  260  			return bit;
eba69588 Michael Tretter 2019-05-03  261  		tmp |= bit << (i - 1);
eba69588 Michael Tretter 2019-05-03  262  	}
eba69588 Michael Tretter 2019-05-03  263
eba69588 Michael Tretter 2019-05-03  264  	if (value)
eba69588 Michael Tretter 2019-05-03  265  		*value = tmp;
eba69588 Michael Tretter 2019-05-03  266
eba69588 Michael Tretter 2019-05-03  267  	return 0;
eba69588 Michael Tretter 2019-05-03  268  }
eba69588 Michael Tretter 2019-05-03  269

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux