All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kernel@openeuler.org, fanyizhen1995 <en_0015767@163.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [openeuler:OLK-5.10 2516/2516] drivers/ub/urma/uburma/uburma_dev_ops.c:32:5: warning: no previous prototype for 'uburma_mmap'
Date: Tue, 3 Dec 2024 09:33:13 +0800	[thread overview]
Message-ID: <202412030936.hofHSOhc-lkp@intel.com> (raw)

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

                 reply	other threads:[~2024-12-03  1:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202412030936.hofHSOhc-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=en_0015767@163.com \
    --cc=kernel@openeuler.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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 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.