From: kernel test robot <lkp@intel.com>
To: Mauro Carvalho Chehab <mchehab@kernel.org>, linuxtv-commits@linuxtv.org
Cc: kbuild-all@lists.01.org, linux-media@vger.kernel.org,
Bogdan Togorean <bogdan.togorean@analog.com>,
linux-kernel@vger.kernel.org
Subject: Re: [git:media_stage/master] media: i2c: Add driver for the Analog Devices ADDI9036 ToF front-end
Date: Wed, 15 Dec 2021 08:00:38 +0800 [thread overview]
Message-ID: <202112150733.a6LCjbXP-lkp@intel.com> (raw)
In-Reply-To: <E1mx7hB-002ppP-O7@www.linuxtv.org>
Hi Mauro,
I love your patch! Yet something to improve:
[auto build test ERROR on media-tree/master]
[also build test ERROR on linux/master linus/master v5.16-rc5 next-20211213]
[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/Mauro-Carvalho-Chehab/media-i2c-Add-driver-for-the-Analog-Devices-ADDI9036-ToF-front-end/20211214-211851
base: git://linuxtv.org/media_tree.git master
config: nios2-allyesconfig (https://download.01.org/0day-ci/archive/20211215/202112150733.a6LCjbXP-lkp@intel.com/config)
compiler: nios2-linux-gcc (GCC) 11.2.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
# https://github.com/0day-ci/linux/commit/ec03b2029965b84eff6a7d1e8fe130330c3e69ed
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Mauro-Carvalho-Chehab/media-i2c-Add-driver-for-the-Analog-Devices-ADDI9036-ToF-front-end/20211214-211851
git checkout ec03b2029965b84eff6a7d1e8fe130330c3e69ed
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=nios2 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
drivers/media/i2c/addi9036.c: In function 'addi9036_get_pad_format':
>> drivers/media/i2c/addi9036.c:310:66: error: passing argument 2 of 'v4l2_subdev_get_try_format' from incompatible pointer type [-Werror=incompatible-pointer-types]
310 | return v4l2_subdev_get_try_format(&addi9036->sd, cfg, pad);
| ^~~
| |
| struct v4l2_subdev_pad_config *
In file included from drivers/media/i2c/addi9036.c:17:
include/media/v4l2-subdev.h:995:54: note: expected 'struct v4l2_subdev_state *' but argument is of type 'struct v4l2_subdev_pad_config *'
995 | struct v4l2_subdev_state *state,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
drivers/media/i2c/addi9036.c: In function 'addi9036_get_pad_crop':
>> drivers/media/i2c/addi9036.c:342:64: error: passing argument 2 of 'v4l2_subdev_get_try_crop' from incompatible pointer type [-Werror=incompatible-pointer-types]
342 | return v4l2_subdev_get_try_crop(&addi9036->sd, cfg, pad);
| ^~~
| |
| struct v4l2_subdev_pad_config *
In file included from drivers/media/i2c/addi9036.c:17:
include/media/v4l2-subdev.h:1013:52: note: expected 'struct v4l2_subdev_state *' but argument is of type 'struct v4l2_subdev_pad_config *'
1013 | struct v4l2_subdev_state *state,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
drivers/media/i2c/addi9036.c: At top level:
>> drivers/media/i2c/addi9036.c:521:35: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_state *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *)' [-Werror=incompatible-pointer-types]
521 | .init_cfg = addi9036_entity_init_cfg,
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/addi9036.c:521:35: note: (near initialization for 'addi9036_subdev_pad_ops.init_cfg')
>> drivers/media/i2c/addi9036.c:522:35: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_state *, struct v4l2_subdev_mbus_code_enum *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_mbus_code_enum *)' [-Werror=incompatible-pointer-types]
522 | .enum_mbus_code = addi9036_enum_mbus_code,
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/addi9036.c:522:35: note: (near initialization for 'addi9036_subdev_pad_ops.enum_mbus_code')
>> drivers/media/i2c/addi9036.c:523:35: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_state *, struct v4l2_subdev_frame_size_enum *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_frame_size_enum *)' [-Werror=incompatible-pointer-types]
523 | .enum_frame_size = addi9036_enum_frame_size,
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/addi9036.c:523:35: note: (near initialization for 'addi9036_subdev_pad_ops.enum_frame_size')
>> drivers/media/i2c/addi9036.c:524:35: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_state *, struct v4l2_subdev_format *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_format *)' [-Werror=incompatible-pointer-types]
524 | .get_fmt = addi9036_get_format,
| ^~~~~~~~~~~~~~~~~~~
drivers/media/i2c/addi9036.c:524:35: note: (near initialization for 'addi9036_subdev_pad_ops.get_fmt')
drivers/media/i2c/addi9036.c:525:35: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_state *, struct v4l2_subdev_format *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_format *)' [-Werror=incompatible-pointer-types]
525 | .set_fmt = addi9036_set_format,
| ^~~~~~~~~~~~~~~~~~~
drivers/media/i2c/addi9036.c:525:35: note: (near initialization for 'addi9036_subdev_pad_ops.set_fmt')
>> drivers/media/i2c/addi9036.c:526:35: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_state *, struct v4l2_subdev_selection *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_selection *)' [-Werror=incompatible-pointer-types]
526 | .get_selection = addi9036_get_selection,
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/addi9036.c:526:35: note: (near initialization for 'addi9036_subdev_pad_ops.get_selection')
cc1: some warnings being treated as errors
vim +/v4l2_subdev_get_try_format +310 drivers/media/i2c/addi9036.c
302
303 static struct v4l2_mbus_framefmt *
304 addi9036_get_pad_format(struct addi9036 *addi9036,
305 struct v4l2_subdev_pad_config *cfg, unsigned int pad,
306 enum v4l2_subdev_format_whence which)
307 {
308 switch (which) {
309 case V4L2_SUBDEV_FORMAT_TRY:
> 310 return v4l2_subdev_get_try_format(&addi9036->sd, cfg, pad);
311 case V4L2_SUBDEV_FORMAT_ACTIVE:
312 return &addi9036->fmt;
313 default:
314 return ERR_PTR(-EINVAL);
315 }
316 }
317
318 static int addi9036_get_format(struct v4l2_subdev *sd,
319 struct v4l2_subdev_pad_config *cfg,
320 struct v4l2_subdev_format *format)
321 {
322 struct addi9036 *addi9036 = to_addi9036(sd);
323 struct v4l2_mbus_framefmt *pad_format;
324
325 pad_format = addi9036_get_pad_format(addi9036, cfg, format->pad,
326 format->which);
327 if (IS_ERR(pad_format))
328 return PTR_ERR(pad_format);
329
330 format->format = *pad_format;
331
332 return 0;
333 }
334
335 static struct v4l2_rect *
336 addi9036_get_pad_crop(struct addi9036 *addi9036,
337 struct v4l2_subdev_pad_config *cfg,
338 unsigned int pad, enum v4l2_subdev_format_whence which)
339 {
340 switch (which) {
341 case V4L2_SUBDEV_FORMAT_TRY:
> 342 return v4l2_subdev_get_try_crop(&addi9036->sd, cfg, pad);
343 case V4L2_SUBDEV_FORMAT_ACTIVE:
344 return &addi9036->crop;
345 default:
346 return ERR_PTR(-EINVAL);
347 }
348 }
349
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
prev parent reply other threads:[~2021-12-15 0:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-14 12:44 Mauro Carvalho Chehab
2021-12-15 0:00 ` kernel test robot [this message]
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=202112150733.a6LCjbXP-lkp@intel.com \
--to=lkp@intel.com \
--cc=bogdan.togorean@analog.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linuxtv-commits@linuxtv.org \
--cc=mchehab@kernel.org \
/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
all inboxes | Powered by JetHome®