Message ID | 20210215123728.16362-1-sakari.ailus@linux.intel.com |
---|---|
State | Accepted |
Commit | 8f202f8e9ff38e29694a4bc0a519b4e03c1726ee |
Headers | show |
Series | [1/1] v4l: async: Fix kerneldoc documentation for async functions | expand |
Hi Sakari,
I love your patch! Perhaps something to improve:
[auto build test WARNING on linuxtv-media/master]
[also build test WARNING on next-20210212]
[cannot apply to v5.11]
[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/Sakari-Ailus/v4l-async-Fix-kerneldoc-documentation-for-async-functions/20210215-204146
base: git://linuxtv.org/media_tree.git master
config: sparc-allyesconfig (attached as .config)
compiler: sparc64-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
# https://github.com/0day-ci/linux/commit/8e8c47cba531c1706847f07a4af5cd19aa33f351
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Sakari-Ailus/v4l-async-Fix-kerneldoc-documentation-for-async-functions/20210215-204146
git checkout 8e8c47cba531c1706847f07a4af5cd19aa33f351
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sparc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
In file included from drivers/media/platform/ti-vpe/cal.c:24:
drivers/media/platform/ti-vpe/cal.c: In function 'cal_async_notifier_register':
include/media/v4l2-async.h:179:4: error: '__type' undeclared (first use in this function); did you mean '_ctype'?
179 | ((__type *)__v4l2_async_notifier_add_fwnode_subdev(notifier, fwnode, \
| ^~~~~~
drivers/media/platform/ti-vpe/cal.c:694:10: note: in expansion of macro 'v4l2_async_notifier_add_fwnode_subdev'
694 | casd = v4l2_async_notifier_add_fwnode_subdev(&cal->notifier,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/media/v4l2-async.h:179:4: note: each undeclared identifier is reported only once for each function it appears in
179 | ((__type *)__v4l2_async_notifier_add_fwnode_subdev(notifier, fwnode, \
| ^~~~~~
drivers/media/platform/ti-vpe/cal.c:694:10: note: in expansion of macro 'v4l2_async_notifier_add_fwnode_subdev'
694 | casd = v4l2_async_notifier_add_fwnode_subdev(&cal->notifier,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/media/v4l2-async.h:179:12: error: expected expression before ')' token
179 | ((__type *)__v4l2_async_notifier_add_fwnode_subdev(notifier, fwnode, \
| ^
drivers/media/platform/ti-vpe/cal.c:694:10: note: in expansion of macro 'v4l2_async_notifier_add_fwnode_subdev'
694 | casd = v4l2_async_notifier_add_fwnode_subdev(&cal->notifier,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/media/platform/ti-vpe/cal.c:688:25: warning: variable 'fwnode' set but not used [-Wunused-but-set-variable]
688 | struct fwnode_handle *fwnode;
| ^~~~~~
vim +/fwnode +688 drivers/media/platform/ti-vpe/cal.c
b6ee3f0dcf43dc Laurent Pinchart 2017-08-30 676
a539a0536f6e22 Laurent Pinchart 2020-07-06 677 static int cal_async_notifier_register(struct cal_dev *cal)
343e89a792a571 Benoit Parrot 2016-01-06 678 {
a539a0536f6e22 Laurent Pinchart 2020-07-06 679 unsigned int i;
a539a0536f6e22 Laurent Pinchart 2020-07-06 680 int ret;
a539a0536f6e22 Laurent Pinchart 2020-07-06 681
a539a0536f6e22 Laurent Pinchart 2020-07-06 682 v4l2_async_notifier_init(&cal->notifier);
a539a0536f6e22 Laurent Pinchart 2020-07-06 683 cal->notifier.ops = &cal_async_notifier_ops;
a539a0536f6e22 Laurent Pinchart 2020-07-06 684
71c1f16ddd528d Laurent Pinchart 2020-12-07 685 for (i = 0; i < cal->data->num_csi2_phy; ++i) {
539e7c5d7c0281 Laurent Pinchart 2020-07-06 686 struct cal_camerarx *phy = cal->phy[i];
8fcb7576ad197b Laurent Pinchart 2020-07-06 687 struct cal_v4l2_async_subdev *casd;
f5ddf19eca3328 Laurent Pinchart 2020-07-06 @688 struct fwnode_handle *fwnode;
343e89a792a571 Benoit Parrot 2016-01-06 689
71c1f16ddd528d Laurent Pinchart 2020-12-07 690 if (!phy->sensor_node)
a539a0536f6e22 Laurent Pinchart 2020-07-06 691 continue;
d079f94c90469f Steve Longerbeam 2018-09-29 692
539e7c5d7c0281 Laurent Pinchart 2020-07-06 693 fwnode = of_fwnode_handle(phy->sensor_node);
b01edcbd409cf7 Laurent Pinchart 2021-01-18 694 casd = v4l2_async_notifier_add_fwnode_subdev(&cal->notifier,
a539a0536f6e22 Laurent Pinchart 2020-07-06 695 fwnode,
b01edcbd409cf7 Laurent Pinchart 2021-01-18 696 struct cal_v4l2_async_subdev);
b01edcbd409cf7 Laurent Pinchart 2021-01-18 697 if (IS_ERR(casd)) {
539e7c5d7c0281 Laurent Pinchart 2020-07-06 698 phy_err(phy, "Failed to add subdev to notifier\n");
b01edcbd409cf7 Laurent Pinchart 2021-01-18 699 ret = PTR_ERR(casd);
a539a0536f6e22 Laurent Pinchart 2020-07-06 700 goto error;
d079f94c90469f Steve Longerbeam 2018-09-29 701 }
d079f94c90469f Steve Longerbeam 2018-09-29 702
539e7c5d7c0281 Laurent Pinchart 2020-07-06 703 casd->phy = phy;
a539a0536f6e22 Laurent Pinchart 2020-07-06 704 }
8fcb7576ad197b Laurent Pinchart 2020-07-06 705
a539a0536f6e22 Laurent Pinchart 2020-07-06 706 ret = v4l2_async_notifier_register(&cal->v4l2_dev, &cal->notifier);
343e89a792a571 Benoit Parrot 2016-01-06 707 if (ret) {
a539a0536f6e22 Laurent Pinchart 2020-07-06 708 cal_err(cal, "Error registering async notifier\n");
a539a0536f6e22 Laurent Pinchart 2020-07-06 709 goto error;
343e89a792a571 Benoit Parrot 2016-01-06 710 }
343e89a792a571 Benoit Parrot 2016-01-06 711
f5ddf19eca3328 Laurent Pinchart 2020-07-06 712 return 0;
a539a0536f6e22 Laurent Pinchart 2020-07-06 713
a539a0536f6e22 Laurent Pinchart 2020-07-06 714 error:
a539a0536f6e22 Laurent Pinchart 2020-07-06 715 v4l2_async_notifier_cleanup(&cal->notifier);
a539a0536f6e22 Laurent Pinchart 2020-07-06 716 return ret;
a539a0536f6e22 Laurent Pinchart 2020-07-06 717 }
a539a0536f6e22 Laurent Pinchart 2020-07-06 718
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
diff --git a/include/media/v4l2-async.h b/include/media/v4l2-async.h index 6f22daa6f067..3e2fe7181bee 100644 --- a/include/media/v4l2-async.h +++ b/include/media/v4l2-async.h @@ -156,42 +156,44 @@ void v4l2_async_notifier_init(struct v4l2_async_notifier *notifier); int __v4l2_async_notifier_add_subdev(struct v4l2_async_notifier *notifier, struct v4l2_async_subdev *asd); +struct v4l2_async_subdev * +__v4l2_async_notifier_add_fwnode_subdev(struct v4l2_async_notifier *notifier, + struct fwnode_handle *fwnode, + unsigned int asd_struct_size); /** * v4l2_async_notifier_add_fwnode_subdev - Allocate and add a fwnode async * subdev to the notifier's master asd_list. * * @notifier: pointer to &struct v4l2_async_notifier - * @fwnode: fwnode handle of the sub-device to be matched - * @asd_struct_size: size of the driver's async sub-device struct, including - * sizeof(struct v4l2_async_subdev). The &struct - * v4l2_async_subdev shall be the first member of - * the driver's async sub-device struct, i.e. both - * begin at the same memory address. + * @fwnode: fwnode handle of the sub-device to be matched, pointer to + * &struct fwnode_handle + * @type: Type of the driver's async sub-device struct. The &struct + * v4l2_async_subdev shall be the first member of the driver's async + * sub-device struct, i.e. both begin at the same memory address. * * Allocate a fwnode-matched asd of size asd_struct_size, and add it to the * notifiers @asd_list. The function also gets a reference of the fwnode which * is released later at notifier cleanup time. */ -struct v4l2_async_subdev * -__v4l2_async_notifier_add_fwnode_subdev(struct v4l2_async_notifier *notifier, - struct fwnode_handle *fwnode, - unsigned int asd_struct_size); -#define v4l2_async_notifier_add_fwnode_subdev(__notifier, __fwnode, __type) \ -((__type *)__v4l2_async_notifier_add_fwnode_subdev(__notifier, __fwnode, \ - sizeof(__type))) +#define v4l2_async_notifier_add_fwnode_subdev(notifier, fwnode, type) \ + ((__type *)__v4l2_async_notifier_add_fwnode_subdev(notifier, fwnode, \ + sizeof(type))) +struct v4l2_async_subdev * +__v4l2_async_notifier_add_fwnode_remote_subdev(struct v4l2_async_notifier *notif, + struct fwnode_handle *endpoint, + unsigned int asd_struct_size); /** * v4l2_async_notifier_add_fwnode_remote_subdev - Allocate and add a fwnode * remote async subdev to the * notifier's master asd_list. * - * @notif: pointer to &struct v4l2_async_notifier - * @endpoint: local endpoint pointing to the remote sub-device to be matched - * @asd_struct_size: size of the driver's async sub-device struct, including - * sizeof(struct v4l2_async_subdev). The &struct - * v4l2_async_subdev shall be the first member of - * the driver's async sub-device struct, i.e. both - * begin at the same memory address. + * @notifier: pointer to &struct v4l2_async_notifier + * @ep: local endpoint pointing to the remote sub-device to be matched, + * pointer to &struct fwnode_handle + * @type: Type of the driver's async sub-device struct. The &struct + * v4l2_async_subdev shall be the first member of the driver's async + * sub-device struct, i.e. both begin at the same memory address. * * Gets the remote endpoint of a given local endpoint, set it up for fwnode * matching and adds the async sub-device to the notifier's @asd_list. The @@ -201,36 +203,32 @@ __v4l2_async_notifier_add_fwnode_subdev(struct v4l2_async_notifier *notifier, * This is just like @v4l2_async_notifier_add_fwnode_subdev, but with the * exception that the fwnode refers to a local endpoint, not the remote one. */ -struct v4l2_async_subdev * -__v4l2_async_notifier_add_fwnode_remote_subdev(struct v4l2_async_notifier *notif, - struct fwnode_handle *endpoint, - unsigned int asd_struct_size); -#define v4l2_async_notifier_add_fwnode_remote_subdev(__notifier, __ep, __type) \ -((__type *)__v4l2_async_notifier_add_fwnode_remote_subdev(__notifier, __ep, \ - sizeof(__type))) +#define v4l2_async_notifier_add_fwnode_remote_subdev(notifier, ep, type) \ + ((type *) \ + __v4l2_async_notifier_add_fwnode_remote_subdev(notifier, ep, \ + sizeof(type))) +struct v4l2_async_subdev * +__v4l2_async_notifier_add_i2c_subdev(struct v4l2_async_notifier *notifier, + int adapter_id, unsigned short address, + unsigned int asd_struct_size); /** * v4l2_async_notifier_add_i2c_subdev - Allocate and add an i2c async * subdev to the notifier's master asd_list. * * @notifier: pointer to &struct v4l2_async_notifier - * @adapter_id: I2C adapter ID to be matched + * @adapter: I2C adapter ID to be matched * @address: I2C address of sub-device to be matched - * @asd_struct_size: size of the driver's async sub-device struct, including - * sizeof(struct v4l2_async_subdev). The &struct - * v4l2_async_subdev shall be the first member of - * the driver's async sub-device struct, i.e. both - * begin at the same memory address. + * @type: Type of the driver's async sub-device struct. The &struct + * v4l2_async_subdev shall be the first member of the driver's async + * sub-device struct, i.e. both begin at the same memory address. * - * Same as above but for I2C matched sub-devices. + * Same as v4l2_async_notifier_add_fwnode_subdev() but for I2C matched + * sub-devices. */ -struct v4l2_async_subdev * -__v4l2_async_notifier_add_i2c_subdev(struct v4l2_async_notifier *notifier, - int adapter_id, unsigned short address, - unsigned int asd_struct_size); -#define v4l2_async_notifier_add_i2c_subdev(__notifier, __adap, __addr, __type) \ -((__type *)__v4l2_async_notifier_add_i2c_subdev(__notifier, __adap, __addr, \ - sizeof(__type))) +#define v4l2_async_notifier_add_i2c_subdev(notifier, adapter, address, type) \ + ((type *)__v4l2_async_notifier_add_i2c_subdev(notifier, adapter, \ + address, sizeof(type))) /** * v4l2_async_notifier_register - registers a subdevice asynchronous notifier
Fix kerneldoc documentation for functions that add async sub-devices to notifiers. The functions themselves were improved recently but that left issues with the kerneldoc documentation. Fix them now. Also remove underscores from macro argument names. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Fixes: b01edcbd409c ("media: v4l2-async: Improve v4l2_async_notifier_add_*_subdev() API") Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> --- include/media/v4l2-async.h | 80 +++++++++++++++++++------------------- 1 file changed, 39 insertions(+), 41 deletions(-)