All of lore.kernel.org
 help / color / mirror / Atom feed
* [openeuler:OLK-5.10 2516/2516] drivers/ub/urma/uburma/uburma_dev_ops.c:32:5: warning: no previous prototype for 'uburma_mmap'
@ 2024-12-03  1:33 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-12-03  1:33 UTC (permalink / raw)
  To: kernel, fanyizhen1995; +Cc: oe-kbuild-all

Hi Yizhen,

FYI, the error/warning still remains.

tree:   https://gitee.com/openeuler/kernel.git OLK-5.10
head:   929a9df37c1b7dec73fd417d79a116d02a8f9380
commit: 7d130c6018dbfd09c6e1c5d91b347fdbf3924321 [2516/2516] ub: add mmap ops support in ubcore and uburma
config: arm64-randconfig-003-20241203 (https://download.01.org/0day-ci/archive/20241203/202412030936.hofHSOhc-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241203/202412030936.hofHSOhc-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202412030936.hofHSOhc-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/ub/urma/uburma/uburma_dev_ops.c:32:5: warning: no previous prototype for 'uburma_mmap' [-Wmissing-prototypes]
      32 | int uburma_mmap(struct file *filp, struct vm_area_struct *vma)
         |     ^~~~~~~~~~~
   drivers/ub/urma/uburma/uburma_dev_ops.c:64:6: warning: no previous prototype for 'uburma_release_file' [-Wmissing-prototypes]
      64 | void uburma_release_file(struct kref *ref)
         |      ^~~~~~~~~~~~~~~~~~~
   drivers/ub/urma/uburma/uburma_dev_ops.c:81:5: warning: no previous prototype for 'uburma_open' [-Wmissing-prototypes]
      81 | int uburma_open(struct inode *inode, struct file *filp)
         |     ^~~~~~~~~~~
   drivers/ub/urma/uburma/uburma_dev_ops.c: In function 'uburma_open':
   drivers/ub/urma/uburma/uburma_dev_ops.c:98:50: warning: the comparison will always evaluate as 'false' for the address of 'dev_name' will never be NULL [-Waddress]
      98 |         if (ubc_dev == NULL || ubc_dev->dev_name == NULL) {
         |                                                  ^~
   In file included from drivers/ub/urma/uburma/uburma_dev_ops.c:25:
   include/urma/ubcore_types.h:1589:14: note: 'dev_name' declared here
    1589 |         char dev_name[UBCORE_MAX_DEV_NAME];
         |              ^~~~~~~~
   drivers/ub/urma/uburma/uburma_dev_ops.c: At top level:
   drivers/ub/urma/uburma/uburma_dev_ops.c:134:5: warning: no previous prototype for 'uburma_close' [-Wmissing-prototypes]
     134 | int uburma_close(struct inode *inode, struct file *filp)
         |     ^~~~~~~~~~~~


vim +/uburma_mmap +32 drivers/ub/urma/uburma/uburma_dev_ops.c

    31	
  > 32	int uburma_mmap(struct file *filp, struct vm_area_struct *vma)
    33	{
    34		struct uburma_file *file = filp->private_data;
    35		struct uburma_device *ubu_dev;
    36		struct ubcore_device *ubc_dev;
    37		int srcu_idx;
    38		int ret;
    39	
    40		if (file == NULL || file->ucontext == NULL) {
    41			uburma_log_err("can not find ucontext.\n");
    42			return -EINVAL;
    43		}
    44	
    45		ubu_dev = file->ubu_dev;
    46		uburma_cmd_inc(ubu_dev);
    47	
    48		srcu_idx = srcu_read_lock(&ubu_dev->ubc_dev_srcu);
    49		ubc_dev = srcu_dereference(ubu_dev->ubc_dev, &ubu_dev->ubc_dev_srcu);
    50		if (ubc_dev == NULL || ubc_dev->ops == NULL || ubc_dev->ops->mmap == NULL) {
    51			uburma_log_err("can not find ubcore device.\n");
    52			ret = -ENODEV;
    53			goto out;
    54		}
    55	
    56		ret = ubc_dev->ops->mmap(file->ucontext, vma);
    57	
    58	out:
    59		srcu_read_unlock(&ubu_dev->ubc_dev_srcu, srcu_idx);
    60		uburma_cmd_dec(ubu_dev);
    61		return ret;
    62	}
    63	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-12-03  1:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-03  1:33 [openeuler:OLK-5.10 2516/2516] drivers/ub/urma/uburma/uburma_dev_ops.c:32:5: warning: no previous prototype for 'uburma_mmap' kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.