public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	linux-kernel@vger.kernel.org,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	Hans Verkuil <hverkuil@xs4all.nl>
Subject: [sailus-media-tree:master 28/30] drivers/media/v4l2-core/v4l2-subdev.c:342:1: error: implicit declaration of function 'v4l2_subdev_lock_and_get_active_state' is invalid in C99
Date: Sat, 9 Apr 2022 04:09:35 +0800	[thread overview]
Message-ID: <202204090350.ZbhpomcE-lkp@intel.com> (raw)

tree:   git://linuxtv.org/sailus/media_tree.git master
head:   bd1d801f302289ddbf86ff6c38fcc91aef8e7609
commit: 3f1a6a471c6a8b5ba772cb82538ad03fa0255e7c [28/30] media: subdev: add locking wrappers to subdev op wrappers
config: arm-randconfig-r022-20220408 (https://download.01.org/0day-ci/archive/20220409/202204090350.ZbhpomcE-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project c29a51b3a257908aebc01cd7c4655665db317d66)
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 arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        git remote add sailus-media-tree git://linuxtv.org/sailus/media_tree.git
        git fetch --no-tags sailus-media-tree master
        git checkout 3f1a6a471c6a8b5ba772cb82538ad03fa0255e7c
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/media/v4l2-core/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All error/warnings (new ones prefixed by >>):

>> drivers/media/v4l2-core/v4l2-subdev.c:342:1: error: implicit declaration of function 'v4l2_subdev_lock_and_get_active_state' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
   DEFINE_STATE_WRAPPER(get_fmt, struct v4l2_subdev_format);
   ^
   drivers/media/v4l2-core/v4l2-subdev.c:335:12: note: expanded from macro 'DEFINE_STATE_WRAPPER'
                           state = v4l2_subdev_lock_and_get_active_state(sd); \
                                   ^
>> drivers/media/v4l2-core/v4l2-subdev.c:342:1: warning: incompatible integer to pointer conversion assigning to 'struct v4l2_subdev_state *' from 'int' [-Wint-conversion]
   DEFINE_STATE_WRAPPER(get_fmt, struct v4l2_subdev_format);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/v4l2-core/v4l2-subdev.c:335:10: note: expanded from macro 'DEFINE_STATE_WRAPPER'
                           state = v4l2_subdev_lock_and_get_active_state(sd); \
                                 ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/media/v4l2-core/v4l2-subdev.c:342:1: error: implicit declaration of function 'v4l2_subdev_unlock_state' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
   drivers/media/v4l2-core/v4l2-subdev.c:338:4: note: expanded from macro 'DEFINE_STATE_WRAPPER'
                           v4l2_subdev_unlock_state(state);                   \
                           ^
   drivers/media/v4l2-core/v4l2-subdev.c:343:1: error: implicit declaration of function 'v4l2_subdev_lock_and_get_active_state' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
   DEFINE_STATE_WRAPPER(set_fmt, struct v4l2_subdev_format);
   ^
   drivers/media/v4l2-core/v4l2-subdev.c:335:12: note: expanded from macro 'DEFINE_STATE_WRAPPER'
                           state = v4l2_subdev_lock_and_get_active_state(sd); \
                                   ^
   drivers/media/v4l2-core/v4l2-subdev.c:343:1: warning: incompatible integer to pointer conversion assigning to 'struct v4l2_subdev_state *' from 'int' [-Wint-conversion]
   DEFINE_STATE_WRAPPER(set_fmt, struct v4l2_subdev_format);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/v4l2-core/v4l2-subdev.c:335:10: note: expanded from macro 'DEFINE_STATE_WRAPPER'
                           state = v4l2_subdev_lock_and_get_active_state(sd); \
                                 ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/v4l2-core/v4l2-subdev.c:343:1: error: implicit declaration of function 'v4l2_subdev_unlock_state' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
   drivers/media/v4l2-core/v4l2-subdev.c:338:4: note: expanded from macro 'DEFINE_STATE_WRAPPER'
                           v4l2_subdev_unlock_state(state);                   \
                           ^
   drivers/media/v4l2-core/v4l2-subdev.c:344:1: error: implicit declaration of function 'v4l2_subdev_lock_and_get_active_state' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
   DEFINE_STATE_WRAPPER(enum_mbus_code, struct v4l2_subdev_mbus_code_enum);
   ^
   drivers/media/v4l2-core/v4l2-subdev.c:335:12: note: expanded from macro 'DEFINE_STATE_WRAPPER'
                           state = v4l2_subdev_lock_and_get_active_state(sd); \
                                   ^
   drivers/media/v4l2-core/v4l2-subdev.c:344:1: warning: incompatible integer to pointer conversion assigning to 'struct v4l2_subdev_state *' from 'int' [-Wint-conversion]
   DEFINE_STATE_WRAPPER(enum_mbus_code, struct v4l2_subdev_mbus_code_enum);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/v4l2-core/v4l2-subdev.c:335:10: note: expanded from macro 'DEFINE_STATE_WRAPPER'
                           state = v4l2_subdev_lock_and_get_active_state(sd); \
                                 ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/v4l2-core/v4l2-subdev.c:344:1: error: implicit declaration of function 'v4l2_subdev_unlock_state' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
   drivers/media/v4l2-core/v4l2-subdev.c:338:4: note: expanded from macro 'DEFINE_STATE_WRAPPER'
                           v4l2_subdev_unlock_state(state);                   \
                           ^
   drivers/media/v4l2-core/v4l2-subdev.c:345:1: error: implicit declaration of function 'v4l2_subdev_lock_and_get_active_state' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
   DEFINE_STATE_WRAPPER(enum_frame_size, struct v4l2_subdev_frame_size_enum);
   ^
   drivers/media/v4l2-core/v4l2-subdev.c:335:12: note: expanded from macro 'DEFINE_STATE_WRAPPER'
                           state = v4l2_subdev_lock_and_get_active_state(sd); \
                                   ^
   drivers/media/v4l2-core/v4l2-subdev.c:345:1: warning: incompatible integer to pointer conversion assigning to 'struct v4l2_subdev_state *' from 'int' [-Wint-conversion]
   DEFINE_STATE_WRAPPER(enum_frame_size, struct v4l2_subdev_frame_size_enum);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/v4l2-core/v4l2-subdev.c:335:10: note: expanded from macro 'DEFINE_STATE_WRAPPER'
                           state = v4l2_subdev_lock_and_get_active_state(sd); \
                                 ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/v4l2-core/v4l2-subdev.c:345:1: error: implicit declaration of function 'v4l2_subdev_unlock_state' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
   drivers/media/v4l2-core/v4l2-subdev.c:338:4: note: expanded from macro 'DEFINE_STATE_WRAPPER'
                           v4l2_subdev_unlock_state(state);                   \
                           ^
   drivers/media/v4l2-core/v4l2-subdev.c:346:1: error: implicit declaration of function 'v4l2_subdev_lock_and_get_active_state' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
   DEFINE_STATE_WRAPPER(enum_frame_interval, struct v4l2_subdev_frame_interval_enum);
   ^
   drivers/media/v4l2-core/v4l2-subdev.c:335:12: note: expanded from macro 'DEFINE_STATE_WRAPPER'
                           state = v4l2_subdev_lock_and_get_active_state(sd); \
                                   ^
   drivers/media/v4l2-core/v4l2-subdev.c:346:1: warning: incompatible integer to pointer conversion assigning to 'struct v4l2_subdev_state *' from 'int' [-Wint-conversion]
   DEFINE_STATE_WRAPPER(enum_frame_interval, struct v4l2_subdev_frame_interval_enum);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/v4l2-core/v4l2-subdev.c:335:10: note: expanded from macro 'DEFINE_STATE_WRAPPER'
                           state = v4l2_subdev_lock_and_get_active_state(sd); \
                                 ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/v4l2-core/v4l2-subdev.c:346:1: error: implicit declaration of function 'v4l2_subdev_unlock_state' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
   drivers/media/v4l2-core/v4l2-subdev.c:338:4: note: expanded from macro 'DEFINE_STATE_WRAPPER'
                           v4l2_subdev_unlock_state(state);                   \
                           ^
   drivers/media/v4l2-core/v4l2-subdev.c:347:1: error: implicit declaration of function 'v4l2_subdev_lock_and_get_active_state' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
   DEFINE_STATE_WRAPPER(get_selection, struct v4l2_subdev_selection);
   ^
   drivers/media/v4l2-core/v4l2-subdev.c:335:12: note: expanded from macro 'DEFINE_STATE_WRAPPER'
                           state = v4l2_subdev_lock_and_get_active_state(sd); \
                                   ^
   drivers/media/v4l2-core/v4l2-subdev.c:347:1: warning: incompatible integer to pointer conversion assigning to 'struct v4l2_subdev_state *' from 'int' [-Wint-conversion]
   DEFINE_STATE_WRAPPER(get_selection, struct v4l2_subdev_selection);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/v4l2-core/v4l2-subdev.c:335:10: note: expanded from macro 'DEFINE_STATE_WRAPPER'
                           state = v4l2_subdev_lock_and_get_active_state(sd); \
                                 ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/v4l2-core/v4l2-subdev.c:347:1: error: implicit declaration of function 'v4l2_subdev_unlock_state' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
   drivers/media/v4l2-core/v4l2-subdev.c:338:4: note: expanded from macro 'DEFINE_STATE_WRAPPER'
                           v4l2_subdev_unlock_state(state);                   \
                           ^
   drivers/media/v4l2-core/v4l2-subdev.c:348:1: error: implicit declaration of function 'v4l2_subdev_lock_and_get_active_state' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
   DEFINE_STATE_WRAPPER(set_selection, struct v4l2_subdev_selection);
   ^
   drivers/media/v4l2-core/v4l2-subdev.c:335:12: note: expanded from macro 'DEFINE_STATE_WRAPPER'
                           state = v4l2_subdev_lock_and_get_active_state(sd); \
                                   ^
   drivers/media/v4l2-core/v4l2-subdev.c:348:1: warning: incompatible integer to pointer conversion assigning to 'struct v4l2_subdev_state *' from 'int' [-Wint-conversion]
   DEFINE_STATE_WRAPPER(set_selection, struct v4l2_subdev_selection);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/v4l2-core/v4l2-subdev.c:335:10: note: expanded from macro 'DEFINE_STATE_WRAPPER'
                           state = v4l2_subdev_lock_and_get_active_state(sd); \
                                 ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/v4l2-core/v4l2-subdev.c:348:1: error: implicit declaration of function 'v4l2_subdev_unlock_state' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
   drivers/media/v4l2-core/v4l2-subdev.c:338:4: note: expanded from macro 'DEFINE_STATE_WRAPPER'
                           v4l2_subdev_unlock_state(state);                   \
                           ^
   7 warnings and 14 errors generated.


vim +/v4l2_subdev_lock_and_get_active_state +342 drivers/media/v4l2-core/v4l2-subdev.c

   321	
   322	/*
   323	 * Create state-management wrapper for pad ops dealing with subdev state. The
   324	 * wrapper handles the case where the caller does not provide the called
   325	 * subdev's state. This should be removed when all the callers are fixed.
   326	 */
   327	#define DEFINE_STATE_WRAPPER(f, arg_type)                                  \
   328		static int call_##f##_state(struct v4l2_subdev *sd,                \
   329					    struct v4l2_subdev_state *_state,      \
   330					    arg_type *format)                      \
   331		{                                                                  \
   332			struct v4l2_subdev_state *state = _state;                  \
   333			int ret;                                                   \
   334			if (!_state)                                               \
 > 335				state = v4l2_subdev_lock_and_get_active_state(sd); \
   336			ret = call_##f(sd, state, format);                         \
   337			if (!_state && state)                                      \
   338				v4l2_subdev_unlock_state(state);                   \
   339			return ret;                                                \
   340		}
   341	
 > 342	DEFINE_STATE_WRAPPER(get_fmt, struct v4l2_subdev_format);
   343	DEFINE_STATE_WRAPPER(set_fmt, struct v4l2_subdev_format);
   344	DEFINE_STATE_WRAPPER(enum_mbus_code, struct v4l2_subdev_mbus_code_enum);
   345	DEFINE_STATE_WRAPPER(enum_frame_size, struct v4l2_subdev_frame_size_enum);
   346	DEFINE_STATE_WRAPPER(enum_frame_interval, struct v4l2_subdev_frame_interval_enum);
   347	DEFINE_STATE_WRAPPER(get_selection, struct v4l2_subdev_selection);
   348	DEFINE_STATE_WRAPPER(set_selection, struct v4l2_subdev_selection);
   349	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

                 reply	other threads:[~2022-04-08 20:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202204090350.ZbhpomcE-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=hverkuil@xs4all.nl \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=sakari.ailus@linux.intel.com \
    --cc=tomi.valkeinen@ideasonboard.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox