Re: [PATCH] uacce: Add uacce_ctrl misc device

From: kernel test robot
Date: Thu Jan 21 2021 - 08:32:07 EST


Hi Zhou,

I love your patch! Perhaps something to improve:

[auto build test WARNING on char-misc/char-misc-testing]
[also build test WARNING on soc/for-next linux/master linus/master v5.11-rc4 next-20210121]
[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/Zhou-Wang/uacce-Add-uacce_ctrl-misc-device/20210121-172139
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git f6f1f8e6e3eea25f539105d48166e91f0ab46dd1
config: x86_64-randconfig-r014-20210121 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 22b68440e1647e16b5ee24b924986207173c02d1)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/0day-ci/linux/commit/4dc40d891a7e60ed79e6b9460a38a142d3d1a965
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Zhou-Wang/uacce-Add-uacce_ctrl-misc-device/20210121-172139
git checkout 4dc40d891a7e60ed79e6b9460a38a142d3d1a965
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64

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

All warnings (new ones prefixed by >>):

>> drivers/misc/uacce/uacce.c:511:5: warning: no previous prototype for function 'uacce_ctrl_open' [-Wmissing-prototypes]
int uacce_ctrl_open(struct inode *inode, struct file *file)
^
drivers/misc/uacce/uacce.c:511:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int uacce_ctrl_open(struct inode *inode, struct file *file)
^
static
>> drivers/misc/uacce/uacce.c:525:5: warning: no previous prototype for function 'uacce_ctrl_release' [-Wmissing-prototypes]
int uacce_ctrl_release(struct inode *inode, struct file *file)
^
drivers/misc/uacce/uacce.c:525:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int uacce_ctrl_release(struct inode *inode, struct file *file)
^
static
drivers/misc/uacce/uacce.c:626:6: warning: unused variable 'ret' [-Wunused-variable]
int ret;
^
3 warnings generated.


vim +/uacce_ctrl_open +511 drivers/misc/uacce/uacce.c

510
> 511 int uacce_ctrl_open(struct inode *inode, struct file *file)
512 {
513 struct uacce_pin_container *p;
514
515 p = kzalloc(sizeof(*p), GFP_KERNEL);
516 if (!p)
517 return -ENOMEM;
518 file->private_data = p;
519
520 xa_init(&p->array);
521
522 return 0;
523 }
524
> 525 int uacce_ctrl_release(struct inode *inode, struct file *file)
526 {
527 struct uacce_pin_container *priv = file->private_data;
528 struct pin_pages *p;
529 unsigned long idx;
530
531 xa_for_each(&priv->array, idx, p) {
532 unpin_user_pages(p->pages, p->nr_pages);
533 xa_erase(&priv->array, p->first);
534 vfree(p->pages);
535 kfree(p);
536 }
537
538 xa_destroy(&priv->array);
539 kfree(priv);
540
541 return 0;
542 }
543

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip