tree:
https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-4.4
head: a321cfdc9afc13deeb29da992f74141226f914c8
commit: 2f4c504ed6acc59c1ffdf0d66ddc7a0df31fd835 [61/216] UPSTREAM: media: staging:
rkisp1: add output device for parameters
config: nios2-allyesconfig (attached as .config)
compiler: nios2-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 remote add chrome-os
https://chromium.googlesource.com/chromiumos/third_party/kernel
git fetch --no-tags chrome-os chromeos-4.4
git checkout 2f4c504ed6acc59c1ffdf0d66ddc7a0df31fd835
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-7.5.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>
Note: the chrome-os/chromeos-4.4 HEAD a321cfdc9afc13deeb29da992f74141226f914c8 builds
fine.
It only hurts bisectibility.
All error/warnings (new ones prefixed by >>):
In file included from include/linux/poll.h:5:0,
from include/media/v4l2-dev.h:12,
from include/media/v4l2-common.h:29,
from drivers/staging/media/rkisp1/rkisp1-params.c:8:
include/linux/scatterlist.h: In function 'sg_set_buf':
arch/nios2/include/asm/page.h:90:33: warning: comparison of unsigned expression >= 0
is always true [-Wtype-limits]
# define pfn_valid(pfn) ((pfn) >= ARCH_PFN_OFFSET && \
^
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));
^~~~~~
arch/nios2/include/asm/page.h:94:33: note: in expansion of macro 'pfn_valid'
# define virt_addr_valid(vaddr) pfn_valid(PFN_DOWN(virt_to_phys(vaddr)))
^~~~~~~~~
include/linux/scatterlist.h:140:10: note: in expansion of macro
'virt_addr_valid'
BUG_ON(!virt_addr_valid(buf));
^~~~~~~~~~~~~~~
In file included from drivers/staging/media/rkisp1/rkisp1-common.h:14:0,
from drivers/staging/media/rkisp1/rkisp1-params.c:14:
include/linux/clk.h: At top level:
include/linux/clk.h:199:70: warning: 'struct clk_bulk_data' declared inside
parameter list will not be visible outside of this definition or declaration
static inline int __must_check clk_bulk_prepare(int num_clks, struct clk_bulk_data
*clks)
^~~~~~~~~~~~~
include/linux/clk.h:223:60: warning: 'struct clk_bulk_data' declared inside
parameter list will not be visible outside of this definition or declaration
static inline void clk_bulk_unprepare(int num_clks, struct clk_bulk_data *clks)
^~~~~~~~~~~~~
include/linux/clk.h:528:17: warning: 'struct clk_bulk_data' declared inside
parameter list will not be visible outside of this definition or declaration
struct clk_bulk_data *clks)
^~~~~~~~~~~~~
include/linux/clk.h:539:15: warning: 'struct clk_bulk_data' declared inside
parameter list will not be visible outside of this definition or declaration
struct clk_bulk_data *clks)
^~~~~~~~~~~~~
include/linux/clk.h:546:54: warning: 'struct clk_bulk_data' declared inside
parameter list will not be visible outside of this definition or declaration
static inline void clk_bulk_put(int num_clks, struct clk_bulk_data *clks) {}
^~~~~~~~~~~~~
include/linux/clk.h:555:69: warning: 'struct clk_bulk_data' declared inside
parameter list will not be visible outside of this definition or declaration
static inline int __must_check clk_bulk_enable(int num_clks, struct clk_bulk_data
*clks)
^~~~~~~~~~~~~
include/linux/clk.h:564:16: warning: 'struct clk_bulk_data' declared inside
parameter list will not be visible outside of this definition or declaration
struct clk_bulk_data *clks) {}
^~~~~~~~~~~~~
include/linux/clk.h:624:13: warning: 'struct clk_bulk_data' declared inside
parameter list will not be visible outside of this definition or declaration
struct clk_bulk_data *clks)
^~~~~~~~~~~~~
include/linux/clk.h: In function 'clk_bulk_prepare_enable':
include/linux/clk.h:628:35: warning: passing argument 2 of 'clk_bulk_prepare'
from incompatible pointer type [-Wincompatible-pointer-types]
ret = clk_bulk_prepare(num_clks, clks);
^~~~
include/linux/clk.h:199:32: note: expected 'struct clk_bulk_data *' but
argument is of type 'struct clk_bulk_data *'
static inline int __must_check clk_bulk_prepare(int num_clks, struct clk_bulk_data
*clks)
^~~~~~~~~~~~~~~~
include/linux/clk.h:631:34: warning: passing argument 2 of 'clk_bulk_enable'
from incompatible pointer type [-Wincompatible-pointer-types]
ret = clk_bulk_enable(num_clks, clks);
^~~~
include/linux/clk.h:555:32: note: expected 'struct clk_bulk_data *' but
argument is of type 'struct clk_bulk_data *'
static inline int __must_check clk_bulk_enable(int num_clks, struct clk_bulk_data
*clks)
^~~~~~~~~~~~~~~
include/linux/clk.h:633:32: warning: passing argument 2 of 'clk_bulk_unprepare'
from incompatible pointer type [-Wincompatible-pointer-types]
clk_bulk_unprepare(num_clks, clks);
^~~~
include/linux/clk.h:223:20: note: expected 'struct clk_bulk_data *' but
argument is of type 'struct clk_bulk_data *'
static inline void clk_bulk_unprepare(int num_clks, struct clk_bulk_data *clks)
^~~~~~~~~~~~~~~~~~
include/linux/clk.h: At top level:
include/linux/clk.h:639:19: warning: 'struct clk_bulk_data' declared inside
parameter list will not be visible outside of this definition or declaration
struct clk_bulk_data *clks)
^~~~~~~~~~~~~
include/linux/clk.h: In function 'clk_bulk_disable_unprepare':
include/linux/clk.h:641:29: warning: passing argument 2 of 'clk_bulk_disable'
from incompatible pointer type [-Wincompatible-pointer-types]
clk_bulk_disable(num_clks, clks);
^~~~
include/linux/clk.h:563:20: note: expected 'struct clk_bulk_data *' but
argument is of type 'struct clk_bulk_data *'
static inline void clk_bulk_disable(int num_clks,
^~~~~~~~~~~~~~~~
include/linux/clk.h:642:31: warning: passing argument 2 of 'clk_bulk_unprepare'
from incompatible pointer type [-Wincompatible-pointer-types]
clk_bulk_unprepare(num_clks, clks);
^~~~
include/linux/clk.h:223:20: note: expected 'struct clk_bulk_data *' but
argument is of type 'struct clk_bulk_data *'
static inline void clk_bulk_unprepare(int num_clks, struct clk_bulk_data *clks)
^~~~~~~~~~~~~~~~~~
In file included from drivers/staging/media/rkisp1/rkisp1-params.c:14:0:
drivers/staging/media/rkisp1/rkisp1-common.h: At top level:
drivers/staging/media/rkisp1/rkisp1-common.h:253:23: error: array type has incomplete
element type 'struct clk_bulk_data'
struct clk_bulk_data clks[RKISP1_MAX_BUS_CLK];
^~~~
> drivers/staging/media/rkisp1/rkisp1-params.c:1528:17: warning:
initialization from incompatible pointer type [-Wincompatible-pointer-types]
.queue_setup = rkisp1_params_vb2_queue_setup,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/staging/media/rkisp1/rkisp1-params.c:1528:17: note: (near initialization for
'rkisp1_params_vb2_ops.queue_setup')
drivers/staging/media/rkisp1/rkisp1-params.c: In function
'rkisp1_params_register':
> drivers/staging/media/rkisp1/rkisp1-params.c:1605:8: error:
implicit declaration of function 'media_entity_pads_init'; did you mean
'media_entity_init'? [-Werror=implicit-function-declaration]
ret =
media_entity_pads_init(&vdev->entity, 1, &node->pad);
^~~~~~~~~~~~~~~~~~~~~~
media_entity_init
cc1: some warnings being treated as errors
vim +1605 drivers/staging/media/rkisp1/rkisp1-params.c
1526
1527 static struct vb2_ops rkisp1_params_vb2_ops = {
1528 .queue_setup = rkisp1_params_vb2_queue_setup,
1529 .wait_prepare = vb2_ops_wait_prepare,
1530 .wait_finish = vb2_ops_wait_finish,
1531 .buf_queue = rkisp1_params_vb2_buf_queue,
1532 .buf_prepare = rkisp1_params_vb2_buf_prepare,
1533 .start_streaming = rkisp1_params_vb2_start_streaming,
1534 .stop_streaming = rkisp1_params_vb2_stop_streaming,
1535
1536 };
1537
1538 static struct v4l2_file_operations rkisp1_params_fops = {
1539 .mmap = vb2_fop_mmap,
1540 .unlocked_ioctl = video_ioctl2,
1541 .poll = vb2_fop_poll,
1542 .open = v4l2_fh_open,
1543 .release = vb2_fop_release
1544 };
1545
1546 static int rkisp1_params_init_vb2_queue(struct vb2_queue *q,
1547 struct rkisp1_params *params)
1548 {
1549 struct rkisp1_vdev_node *node;
1550
1551 node = container_of(q, struct rkisp1_vdev_node, buf_queue);
1552
1553 q->type = V4L2_BUF_TYPE_META_OUTPUT;
1554 q->io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF;
1555 q->drv_priv = params;
1556 q->ops = &rkisp1_params_vb2_ops;
1557 q->mem_ops = &vb2_vmalloc_memops;
1558 q->buf_struct_size = sizeof(struct rkisp1_buffer);
1559 q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
1560 q->lock = &node->vlock;
1561
1562 return vb2_queue_init(q);
1563 }
1564
1565 static void rkisp1_init_params(struct rkisp1_params *params)
1566 {
1567 params->vdev_fmt.fmt.meta.dataformat =
1568 V4L2_META_FMT_RK_ISP1_PARAMS;
1569 params->vdev_fmt.fmt.meta.buffersize =
1570 sizeof(struct rkisp1_params_cfg);
1571 }
1572
1573 int rkisp1_params_register(struct rkisp1_params *params,
1574 struct v4l2_device *v4l2_dev,
1575 struct rkisp1_device *rkisp1)
1576 {
1577 struct rkisp1_vdev_node *node = ¶ms->vnode;
1578 struct video_device *vdev = &node->vdev;
1579 int ret;
1580
1581 params->rkisp1 = rkisp1;
1582 mutex_init(&node->vlock);
1583 spin_lock_init(¶ms->config_lock);
1584
1585 strscpy(vdev->name, RKISP1_PARAMS_DEV_NAME, sizeof(vdev->name));
1586
1587 video_set_drvdata(vdev, params);
1588 vdev->ioctl_ops = &rkisp1_params_ioctl;
1589 vdev->fops = &rkisp1_params_fops;
1590 vdev->release = video_device_release_empty;
1591 /*
1592 * Provide a mutex to v4l2 core. It will be used
1593 * to protect all fops and v4l2 ioctls.
1594 */
1595 vdev->lock = &node->vlock;
1596 vdev->v4l2_dev = v4l2_dev;
1597 vdev->queue = &node->buf_queue;
1598 vdev->device_caps = V4L2_CAP_STREAMING | V4L2_CAP_META_OUTPUT;
1599 vdev->vfl_dir = VFL_DIR_TX;
1600 rkisp1_params_init_vb2_queue(vdev->queue, params);
1601 rkisp1_init_params(params);
1602 video_set_drvdata(vdev, params);
1603
1604 node->pad.flags = MEDIA_PAD_FL_SOURCE;
1605 ret = media_entity_pads_init(&vdev->entity, 1,
&node->pad);
1606 if (ret)
1607 goto err_release_queue;
1608 ret = video_register_device(vdev, VFL_TYPE_GRABBER, -1);
1609 if (ret) {
1610 dev_err(&vdev->dev,
1611 "failed to register %s, ret=%d\n", vdev->name, ret);
1612 goto err_cleanup_media_entity;
1613 }
1614 return 0;
1615 err_cleanup_media_entity:
1616 media_entity_cleanup(&vdev->entity);
1617 err_release_queue:
1618 vb2_queue_release(vdev->queue);
1619 return ret;
1620 }
1621
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org