[sashal-linux-stable:queue-4.4 73/103] drivers/usb/gadget/udc/bdc/bdc_core.c:300:17: warning: comparison between signed and unsigned integer expressions
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-4.4
head: 517550f651234b0e27057d8108908f58f07fa357
commit: 89b98416110c0196f7b692b367d908a5ef10df30 [73/103] bdc: Fix bug causing crash after multiple disconnects
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 7.5.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
git checkout 89b98416110c0196f7b692b367d908a5ef10df30
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-7.5.0 make.cross ARCH=m68k
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/bitops.h:18:0,
from include/linux/kernel.h:10,
from include/linux/list.h:8,
from include/linux/module.h:9,
from drivers/usb/gadget/udc/bdc/bdc_core.c:14:
arch/m68k/include/asm/bitops.h: In function 'find_first_zero_bit':
arch/m68k/include/asm/bitops.h:340:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
return res < size ? res : size;
^
arch/m68k/include/asm/bitops.h:340:26: warning: signed and unsigned type in conditional expression [-Wsign-compare]
return res < size ? res : size;
^
arch/m68k/include/asm/bitops.h: In function 'find_first_bit':
arch/m68k/include/asm/bitops.h:395:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
return res < size ? res : size;
^
arch/m68k/include/asm/bitops.h:395:26: warning: signed and unsigned type in conditional expression [-Wsign-compare]
return res < size ? res : size;
^
In file included from include/linux/nodemask.h:92:0,
from include/linux/mmzone.h:16,
from include/linux/gfp.h:5,
from include/linux/kmod.h:22,
from include/linux/module.h:13,
from drivers/usb/gadget/udc/bdc/bdc_core.c:14:
include/linux/bitmap.h: In function 'bitmap_empty':
include/linux/bitmap.h:300:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
return find_first_bit(src, nbits) == nbits;
^~
include/linux/bitmap.h: In function 'bitmap_full':
include/linux/bitmap.h:308:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
return find_first_zero_bit(src, nbits) == nbits;
^~
In file included from arch/m68k/include/asm/io_mm.h:26:0,
from arch/m68k/include/asm/io.h:4,
from include/linux/io.h:25,
from drivers/usb/gadget/udc/bdc/bdc_core.c:21:
arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsb':
arch/m68k/include/asm/raw_io.h:96:7: warning: variable '__w' set but not used [-Wunused-but-set-variable]
({u8 __w, __v = (b); u32 _addr = ((u32) (addr)); \
^
arch/m68k/include/asm/raw_io.h:412:3: note: in expansion of macro 'rom_out_8'
rom_out_8(port, *buf++);
^~~~~~~~~
arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsw':
arch/m68k/include/asm/raw_io.h:99:8: warning: variable '__w' set but not used [-Wunused-but-set-variable]
({u16 __w, __v = (w); u32 _addr = ((u32) (addr)); \
^
arch/m68k/include/asm/raw_io.h:430:3: note: in expansion of macro 'rom_out_be16'
rom_out_be16(port, *buf++);
^~~~~~~~~~~~
arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsw_swapw':
arch/m68k/include/asm/raw_io.h:103:8: warning: variable '__w' set but not used [-Wunused-but-set-variable]
({u16 __w, __v = (w); u32 _addr = ((u32) (addr)); \
^
arch/m68k/include/asm/raw_io.h:448:3: note: in expansion of macro 'rom_out_le16'
rom_out_le16(port, *buf++);
^~~~~~~~~~~~
In file included from include/uapi/linux/stddef.h:1:0,
from include/linux/stddef.h:4,
from include/uapi/linux/posix_types.h:4,
from include/uapi/linux/types.h:13,
from include/linux/types.h:5,
from include/linux/list.h:4,
from include/linux/module.h:9,
from drivers/usb/gadget/udc/bdc/bdc_core.c:14:
include/linux/scatterlist.h: In function 'sg_set_buf':
arch/m68k/include/asm/page_mm.h:171:49: warning: ordered comparison of pointer with null pointer [-Wextra]
#define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
^
include/linux/compiler.h:182:42: note: in definition of macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
include/linux/scatterlist.h:140:2: note: in expansion of macro 'BUG_ON'
BUG_ON(!virt_addr_valid(buf));
^~~~~~
include/linux/scatterlist.h:140:10: note: in expansion of macro 'virt_addr_valid'
BUG_ON(!virt_addr_valid(buf));
^~~~~~~~~~~~~~~
drivers/usb/gadget/udc/bdc/bdc_core.c: In function 'bdc_mem_init':
>> drivers/usb/gadget/udc/bdc/bdc_core.c:300:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (i = 1; i < bdc->num_eps; ++i)
^
vim +300 drivers/usb/gadget/udc/bdc/bdc_core.c
218
219 /* Initialize the HW regs and internal data structures */
220 static void bdc_mem_init(struct bdc *bdc, bool reinit)
221 {
222 u8 size = 0;
223 u32 usb2_pm;
224 u32 low32;
225 u32 upp32;
226 u32 temp;
227
228 dev_dbg(bdc->dev, "%s ()\n", __func__);
229 bdc->ep0_state = WAIT_FOR_SETUP;
230 bdc->dev_addr = 0;
231 bdc->srr.eqp_index = 0;
232 bdc->srr.dqp_index = 0;
233 bdc->zlp_needed = false;
234 bdc->delayed_status = false;
235
236 bdc_writel(bdc->regs, BDC_SPBBAL, bdc->scratchpad.sp_dma);
237 /* Init the SRR */
238 temp = BDC_SRR_RWS | BDC_SRR_RST;
239 /* Reset the SRR */
240 bdc_writel(bdc->regs, BDC_SRRINT(0), temp);
241 dev_dbg(bdc->dev, "bdc->srr.sr_bds =%p\n", bdc->srr.sr_bds);
242 temp = lower_32_bits(bdc->srr.dma_addr);
243 size = fls(NUM_SR_ENTRIES) - 2;
244 temp |= size;
245 dev_dbg(bdc->dev, "SRRBAL[0]=%08x NUM_SR_ENTRIES:%d size:%d\n",
246 temp, NUM_SR_ENTRIES, size);
247
248 low32 = lower_32_bits(temp);
249 upp32 = upper_32_bits(bdc->srr.dma_addr);
250 cpu_to_le32s(&low32);
251 cpu_to_le32s(&upp32);
252
253 /* Write the dma addresses into regs*/
254 bdc_writel(bdc->regs, BDC_SRRBAL(0), low32);
255 bdc_writel(bdc->regs, BDC_SRRBAH(0), upp32);
256
257 temp = bdc_readl(bdc->regs, BDC_SRRINT(0));
258 temp |= BDC_SRR_IE;
259 temp &= ~(BDC_SRR_RST | BDC_SRR_RWS);
260 bdc_writel(bdc->regs, BDC_SRRINT(0), temp);
261
262 /* Set the Interrupt Coalescence ~500 usec */
263 temp = bdc_readl(bdc->regs, BDC_INTCTLS(0));
264 temp &= ~0xffff;
265 temp |= INT_CLS;
266 bdc_writel(bdc->regs, BDC_INTCTLS(0), temp);
267
268 usb2_pm = bdc_readl(bdc->regs, BDC_USPPM2);
269 dev_dbg(bdc->dev, "usb2_pm=%08x", usb2_pm);
270 /* Enable hardware LPM Enable */
271 usb2_pm |= BDC_HLE;
272 bdc_writel(bdc->regs, BDC_USPPM2, usb2_pm);
273
274 /* readback for debug */
275 usb2_pm = bdc_readl(bdc->regs, BDC_USPPM2);
276 dev_dbg(bdc->dev, "usb2_pm=%08x\n", usb2_pm);
277
278 /* Disable any unwanted SR's on SRR */
279 temp = bdc_readl(bdc->regs, BDC_BDCSC);
280 /* We don't want Microframe counter wrap SR */
281 temp |= BDC_MASK_MCW;
282 bdc_writel(bdc->regs, BDC_BDCSC, temp);
283
284 /*
285 * In some error cases, driver has to reset the entire BDC controller
286 * in that case reinit is passed as 1
287 */
288 if (reinit) {
289 int i;
290 /* Enable interrupts */
291 temp = bdc_readl(bdc->regs, BDC_BDCSC);
292 temp |= BDC_GIE;
293 bdc_writel(bdc->regs, BDC_BDCSC, temp);
294 /* Init scratchpad to 0 */
295 memset(bdc->scratchpad.buff, 0, bdc->sp_buff_size);
296 /* Initialize SRR to 0 */
297 memset(bdc->srr.sr_bds, 0,
298 NUM_SR_ENTRIES * sizeof(struct bdc_bd));
299 /* clear ep flags to avoid post disconnect stops/deconfigs */
> 300 for (i = 1; i < bdc->num_eps; ++i)
301 bdc->bdc_ep_array[i]->flags = 0;
302 } else {
303 /* One time initiaization only */
304 /* Enable status report function pointers */
305 bdc->sr_handler[0] = bdc_sr_xsf;
306 bdc->sr_handler[1] = bdc_sr_uspc;
307
308 /* EP0 status report function pointers */
309 bdc->sr_xsf_ep0[0] = bdc_xsf_ep0_setup_recv;
310 bdc->sr_xsf_ep0[1] = bdc_xsf_ep0_data_start;
311 bdc->sr_xsf_ep0[2] = bdc_xsf_ep0_status_start;
312 }
313 }
314
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[drm-drm-misc:drm-misc-next 2/2] drivers/gpu/drm/bridge/tc358775.c:687 tc_probe() warn: passing zero to 'PTR_ERR'
by kernel test robot
tree: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
head: b26975593b17c2c7188b96dba6fe9fff14480538
commit: b26975593b17c2c7188b96dba6fe9fff14480538 [2/2] display/drm/bridge: TC358775 DSI/LVDS driver
config: i386-randconfig-m021-20200816 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
smatch warnings:
drivers/gpu/drm/bridge/tc358775.c:687 tc_probe() warn: passing zero to 'PTR_ERR'
vim +/PTR_ERR +687 drivers/gpu/drm/bridge/tc358775.c
648
649 static int tc_probe(struct i2c_client *client, const struct i2c_device_id *id)
650 {
651 struct device *dev = &client->dev;
652 struct drm_panel *panel;
653 struct tc_data *tc;
654 int ret;
655
656 tc = devm_kzalloc(dev, sizeof(*tc), GFP_KERNEL);
657 if (!tc)
658 return -ENOMEM;
659
660 tc->dev = dev;
661 tc->i2c = client;
662
663 ret = drm_of_find_panel_or_bridge(dev->of_node, TC358775_LVDS_OUT0,
664 0, &panel, NULL);
665 if (ret < 0)
666 return ret;
667 if (!panel)
668 return -ENODEV;
669
670 tc->panel_bridge = devm_drm_panel_bridge_add(dev, panel);
671 if (IS_ERR(tc->panel_bridge))
672 return PTR_ERR(tc->panel_bridge);
673
674 ret = tc358775_parse_dt(dev->of_node, tc);
675 if (ret)
676 return ret;
677
678 tc->vddio = devm_regulator_get(dev, "vddio-supply");
679 if (IS_ERR(tc->vddio)) {
680 ret = PTR_ERR(tc->vddio);
681 dev_err(dev, "vddio-supply not found\n");
682 return ret;
683 }
684
685 tc->vdd = devm_regulator_get(dev, "vdd-supply");
686 if (IS_ERR(tc->vdd)) {
> 687 ret = PTR_ERR(tc->vddio);
688 dev_err(dev, "vdd-supply not found\n");
689 return ret;
690 }
691
692 tc->stby_gpio = devm_gpiod_get(dev, "stby", GPIOD_OUT_HIGH);
693 if (IS_ERR(tc->stby_gpio)) {
694 ret = PTR_ERR(tc->stby_gpio);
695 dev_err(dev, "cannot get stby-gpio %d\n", ret);
696 return ret;
697 }
698
699 tc->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH);
700 if (IS_ERR(tc->reset_gpio)) {
701 ret = PTR_ERR(tc->reset_gpio);
702 dev_err(dev, "cannot get reset-gpios %d\n", ret);
703 return ret;
704 }
705
706 tc->bridge.funcs = &tc_bridge_funcs;
707 tc->bridge.of_node = dev->of_node;
708 drm_bridge_add(&tc->bridge);
709
710 i2c_set_clientdata(client, tc);
711
712 return 0;
713 }
714
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[hch-misc:nvme-pr-fix 4/5] drivers/nvme/host/core.c:1647:8: error: implicit declaration of function 'nvme_find_path'
by kernel test robot
tree: git://git.infradead.org/users/hch/misc.git nvme-pr-fix
head: d5eadfcdbeb0e4f09c22b02955b587321c6300b1
commit: b0e4e1fe3d0665fdd93e9d1f84ab52f24bb8dae8 [4/5] nvme: factor out a is_multipath_disk helper
config: x86_64-randconfig-r033-20200816 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project ab9fc8bae805c785066779e76e7846aabad5609e)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git checkout b0e4e1fe3d0665fdd93e9d1f84ab52f24bb8dae8
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
>> drivers/nvme/host/core.c:1647:8: error: implicit declaration of function 'nvme_find_path' [-Werror,-Wimplicit-function-declaration]
ns = nvme_find_path(*head);
^
>> drivers/nvme/host/core.c:1647:6: warning: incompatible integer to pointer conversion assigning to 'struct nvme_ns *' from 'int' [-Wint-conversion]
ns = nvme_find_path(*head);
^ ~~~~~~~~~~~~~~~~~~~~~
1 warning and 1 error generated.
vim +/nvme_find_path +1647 drivers/nvme/host/core.c
b0e4e1fe3d0665 Christoph Hellwig 2020-08-14 1634
32acab3181c705 Christoph Hellwig 2017-11-02 1635 /*
32acab3181c705 Christoph Hellwig 2017-11-02 1636 * Issue ioctl requests on the first available path. Note that unlike normal
32acab3181c705 Christoph Hellwig 2017-11-02 1637 * block layer requests we will not retry failed request on another controller.
32acab3181c705 Christoph Hellwig 2017-11-02 1638 */
240e6ee272c07a Keith Busch 2020-06-29 1639 struct nvme_ns *nvme_get_ns_from_disk(struct gendisk *disk,
32acab3181c705 Christoph Hellwig 2017-11-02 1640 struct nvme_ns_head **head, int *srcu_idx)
1673f1f08c8876 Christoph Hellwig 2015-11-26 1641 {
b0e4e1fe3d0665 Christoph Hellwig 2020-08-14 1642 if (is_multipath_disk(disk)) {
100c815cbd5648 Christoph Hellwig 2019-05-17 1643 struct nvme_ns *ns;
100c815cbd5648 Christoph Hellwig 2019-05-17 1644
32acab3181c705 Christoph Hellwig 2017-11-02 1645 *head = disk->private_data;
32acab3181c705 Christoph Hellwig 2017-11-02 1646 *srcu_idx = srcu_read_lock(&(*head)->srcu);
100c815cbd5648 Christoph Hellwig 2019-05-17 @1647 ns = nvme_find_path(*head);
100c815cbd5648 Christoph Hellwig 2019-05-17 1648 if (!ns)
100c815cbd5648 Christoph Hellwig 2019-05-17 1649 srcu_read_unlock(&(*head)->srcu, *srcu_idx);
100c815cbd5648 Christoph Hellwig 2019-05-17 1650 return ns;
32acab3181c705 Christoph Hellwig 2017-11-02 1651 }
b0e4e1fe3d0665 Christoph Hellwig 2020-08-14 1652
32acab3181c705 Christoph Hellwig 2017-11-02 1653 *head = NULL;
32acab3181c705 Christoph Hellwig 2017-11-02 1654 *srcu_idx = -1;
32acab3181c705 Christoph Hellwig 2017-11-02 1655 return disk->private_data;
32acab3181c705 Christoph Hellwig 2017-11-02 1656 }
1673f1f08c8876 Christoph Hellwig 2015-11-26 1657
:::::: The code at line 1647 was first introduced by commit
:::::: 100c815cbd56480b3e31518475b04719c363614a nvme: fix srcu locking on error return in nvme_get_ns_from_disk
:::::: TO: Christoph Hellwig <hch(a)lst.de>
:::::: CC: Keith Busch <keith.busch(a)intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[hch-misc:nvme-pr-fix 4/5] drivers/nvme/host/core.c:1647:8: error: implicit declaration of function 'nvme_find_path'; did you mean
by kernel test robot
tree: git://git.infradead.org/users/hch/misc.git nvme-pr-fix
head: d5eadfcdbeb0e4f09c22b02955b587321c6300b1
commit: b0e4e1fe3d0665fdd93e9d1f84ab52f24bb8dae8 [4/5] nvme: factor out a is_multipath_disk helper
config: nios2-randconfig-r001-20200816 (attached as .config)
compiler: nios2-linux-gcc (GCC) 9.3.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
git checkout b0e4e1fe3d0665fdd93e9d1f84ab52f24bb8dae8
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nios2
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
drivers/nvme/host/core.c: In function 'nvme_get_ns_from_disk':
>> drivers/nvme/host/core.c:1647:8: error: implicit declaration of function 'nvme_find_path'; did you mean 'nvme_find_get_ns'? [-Werror=implicit-function-declaration]
1647 | ns = nvme_find_path(*head);
| ^~~~~~~~~~~~~~
| nvme_find_get_ns
>> drivers/nvme/host/core.c:1647:6: warning: assignment to 'struct nvme_ns *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
1647 | ns = nvme_find_path(*head);
| ^
cc1: some warnings being treated as errors
vim +1647 drivers/nvme/host/core.c
b0e4e1fe3d0665f Christoph Hellwig 2020-08-14 1634
32acab3181c7053 Christoph Hellwig 2017-11-02 1635 /*
32acab3181c7053 Christoph Hellwig 2017-11-02 1636 * Issue ioctl requests on the first available path. Note that unlike normal
32acab3181c7053 Christoph Hellwig 2017-11-02 1637 * block layer requests we will not retry failed request on another controller.
32acab3181c7053 Christoph Hellwig 2017-11-02 1638 */
240e6ee272c07a2 Keith Busch 2020-06-29 1639 struct nvme_ns *nvme_get_ns_from_disk(struct gendisk *disk,
32acab3181c7053 Christoph Hellwig 2017-11-02 1640 struct nvme_ns_head **head, int *srcu_idx)
1673f1f08c8876f Christoph Hellwig 2015-11-26 1641 {
b0e4e1fe3d0665f Christoph Hellwig 2020-08-14 1642 if (is_multipath_disk(disk)) {
100c815cbd56480 Christoph Hellwig 2019-05-17 1643 struct nvme_ns *ns;
100c815cbd56480 Christoph Hellwig 2019-05-17 1644
32acab3181c7053 Christoph Hellwig 2017-11-02 1645 *head = disk->private_data;
32acab3181c7053 Christoph Hellwig 2017-11-02 1646 *srcu_idx = srcu_read_lock(&(*head)->srcu);
100c815cbd56480 Christoph Hellwig 2019-05-17 @1647 ns = nvme_find_path(*head);
100c815cbd56480 Christoph Hellwig 2019-05-17 1648 if (!ns)
100c815cbd56480 Christoph Hellwig 2019-05-17 1649 srcu_read_unlock(&(*head)->srcu, *srcu_idx);
100c815cbd56480 Christoph Hellwig 2019-05-17 1650 return ns;
32acab3181c7053 Christoph Hellwig 2017-11-02 1651 }
b0e4e1fe3d0665f Christoph Hellwig 2020-08-14 1652
32acab3181c7053 Christoph Hellwig 2017-11-02 1653 *head = NULL;
32acab3181c7053 Christoph Hellwig 2017-11-02 1654 *srcu_idx = -1;
32acab3181c7053 Christoph Hellwig 2017-11-02 1655 return disk->private_data;
32acab3181c7053 Christoph Hellwig 2017-11-02 1656 }
1673f1f08c8876f Christoph Hellwig 2015-11-26 1657
:::::: The code at line 1647 was first introduced by commit
:::::: 100c815cbd56480b3e31518475b04719c363614a nvme: fix srcu locking on error return in nvme_get_ns_from_disk
:::::: TO: Christoph Hellwig <hch(a)lst.de>
:::::: CC: Keith Busch <keith.busch(a)intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
Re: [PATCH 2/2] net: socket: implement SO_DESCRIPTION
by kernel test robot
Hi Pascal,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on tip/perf/core]
[also build test WARNING on linux/master v5.8]
[cannot apply to security/next-testing linus/master next-20200814]
[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/Pascal-Bouchareine/proc-socket-a...
base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git d903b6d029d66e6478562d75ea18d89098f7b7e8
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from arch/m68k/include/asm/io_mm.h:25,
from arch/m68k/include/asm/io.h:8,
from include/linux/scatterlist.h:9,
from include/linux/dma-mapping.h:11,
from include/linux/skbuff.h:31,
from include/linux/ip.h:16,
from include/net/ip.h:22,
from include/linux/errqueue.h:6,
from net/core/sock.c:91:
arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsb':
arch/m68k/include/asm/raw_io.h:83:7: warning: variable '__w' set but not used [-Wunused-but-set-variable]
83 | ({u8 __w, __v = (b); u32 _addr = ((u32) (addr)); \
| ^~~
arch/m68k/include/asm/raw_io.h:430:3: note: in expansion of macro 'rom_out_8'
430 | rom_out_8(port, *buf++);
| ^~~~~~~~~
arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsw':
arch/m68k/include/asm/raw_io.h:86:8: warning: variable '__w' set but not used [-Wunused-but-set-variable]
86 | ({u16 __w, __v = (w); u32 _addr = ((u32) (addr)); \
| ^~~
arch/m68k/include/asm/raw_io.h:448:3: note: in expansion of macro 'rom_out_be16'
448 | rom_out_be16(port, *buf++);
| ^~~~~~~~~~~~
arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsw_swapw':
arch/m68k/include/asm/raw_io.h:90:8: warning: variable '__w' set but not used [-Wunused-but-set-variable]
90 | ({u16 __w, __v = (w); u32 _addr = ((u32) (addr)); \
| ^~~
arch/m68k/include/asm/raw_io.h:466:3: note: in expansion of macro 'rom_out_le16'
466 | rom_out_le16(port, *buf++);
| ^~~~~~~~~~~~
In file included from include/linux/kernel.h:11,
from include/linux/unaligned/access_ok.h:5,
from arch/m68k/include/asm/unaligned.h:18,
from net/core/sock.c:88:
include/linux/scatterlist.h: In function 'sg_set_buf':
arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/scatterlist.h:143:2: note: in expansion of macro 'BUG_ON'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~
include/linux/scatterlist.h:143:10: note: in expansion of macro 'virt_addr_valid'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
In file included from arch/m68k/include/asm/bug.h:32,
from include/linux/bug.h:5,
from include/linux/thread_info.h:12,
from include/asm-generic/preempt.h:5,
from ./arch/m68k/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from include/linux/seqlock.h:36,
from include/linux/time.h:6,
from include/linux/skbuff.h:15,
from include/linux/ip.h:16,
from include/net/ip.h:22,
from include/linux/errqueue.h:6,
from net/core/sock.c:91:
include/linux/dma-mapping.h: In function 'dma_map_resource':
arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
include/asm-generic/bug.h:144:27: note: in definition of macro 'WARN_ON_ONCE'
144 | int __ret_warn_once = !!(condition); \
| ^~~~~~~~~
arch/m68k/include/asm/page_mm.h:170:25: note: in expansion of macro 'virt_addr_valid'
170 | #define pfn_valid(pfn) virt_addr_valid(pfn_to_virt(pfn))
| ^~~~~~~~~~~~~~~
include/linux/dma-mapping.h:352:19: note: in expansion of macro 'pfn_valid'
352 | if (WARN_ON_ONCE(pfn_valid(PHYS_PFN(phys_addr))))
| ^~~~~~~~~
net/core/sock.c: At top level:
>> net/core/sock.c:831:5: warning: no previous prototype for 'sock_set_description' [-Wmissing-prototypes]
831 | int sock_set_description(struct sock *sk, char __user *user_desc)
| ^~~~~~~~~~~~~~~~~~~~
vim +/sock_set_description +831 net/core/sock.c
830
> 831 int sock_set_description(struct sock *sk, char __user *user_desc)
832 {
833 char *old, *desc;
834
835 desc = strndup_user(user_desc, SK_MAX_DESC_SIZE, GFP_KERNEL_ACCOUNT);
836 if (IS_ERR(desc))
837 return PTR_ERR(desc);
838
839 lock_sock(sk);
840 old = sk->sk_description;
841 sk->sk_description = desc;
842 release_sock(sk);
843
844 kfree(old);
845
846 return 0;
847 }
848
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
Re: [PATCH v2 07/14] media: staging: rkisp1: params: avoid using buffer if params is not streaming
by kernel test robot
Hi Dafna,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linuxtv-media/master]
[also build test WARNING on v5.8 next-20200814]
[cannot apply to staging/staging-testing]
[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/Dafna-Hirschfeld/media-staging-r...
base: git://linuxtv.org/media_tree.git master
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 9.3.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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=xtensa
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/kernel.h:11,
from include/linux/list.h:9,
from include/linux/preempt.h:11,
from include/linux/spinlock.h:51,
from include/linux/seqlock.h:36,
from include/linux/time.h:6,
from include/media/v4l2-common.h:17,
from drivers/staging/media/rkisp1/rkisp1-params.c:8:
include/linux/scatterlist.h: In function 'sg_set_buf':
arch/xtensa/include/asm/page.h:193:9: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
193 | ((pfn) >= ARCH_PFN_OFFSET && ((pfn) - ARCH_PFN_OFFSET) < max_mapnr)
| ^~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/scatterlist.h:143:2: note: in expansion of macro 'BUG_ON'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~
arch/xtensa/include/asm/page.h:201:32: note: in expansion of macro 'pfn_valid'
201 | #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
| ^~~~~~~~~
include/linux/scatterlist.h:143:10: note: in expansion of macro 'virt_addr_valid'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
In file included from ./arch/xtensa/include/generated/asm/bug.h:1,
from include/linux/bug.h:5,
from include/linux/thread_info.h:12,
from include/asm-generic/preempt.h:5,
from ./arch/xtensa/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from include/linux/seqlock.h:36,
from include/linux/time.h:6,
from include/media/v4l2-common.h:17,
from drivers/staging/media/rkisp1/rkisp1-params.c:8:
include/linux/dma-mapping.h: In function 'dma_map_resource':
arch/xtensa/include/asm/page.h:193:9: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
193 | ((pfn) >= ARCH_PFN_OFFSET && ((pfn) - ARCH_PFN_OFFSET) < max_mapnr)
| ^~
include/asm-generic/bug.h:144:27: note: in definition of macro 'WARN_ON_ONCE'
144 | int __ret_warn_once = !!(condition); \
| ^~~~~~~~~
include/linux/dma-mapping.h:352:19: note: in expansion of macro 'pfn_valid'
352 | if (WARN_ON_ONCE(pfn_valid(PHYS_PFN(phys_addr))))
| ^~~~~~~~~
drivers/staging/media/rkisp1/rkisp1-params.c: At top level:
>> drivers/staging/media/rkisp1/rkisp1-params.c:1196:6: warning: no previous prototype for 'rkisp1_params_apply_params_cfg' [-Wmissing-prototypes]
1196 | void rkisp1_params_apply_params_cfg(struct rkisp1_params *params, unsigned int frame_sequence)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/rkisp1_params_apply_params_cfg +1196 drivers/staging/media/rkisp1/rkisp1-params.c
1195
> 1196 void rkisp1_params_apply_params_cfg(struct rkisp1_params *params, unsigned int frame_sequence)
1197 {
1198 struct rkisp1_params_cfg *new_params;
1199 struct rkisp1_buffer *cur_buf = NULL;
1200
1201 if (list_empty(¶ms->params))
1202 return;
1203
1204 cur_buf = list_first_entry(¶ms->params,
1205 struct rkisp1_buffer, queue);
1206
1207 new_params = (struct rkisp1_params_cfg *)(cur_buf->vaddr[0]);
1208
1209 rkisp1_isp_isr_other_config(params, new_params);
1210 rkisp1_isp_isr_meas_config(params, new_params);
1211
1212 /* update shadow register immediately */
1213 rkisp1_param_set_bits(params, RKISP1_CIF_ISP_CTRL, RKISP1_CIF_ISP_CTRL_ISP_CFG_UPD);
1214
1215 list_del(&cur_buf->queue);
1216
1217 cur_buf->vb.sequence = frame_sequence;
1218 vb2_buffer_done(&cur_buf->vb.vb2_buf, VB2_BUF_STATE_DONE);
1219 }
1220
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
Re: [PATCH 2/2] arm64: Reserve memory for quick kexec
by kernel test robot
Hi Sang,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on arm64/for-next/core]
[also build test ERROR on linux/master linus/master v5.8 next-20200814]
[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/Sang-Yan/kexec-Add-quick-kexec-s...
base: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/core
config: arm64-randconfig-r011-20200816 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
arch/arm64/kernel/setup.c: In function 'setup_arch':
>> arch/arm64/kernel/setup.c:374:32: error: 'res' undeclared (first use in this function)
374 | quick_kexec_res.start >= res->start &&
| ^~~
arch/arm64/kernel/setup.c:374:32: note: each undeclared identifier is reported only once for each function it appears in
--
arch/arm64/mm/init.c: In function 'reserve_quick_kexec':
>> arch/arm64/mm/init.c:155:13: error: 'CRASH_ALIGN' undeclared (first use in this function); did you mean 'CMSG_ALIGN'?
155 | mem_len, CRASH_ALIGN);
| ^~~~~~~~~~~
| CMSG_ALIGN
arch/arm64/mm/init.c:155:13: note: each undeclared identifier is reported only once for each function it appears in
vim +/res +374 arch/arm64/kernel/setup.c
284
285 void __init setup_arch(char **cmdline_p)
286 {
287 init_mm.start_code = (unsigned long) _text;
288 init_mm.end_code = (unsigned long) _etext;
289 init_mm.end_data = (unsigned long) _edata;
290 init_mm.brk = (unsigned long) _end;
291
292 *cmdline_p = boot_command_line;
293
294 /*
295 * If know now we are going to need KPTI then use non-global
296 * mappings from the start, avoiding the cost of rewriting
297 * everything later.
298 */
299 arm64_use_ng_mappings = kaslr_requires_kpti();
300
301 early_fixmap_init();
302 early_ioremap_init();
303
304 setup_machine_fdt(__fdt_pointer);
305
306 /*
307 * Initialise the static keys early as they may be enabled by the
308 * cpufeature code and early parameters.
309 */
310 jump_label_init();
311 parse_early_param();
312
313 /*
314 * Unmask asynchronous aborts and fiq after bringing up possible
315 * earlycon. (Report possible System Errors once we can report this
316 * occurred).
317 */
318 local_daif_restore(DAIF_PROCCTX_NOIRQ);
319
320 /*
321 * TTBR0 is only used for the identity mapping at this stage. Make it
322 * point to zero page to avoid speculatively fetching new entries.
323 */
324 cpu_uninstall_idmap();
325
326 xen_early_init();
327 efi_init();
328
329 if (!efi_enabled(EFI_BOOT) && ((u64)_text % MIN_KIMG_ALIGN) != 0)
330 pr_warn(FW_BUG "Kernel image misaligned at boot, please fix your bootloader!");
331
332 arm64_memblock_init();
333
334 paging_init();
335
336 acpi_table_upgrade();
337
338 /* Parse the ACPI tables for possible boot-time configuration */
339 acpi_boot_table_init();
340
341 if (acpi_disabled)
342 unflatten_device_tree();
343
344 bootmem_init();
345
346 kasan_init();
347
348 request_standard_resources();
349
350 early_ioremap_reset();
351
352 if (acpi_disabled)
353 psci_dt_init();
354 else
355 psci_acpi_init();
356
357 init_bootcpu_ops();
358 smp_init_cpus();
359 smp_build_mpidr_hash();
360
361 /* Init percpu seeds for random tags after cpus are set up. */
362 kasan_init_tags();
363
364 #ifdef CONFIG_ARM64_SW_TTBR0_PAN
365 /*
366 * Make sure init_thread_info.ttbr0 always generates translation
367 * faults in case uaccess_enable() is inadvertently called by the init
368 * thread.
369 */
370 init_task.thread_info.ttbr0 = __pa_symbol(empty_zero_page);
371 #endif
372 #ifdef CONFIG_QUICK_KEXEC
373 if (quick_kexec_res.end &&
> 374 quick_kexec_res.start >= res->start &&
375 quick_kexec_res.end <= res->end)
376 request_resource(res, &quick_kexec_res);
377 #endif
378
379 if (boot_args[1] || boot_args[2] || boot_args[3]) {
380 pr_err("WARNING: x1-x3 nonzero in violation of boot protocol:\n"
381 "\tx1: %016llx\n\tx2: %016llx\n\tx3: %016llx\n"
382 "This indicates a broken bootloader or old kernel\n",
383 boot_args[1], boot_args[2], boot_args[3]);
384 }
385 }
386
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
Re: [PATCH 2/2] i3c/master: add the mipi-i3c-hci driver
by kernel test robot
Hi Nicolas,
I love your patch! Perhaps something to improve:
[auto build test WARNING on robh/for-next]
[also build test WARNING on linus/master v5.8 next-20200814]
[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/Nicolas-Pitre/MIPI-I3c-HCI-Host-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: x86_64-randconfig-s021-20200816 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-168-g9554805c-dirty
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/i3c/master/mipi-i3c-hci/ext_caps.c:153:26: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *vendor_data @@ got void [noderef] __iomem *base @@
>> drivers/i3c/master/mipi-i3c-hci/ext_caps.c:153:26: sparse: expected void *vendor_data
>> drivers/i3c/master/mipi-i3c-hci/ext_caps.c:153:26: sparse: got void [noderef] __iomem *base
--
>> drivers/i3c/master/mipi-i3c-hci/pio.c:248:22: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] data @@ got restricted __le32 [usertype] @@
>> drivers/i3c/master/mipi-i3c-hci/pio.c:248:22: sparse: expected unsigned int [usertype] data
>> drivers/i3c/master/mipi-i3c-hci/pio.c:248:22: sparse: got restricted __le32 [usertype]
>> drivers/i3c/master/mipi-i3c-hci/pio.c:407:35: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [assigned] [usertype] last_word @@ got restricted __le32 [usertype] @@
>> drivers/i3c/master/mipi-i3c-hci/pio.c:407:35: sparse: expected unsigned int [assigned] [usertype] last_word
drivers/i3c/master/mipi-i3c-hci/pio.c:407:35: sparse: got restricted __le32 [usertype]
>> drivers/i3c/master/mipi-i3c-hci/pio.c:699:22: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [assigned] [usertype] data @@ got restricted __le32 [usertype] @@
>> drivers/i3c/master/mipi-i3c-hci/pio.c:699:22: sparse: expected unsigned int [assigned] [usertype] data
drivers/i3c/master/mipi-i3c-hci/pio.c:699:22: sparse: got restricted __le32 [usertype]
--
>> drivers/i3c/master/mipi-i3c-hci/core.c:614:60: sparse: sparse: Using plain integer as NULL pointer
drivers/i3c/master/mipi-i3c-hci/core.c:622:60: sparse: sparse: Using plain integer as NULL pointer
drivers/i3c/master/mipi-i3c-hci/core.c:630:60: sparse: sparse: Using plain integer as NULL pointer
drivers/i3c/master/mipi-i3c-hci/core.c:635:60: sparse: sparse: Using plain integer as NULL pointer
drivers/i3c/master/mipi-i3c-hci/core.c:640:64: sparse: sparse: Using plain integer as NULL pointer
vim +153 drivers/i3c/master/mipi-i3c-hci/ext_caps.c
150
151 static int hci_extcap_vendor_NXP(struct i3c_hci *hci, void __iomem *base)
152 {
> 153 hci->vendor_data = base;
154 INFO("Build Date Info = %#x", readl(base + 1*4));
155 /* reset the FPGA */
156 writel(0xdeadbeef, base + 1*4);
157 return 0;
158 }
159
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
Re: [PATCH] PCI: designware-ep: Fix the Header Type check
by kernel test robot
Hi Zhiqiang,
I love your patch! Perhaps something to improve:
[auto build test WARNING on pci/next]
[also build test WARNING on linux/master linus/master v5.8 next-20200814]
[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/Zhiqiang-Hou/PCI-designware-ep-F...
base: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next
config: alpha-allyesconfig (attached as .config)
compiler: alpha-linux-gcc (GCC) 9.3.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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=alpha
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/pci/controller/dwc/pcie-designware-ep.c: In function 'dw_pcie_ep_init_complete':
>> drivers/pci/controller/dwc/pcie-designware-ep.c:509:15: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
509 | if (hdr_type & 0x7f != PCI_HEADER_TYPE_NORMAL) {
| ^
vim +509 drivers/pci/controller/dwc/pcie-designware-ep.c
498
499 int dw_pcie_ep_init_complete(struct dw_pcie_ep *ep)
500 {
501 struct dw_pcie *pci = to_dw_pcie_from_ep(ep);
502 unsigned int offset;
503 unsigned int nbars;
504 u8 hdr_type;
505 u32 reg;
506 int i;
507
508 hdr_type = dw_pcie_readb_dbi(pci, PCI_HEADER_TYPE);
> 509 if (hdr_type & 0x7f != PCI_HEADER_TYPE_NORMAL) {
510 dev_err(pci->dev,
511 "PCIe controller is not set to EP mode (hdr_type:0x%x)!\n",
512 hdr_type);
513 return -EIO;
514 }
515
516 ep->msi_cap = dw_pcie_find_capability(pci, PCI_CAP_ID_MSI);
517
518 ep->msix_cap = dw_pcie_find_capability(pci, PCI_CAP_ID_MSIX);
519
520 offset = dw_pcie_ep_find_ext_capability(pci, PCI_EXT_CAP_ID_REBAR);
521 if (offset) {
522 reg = dw_pcie_readl_dbi(pci, offset + PCI_REBAR_CTRL);
523 nbars = (reg & PCI_REBAR_CTRL_NBAR_MASK) >>
524 PCI_REBAR_CTRL_NBAR_SHIFT;
525
526 dw_pcie_dbi_ro_wr_en(pci);
527 for (i = 0; i < nbars; i++, offset += PCI_REBAR_CTRL)
528 dw_pcie_writel_dbi(pci, offset + PCI_REBAR_CAP, 0x0);
529 dw_pcie_dbi_ro_wr_dis(pci);
530 }
531
532 dw_pcie_setup(pci);
533
534 return 0;
535 }
536 EXPORT_SYMBOL_GPL(dw_pcie_ep_init_complete);
537
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
fs/ocfs2/suballoc.c:2430:2-8: preceding lock on line 2413
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: e764a1e32337aaf325fc5b14a5bbd06eabba4699
commit: 464170647b5648bb81f3615567485fcb9a685bed jbd2: Make state lock a spinlock
date: 10 months ago
config: x86_64-randconfig-c002-20200812 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
coccinelle warnings: (new ones prefixed by >>)
>> fs/ocfs2/suballoc.c:2430:2-8: preceding lock on line 2413
vim +2430 fs/ocfs2/suballoc.c
415cb800375cc4 Mark Fasheh 2007-09-16 2379
b4414eea0e7b9c Mark Fasheh 2010-03-11 2380 static int ocfs2_block_group_clear_bits(handle_t *handle,
ccd979bdbce9fb Mark Fasheh 2005-12-15 2381 struct inode *alloc_inode,
ccd979bdbce9fb Mark Fasheh 2005-12-15 2382 struct ocfs2_group_desc *bg,
ccd979bdbce9fb Mark Fasheh 2005-12-15 2383 struct buffer_head *group_bh,
ccd979bdbce9fb Mark Fasheh 2005-12-15 2384 unsigned int bit_off,
b4414eea0e7b9c Mark Fasheh 2010-03-11 2385 unsigned int num_bits,
b4414eea0e7b9c Mark Fasheh 2010-03-11 2386 void (*undo_fn)(unsigned int bit,
b4414eea0e7b9c Mark Fasheh 2010-03-11 2387 unsigned long *bmap))
ccd979bdbce9fb Mark Fasheh 2005-12-15 2388 {
ccd979bdbce9fb Mark Fasheh 2005-12-15 2389 int status;
ccd979bdbce9fb Mark Fasheh 2005-12-15 2390 unsigned int tmp;
ccd979bdbce9fb Mark Fasheh 2005-12-15 2391 struct ocfs2_group_desc *undo_bg = NULL;
464170647b5648 Thomas Gleixner 2019-08-09 2392 struct journal_head *jh;
ccd979bdbce9fb Mark Fasheh 2005-12-15 2393
42035306132802 Joel Becker 2008-11-13 2394 /* The caller got this descriptor from
42035306132802 Joel Becker 2008-11-13 2395 * ocfs2_read_group_descriptor(). Any corruption is a code bug. */
42035306132802 Joel Becker 2008-11-13 2396 BUG_ON(!OCFS2_IS_VALID_GROUP_DESC(bg));
ccd979bdbce9fb Mark Fasheh 2005-12-15 2397
2f73e135b83c50 Tao Ma 2011-02-22 2398 trace_ocfs2_block_group_clear_bits(bit_off, num_bits);
ccd979bdbce9fb Mark Fasheh 2005-12-15 2399
b4414eea0e7b9c Mark Fasheh 2010-03-11 2400 BUG_ON(undo_fn && !ocfs2_is_cluster_bitmap(alloc_inode));
0cf2f7632b1789 Joel Becker 2009-02-12 2401 status = ocfs2_journal_access_gd(handle, INODE_CACHE(alloc_inode),
b4414eea0e7b9c Mark Fasheh 2010-03-11 2402 group_bh,
b4414eea0e7b9c Mark Fasheh 2010-03-11 2403 undo_fn ?
b4414eea0e7b9c Mark Fasheh 2010-03-11 2404 OCFS2_JOURNAL_ACCESS_UNDO :
b4414eea0e7b9c Mark Fasheh 2010-03-11 2405 OCFS2_JOURNAL_ACCESS_WRITE);
ccd979bdbce9fb Mark Fasheh 2005-12-15 2406 if (status < 0) {
ccd979bdbce9fb Mark Fasheh 2005-12-15 2407 mlog_errno(status);
ccd979bdbce9fb Mark Fasheh 2005-12-15 2408 goto bail;
ccd979bdbce9fb Mark Fasheh 2005-12-15 2409 }
ccd979bdbce9fb Mark Fasheh 2005-12-15 2410
464170647b5648 Thomas Gleixner 2019-08-09 2411 jh = bh2jh(group_bh);
b4414eea0e7b9c Mark Fasheh 2010-03-11 2412 if (undo_fn) {
464170647b5648 Thomas Gleixner 2019-08-09 @2413 spin_lock(&jh->b_state_lock);
464170647b5648 Thomas Gleixner 2019-08-09 2414 undo_bg = (struct ocfs2_group_desc *) jh->b_committed_data;
94e41ecfe0f202 Sunil Mushran 2009-06-19 2415 BUG_ON(!undo_bg);
94e41ecfe0f202 Sunil Mushran 2009-06-19 2416 }
ccd979bdbce9fb Mark Fasheh 2005-12-15 2417
ccd979bdbce9fb Mark Fasheh 2005-12-15 2418 tmp = num_bits;
ccd979bdbce9fb Mark Fasheh 2005-12-15 2419 while(tmp--) {
ccd979bdbce9fb Mark Fasheh 2005-12-15 2420 ocfs2_clear_bit((bit_off + tmp),
ccd979bdbce9fb Mark Fasheh 2005-12-15 2421 (unsigned long *) bg->bg_bitmap);
b4414eea0e7b9c Mark Fasheh 2010-03-11 2422 if (undo_fn)
b4414eea0e7b9c Mark Fasheh 2010-03-11 2423 undo_fn(bit_off + tmp,
ccd979bdbce9fb Mark Fasheh 2005-12-15 2424 (unsigned long *) undo_bg->bg_bitmap);
ccd979bdbce9fb Mark Fasheh 2005-12-15 2425 }
ccd979bdbce9fb Mark Fasheh 2005-12-15 2426 le16_add_cpu(&bg->bg_free_bits_count, num_bits);
9b5cd10e4c14a1 Srinivas Eeda 2010-10-05 2427 if (le16_to_cpu(bg->bg_free_bits_count) > le16_to_cpu(bg->bg_bits)) {
e75ed71be4f2f7 Changwei Ge 2018-01-31 2428 if (undo_fn)
464170647b5648 Thomas Gleixner 2019-08-09 2429 spin_unlock(&jh->b_state_lock);
7ecef14ab1db96 Joe Perches 2015-09-04 @2430 return ocfs2_error(alloc_inode->i_sb, "Group descriptor # %llu has bit count %u but claims %u are freed. num_bits %d\n",
9b5cd10e4c14a1 Srinivas Eeda 2010-10-05 2431 (unsigned long long)le64_to_cpu(bg->bg_blkno),
9b5cd10e4c14a1 Srinivas Eeda 2010-10-05 2432 le16_to_cpu(bg->bg_bits),
7ecef14ab1db96 Joe Perches 2015-09-04 2433 le16_to_cpu(bg->bg_free_bits_count),
7ecef14ab1db96 Joe Perches 2015-09-04 2434 num_bits);
9b5cd10e4c14a1 Srinivas Eeda 2010-10-05 2435 }
ccd979bdbce9fb Mark Fasheh 2005-12-15 2436
b4414eea0e7b9c Mark Fasheh 2010-03-11 2437 if (undo_fn)
464170647b5648 Thomas Gleixner 2019-08-09 2438 spin_unlock(&jh->b_state_lock);
94e41ecfe0f202 Sunil Mushran 2009-06-19 2439
ec20cec7a35158 Joel Becker 2010-03-19 2440 ocfs2_journal_dirty(handle, group_bh);
ccd979bdbce9fb Mark Fasheh 2005-12-15 2441 bail:
ccd979bdbce9fb Mark Fasheh 2005-12-15 2442 return status;
ccd979bdbce9fb Mark Fasheh 2005-12-15 2443 }
ccd979bdbce9fb Mark Fasheh 2005-12-15 2444
:::::: The code at line 2430 was first introduced by commit
:::::: 7ecef14ab1db961545354fa443749aeda2ea1b75 ocfs2: neaten do_error, ocfs2_error and ocfs2_abort
:::::: TO: Joe Perches <joe(a)perches.com>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month