Hi Helen,
I love your patch! Yet something to improve:
[auto build test ERROR on linuxtv-media/master]
[also build test ERROR on v5.6-rc6 next-20200312]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see
https://stackoverflow.com/a/37406982]
url:
https://github.com/0day-ci/linux/commits/Helen-Koike/media-add-v4l2_pipel...
base:
git://linuxtv.org/media_tree.git master
config: arm-at91_dt_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.2.0
reproduce:
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
GCC_VERSION=9.2.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
In file included from include/linux/kernel.h:11,
from include/linux/list.h:9,
from include/linux/module.h:12,
from drivers/media/v4l2-core/v4l2-common.c:37:
drivers/media/v4l2-core/v4l2-common.c: In function
'v4l2_pipeline_stream_disable':
> include/linux/kernel.h:987:51: error: 'struct
v4l2_subdev' has no member named 'entity'
987 |
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~
include/linux/compiler.h:330:9: note: in definition of macro
'__compiletime_assert'
330 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler.h:350:2: note: in expansion of macro
'_compiletime_assert'
350 | _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro
'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:987:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
987 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~~~~~~
include/linux/kernel.h:987:20: note: in expansion of macro '__same_type'
987 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~
> include/media/v4l2-subdev.h:888:3: note: in expansion of macro
'container_of'
888 | container_of(__me_sd_ent, struct v4l2_subdev,
entity) : \
| ^~~~~~~~~~~~
> drivers/media/v4l2-core/v4l2-common.c:469:8: note: in expansion
of macro 'media_entity_to_v4l2_subdev'
469 | sd =
media_entity_to_v4l2_subdev(entity);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from <command-line>:
> include/linux/compiler_types.h:129:35: error: 'struct
v4l2_subdev' has no member named 'entity'
129 | #define
__compiler_offsetof(a, b) __builtin_offsetof(a, b)
| ^~~~~~~~~~~~~~~~~~
include/linux/stddef.h:17:32: note: in expansion of macro
'__compiler_offsetof'
17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
| ^~~~~~~~~~~~~~~~~~~
include/linux/kernel.h:990:21: note: in expansion of macro 'offsetof'
990 | ((type *)(__mptr - offsetof(type, member))); })
| ^~~~~~~~
> include/media/v4l2-subdev.h:888:3: note: in expansion of macro
'container_of'
888 | container_of(__me_sd_ent, struct v4l2_subdev,
entity) : \
| ^~~~~~~~~~~~
> drivers/media/v4l2-core/v4l2-common.c:469:8: note: in expansion
of macro 'media_entity_to_v4l2_subdev'
469 | sd =
media_entity_to_v4l2_subdev(entity);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/v4l2-core/v4l2-common.c: At top level:
> drivers/media/v4l2-core/v4l2-common.c:485:2: error: expected
identifier or '(' before 'if'
485 | if
(!pipe->streaming_count)
| ^~
> drivers/media/v4l2-core/v4l2-common.c:488:15: error: expected
declaration specifiers or '...' before '&' token
488 |
mutex_unlock(&mdev->graph_mutex);
| ^
> drivers/media/v4l2-core/v4l2-common.c:490:2: error: expected
identifier or '(' before 'return'
490 | return ret;
| ^~~~~~
> drivers/media/v4l2-core/v4l2-common.c:491:1: error: expected
identifier or '(' before '}' token
491 | }
| ^
In file included from include/linux/kernel.h:11,
from include/linux/list.h:9,
from include/linux/module.h:12,
from drivers/media/v4l2-core/v4l2-common.c:37:
drivers/media/v4l2-core/v4l2-common.c: In function
'v4l2_pipeline_stream_enable':
> include/linux/kernel.h:987:51: error: 'struct
v4l2_subdev' has no member named 'entity'
987 |
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~
include/linux/compiler.h:330:9: note: in definition of macro
'__compiletime_assert'
330 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler.h:350:2: note: in expansion of macro
'_compiletime_assert'
350 | _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro
'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:987:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
987 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~~~~~~
include/linux/kernel.h:987:20: note: in expansion of macro '__same_type'
987 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~
> include/media/v4l2-subdev.h:888:3: note: in expansion of macro
'container_of'
888 | container_of(__me_sd_ent, struct v4l2_subdev,
entity) : \
| ^~~~~~~~~~~~
drivers/media/v4l2-core/v4l2-common.c:518:8: note: in expansion of macro
'media_entity_to_v4l2_subdev'
518 | sd = media_entity_to_v4l2_subdev(entity);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from <command-line>:
> include/linux/compiler_types.h:129:35: error: 'struct
v4l2_subdev' has no member named 'entity'
129 | #define
__compiler_offsetof(a, b) __builtin_offsetof(a, b)
| ^~~~~~~~~~~~~~~~~~
include/linux/stddef.h:17:32: note: in expansion of macro
'__compiler_offsetof'
17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
| ^~~~~~~~~~~~~~~~~~~
include/linux/kernel.h:990:21: note: in expansion of macro 'offsetof'
990 | ((type *)(__mptr - offsetof(type, member))); })
| ^~~~~~~~
> include/media/v4l2-subdev.h:888:3: note: in expansion of macro
'container_of'
888 | container_of(__me_sd_ent, struct v4l2_subdev,
entity) : \
| ^~~~~~~~~~~~
drivers/media/v4l2-core/v4l2-common.c:518:8: note: in expansion of macro
'media_entity_to_v4l2_subdev'
518 | sd = media_entity_to_v4l2_subdev(entity);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/v4l2-core/v4l2-common.c: At top level:
drivers/media/v4l2-core/v4l2-common.c:535:2: error: expected identifier or '('
before 'if'
535 | if (!pipe->streaming_count)
| ^~
drivers/media/v4l2-core/v4l2-common.c:538:15: error: expected declaration specifiers or
'...' before '&' token
538 | mutex_unlock(&mdev->graph_mutex);
| ^
drivers/media/v4l2-core/v4l2-common.c:540:2: error: expected identifier or '('
before 'return'
540 | return ret;
| ^~~~~~
drivers/media/v4l2-core/v4l2-common.c:541:1: error: expected identifier or '('
before '}' token
541 | }
| ^
drivers/media/v4l2-core/v4l2-common.c: In function
'v4l2_pipeline_stream_disable':
> drivers/media/v4l2-core/v4l2-common.c:483:2: warning: control
reaches end of non-void function [-Wreturn-type]
483 | }
| ^
drivers/media/v4l2-core/v4l2-common.c: In function
'v4l2_pipeline_stream_enable':
drivers/media/v4l2-core/v4l2-common.c:533:2: warning: control reaches end of non-void
function [-Wreturn-type]
533 | }
| ^
--
In file included from include/linux/kernel.h:11,
from include/linux/list.h:9,
from include/linux/module.h:12,
from drivers/media//v4l2-core/v4l2-common.c:37:
drivers/media//v4l2-core/v4l2-common.c: In function
'v4l2_pipeline_stream_disable':
> include/linux/kernel.h:987:51: error: 'struct
v4l2_subdev' has no member named 'entity'
987 |
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~
include/linux/compiler.h:330:9: note: in definition of macro
'__compiletime_assert'
330 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler.h:350:2: note: in expansion of macro
'_compiletime_assert'
350 | _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro
'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:987:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
987 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~~~~~~
include/linux/kernel.h:987:20: note: in expansion of macro '__same_type'
987 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~
> include/media/v4l2-subdev.h:888:3: note: in expansion of macro
'container_of'
888 | container_of(__me_sd_ent, struct v4l2_subdev,
entity) : \
| ^~~~~~~~~~~~
drivers/media//v4l2-core/v4l2-common.c:469:8: note: in expansion of macro
'media_entity_to_v4l2_subdev'
469 | sd = media_entity_to_v4l2_subdev(entity);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from <command-line>:
> include/linux/compiler_types.h:129:35: error: 'struct
v4l2_subdev' has no member named 'entity'
129 | #define
__compiler_offsetof(a, b) __builtin_offsetof(a, b)
| ^~~~~~~~~~~~~~~~~~
include/linux/stddef.h:17:32: note: in expansion of macro
'__compiler_offsetof'
17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
| ^~~~~~~~~~~~~~~~~~~
include/linux/kernel.h:990:21: note: in expansion of macro 'offsetof'
990 | ((type *)(__mptr - offsetof(type, member))); })
| ^~~~~~~~
> include/media/v4l2-subdev.h:888:3: note: in expansion of macro
'container_of'
888 | container_of(__me_sd_ent, struct v4l2_subdev,
entity) : \
| ^~~~~~~~~~~~
drivers/media//v4l2-core/v4l2-common.c:469:8: note: in expansion of macro
'media_entity_to_v4l2_subdev'
469 | sd = media_entity_to_v4l2_subdev(entity);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media//v4l2-core/v4l2-common.c: At top level:
drivers/media//v4l2-core/v4l2-common.c:485:2: error: expected identifier or '('
before 'if'
485 | if (!pipe->streaming_count)
| ^~
drivers/media//v4l2-core/v4l2-common.c:488:15: error: expected declaration specifiers
or '...' before '&' token
488 | mutex_unlock(&mdev->graph_mutex);
| ^
drivers/media//v4l2-core/v4l2-common.c:490:2: error: expected identifier or '('
before 'return'
490 | return ret;
| ^~~~~~
drivers/media//v4l2-core/v4l2-common.c:491:1: error: expected identifier or '('
before '}' token
491 | }
| ^
In file included from include/linux/kernel.h:11,
from include/linux/list.h:9,
from include/linux/module.h:12,
from drivers/media//v4l2-core/v4l2-common.c:37:
drivers/media//v4l2-core/v4l2-common.c: In function
'v4l2_pipeline_stream_enable':
> include/linux/kernel.h:987:51: error: 'struct
v4l2_subdev' has no member named 'entity'
987 |
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~
include/linux/compiler.h:330:9: note: in definition of macro
'__compiletime_assert'
330 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler.h:350:2: note: in expansion of macro
'_compiletime_assert'
350 | _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro
'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:987:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
987 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~~~~~~
include/linux/kernel.h:987:20: note: in expansion of macro '__same_type'
987 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~
> include/media/v4l2-subdev.h:888:3: note: in expansion of macro
'container_of'
888 | container_of(__me_sd_ent, struct v4l2_subdev,
entity) : \
| ^~~~~~~~~~~~
drivers/media//v4l2-core/v4l2-common.c:518:8: note: in expansion of macro
'media_entity_to_v4l2_subdev'
518 | sd = media_entity_to_v4l2_subdev(entity);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from <command-line>:
> include/linux/compiler_types.h:129:35: error: 'struct
v4l2_subdev' has no member named 'entity'
129 | #define
__compiler_offsetof(a, b) __builtin_offsetof(a, b)
| ^~~~~~~~~~~~~~~~~~
include/linux/stddef.h:17:32: note: in expansion of macro
'__compiler_offsetof'
17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
| ^~~~~~~~~~~~~~~~~~~
include/linux/kernel.h:990:21: note: in expansion of macro 'offsetof'
990 | ((type *)(__mptr - offsetof(type, member))); })
| ^~~~~~~~
> include/media/v4l2-subdev.h:888:3: note: in expansion of macro
'container_of'
888 | container_of(__me_sd_ent, struct v4l2_subdev,
entity) : \
| ^~~~~~~~~~~~
drivers/media//v4l2-core/v4l2-common.c:518:8: note: in expansion of macro
'media_entity_to_v4l2_subdev'
518 | sd = media_entity_to_v4l2_subdev(entity);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media//v4l2-core/v4l2-common.c: At top level:
drivers/media//v4l2-core/v4l2-common.c:535:2: error: expected identifier or '('
before 'if'
535 | if (!pipe->streaming_count)
| ^~
drivers/media//v4l2-core/v4l2-common.c:538:15: error: expected declaration specifiers
or '...' before '&' token
538 | mutex_unlock(&mdev->graph_mutex);
| ^
drivers/media//v4l2-core/v4l2-common.c:540:2: error: expected identifier or '('
before 'return'
540 | return ret;
| ^~~~~~
drivers/media//v4l2-core/v4l2-common.c:541:1: error: expected identifier or '('
before '}' token
541 | }
| ^
drivers/media//v4l2-core/v4l2-common.c: In function
'v4l2_pipeline_stream_disable':
drivers/media//v4l2-core/v4l2-common.c:483:2: warning: control reaches end of non-void
function [-Wreturn-type]
483 | }
| ^
drivers/media//v4l2-core/v4l2-common.c: In function
'v4l2_pipeline_stream_enable':
drivers/media//v4l2-core/v4l2-common.c:533:2: warning: control reaches end of non-void
function [-Wreturn-type]
533 | }
| ^
vim +987 include/linux/kernel.h
cf14f27f82af78 Alexei Starovoitov 2018-03-28 977
^1da177e4c3f41 Linus Torvalds 2005-04-16 978 /**
^1da177e4c3f41 Linus Torvalds 2005-04-16 979 * container_of - cast a member of a
structure out to the containing structure
^1da177e4c3f41 Linus Torvalds 2005-04-16 980 * @ptr: the pointer to the member.
^1da177e4c3f41 Linus Torvalds 2005-04-16 981 * @type: the type of the container
struct this is embedded in.
^1da177e4c3f41 Linus Torvalds 2005-04-16 982 * @member: the name of the member
within the struct.
^1da177e4c3f41 Linus Torvalds 2005-04-16 983 *
^1da177e4c3f41 Linus Torvalds 2005-04-16 984 */
^1da177e4c3f41 Linus Torvalds 2005-04-16 985 #define container_of(ptr, type, member)
({ \
c7acec713d14c6 Ian Abbott 2017-07-12 986 void *__mptr = (void *)(ptr); \
c7acec713d14c6 Ian Abbott 2017-07-12 @987 BUILD_BUG_ON_MSG(!__same_type(*(ptr),
((type *)0)->member) && \
c7acec713d14c6 Ian Abbott 2017-07-12 988 !__same_type(*(ptr), void), \
c7acec713d14c6 Ian Abbott 2017-07-12 989 "pointer type mismatch in
container_of()"); \
c7acec713d14c6 Ian Abbott 2017-07-12 990 ((type *)(__mptr - offsetof(type,
member))); })
^1da177e4c3f41 Linus Torvalds 2005-04-16 991
:::::: The code at line 987 was first introduced by commit
:::::: c7acec713d14c6ce8a20154f9dfda258d6bcad3b kernel.h: handle pointers to arrays better
in container_of()
:::::: TO: Ian Abbott <abbotti(a)mev.co.uk>
:::::: 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