Re: [PATCH] udmabuf: put dmabuf in case of get fd failed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Xianting,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.16-rc6 next-20211217]
[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/Xianting-Tian/udmabuf-put-dmabuf-in-case-of-get-fd-failed/20211220-134433
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git a7904a538933c525096ca2ccde1e60d0ee62c08e
config: x86_64-randconfig-r024-20211220 (https://download.01.org/0day-ci/archive/20211220/202112202114.4rnU3YZF-lkp@xxxxxxxxx/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 555eacf75f21cd1dfc6363d73ad187b730349543)
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/322781a4da9de4a3057afd933108d23ca7f5282e
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Xianting-Tian/udmabuf-put-dmabuf-in-case-of-get-fd-failed/20211220-134433
        git checkout 322781a4da9de4a3057afd933108d23ca7f5282e
        # 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=x86_64 SHELL=/bin/bash drivers/dma-buf/

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/dma-buf/udmabuf.c:293:1: error: function definition is not allowed here
   {
   ^
   drivers/dma-buf/udmabuf.c:312:1: error: function definition is not allowed here
   {
   ^
   drivers/dma-buf/udmabuf.c:334:1: error: function definition is not allowed here
   {
   ^
   drivers/dma-buf/udmabuf.c:353:20: error: use of undeclared identifier 'udmabuf_ioctl'
           .unlocked_ioctl = udmabuf_ioctl,
                             ^
   drivers/dma-buf/udmabuf.c:355:20: error: use of undeclared identifier 'udmabuf_ioctl'
           .compat_ioctl   = udmabuf_ioctl,
                             ^
   drivers/dma-buf/udmabuf.c:366:1: error: function definition is not allowed here
   {
   ^
   drivers/dma-buf/udmabuf.c:371:1: error: function definition is not allowed here
   {
   ^
   drivers/dma-buf/udmabuf.c:375:13: error: use of undeclared identifier 'udmabuf_dev_init'
   module_init(udmabuf_dev_init)
               ^
   drivers/dma-buf/udmabuf.c:375:13: error: use of undeclared identifier 'udmabuf_dev_init'
   drivers/dma-buf/udmabuf.c:376:13: error: use of undeclared identifier 'udmabuf_dev_exit'
   module_exit(udmabuf_dev_exit)
               ^
   drivers/dma-buf/udmabuf.c:379:26: error: expected '}'
   MODULE_LICENSE("GPL v2");
                            ^
   drivers/dma-buf/udmabuf.c:166:1: note: to match this '{'
   {
   ^
>> drivers/dma-buf/udmabuf.c:351:37: warning: ISO C90 forbids mixing declarations and code [-Wdeclaration-after-statement]
   static const struct file_operations udmabuf_fops = {
                                       ^
   1 warning and 11 errors generated.


vim +351 drivers/dma-buf/udmabuf.c

fbb0de79507819 Gerd Hoffmann          2018-08-27  350  
fbb0de79507819 Gerd Hoffmann          2018-08-27 @351  static const struct file_operations udmabuf_fops = {
fbb0de79507819 Gerd Hoffmann          2018-08-27  352  	.owner		= THIS_MODULE,
fbb0de79507819 Gerd Hoffmann          2018-08-27  353  	.unlocked_ioctl = udmabuf_ioctl,
d4a197f4047e01 Kristian H. Kristensen 2020-09-03  354  #ifdef CONFIG_COMPAT
d4a197f4047e01 Kristian H. Kristensen 2020-09-03  355  	.compat_ioctl   = udmabuf_ioctl,
d4a197f4047e01 Kristian H. Kristensen 2020-09-03  356  #endif
fbb0de79507819 Gerd Hoffmann          2018-08-27  357  };
fbb0de79507819 Gerd Hoffmann          2018-08-27  358  

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



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux