mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Christian Brauner <brauner@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: include/linux/fs.h:3645:15: error: unexpected token, expected comma
Date: Tue, 20 Aug 2024 06:18:45 +0800	[thread overview]
Message-ID: <202408200611.zhKlMvry-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   6e4436539ae182dc86d57d13849862bcafaa4709
commit: 27a2d0cb2f38c67b58285e6124b14f7fff3fd1a8 stat: use vfs_empty_path() helper
date:   8 weeks ago
config: mips-randconfig-r111-20240819 (https://download.01.org/0day-ci/archive/20240820/202408200611.zhKlMvry-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 26670e7fa4f032a019d23d56c6a02926e854e8af)
reproduce: (https://download.01.org/0day-ci/archive/20240820/202408200611.zhKlMvry-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/202408200611.zhKlMvry-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from fs/stat.c:8:
   In file included from include/linux/blkdev.h:9:
   In file included from include/linux/blk_types.h:10:
   In file included from include/linux/bvec.h:10:
   In file included from include/linux/highmem.h:8:
   In file included from include/linux/cacheflush.h:5:
   In file included from arch/mips/include/asm/cacheflush.h:13:
   In file included from include/linux/mm.h:2253:
   include/linux/vmstat.h:514:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     514 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
   In file included from fs/stat.c:8:
   In file included from include/linux/blkdev.h:9:
   In file included from include/linux/blk_types.h:10:
   In file included from include/linux/bvec.h:10:
   In file included from include/linux/highmem.h:5:
>> include/linux/fs.h:3645:15: error: unexpected token, expected comma
    3645 |         if (unlikely(get_user(c, path)))
         |                      ^
   arch/mips/include/asm/uaccess.h:97:33: note: expanded from macro 'get_user'
      97 |         access_ok(__p, sizeof(*__p)) ? __get_user((x), __p) :           \
         |                                        ^
   arch/mips/include/asm/uaccess.h:177:23: note: expanded from macro '__get_user'
     177 |                 __get_data_asm((x), user_lb, __gu_ptr);                 \
         |                                     ^
   <inline asm>:3:10: note: instantiated into assembly here
       3 |         .set    eva
         |                    ^
   In file included from fs/stat.c:8:
   In file included from include/linux/blkdev.h:9:
   In file included from include/linux/blk_types.h:10:
   In file included from include/linux/bvec.h:10:
   In file included from include/linux/highmem.h:5:
>> include/linux/fs.h:3645:15: error: invalid operand for instruction
    3645 |         if (unlikely(get_user(c, path)))
         |                      ^
   arch/mips/include/asm/uaccess.h:97:33: note: expanded from macro 'get_user'
      97 |         access_ok(__p, sizeof(*__p)) ? __get_user((x), __p) :           \
         |                                        ^
   arch/mips/include/asm/uaccess.h:177:23: note: expanded from macro '__get_user'
     177 |                 __get_data_asm((x), user_lb, __gu_ptr);                 \
         |                                     ^
   <inline asm>:4:11: note: instantiated into assembly here
       4 |         lbe $21, 0($18)
         |                  ^
   1 warning and 2 errors generated.


vim +3645 include/linux/fs.h

90f8572b0f021f Eric W. Biederman 2015-06-29  3627  
45cd0faae3715e Amir Goldstein    2018-08-27  3628  /* mm/fadvise.c */
45cd0faae3715e Amir Goldstein    2018-08-27  3629  extern int vfs_fadvise(struct file *file, loff_t offset, loff_t len,
45cd0faae3715e Amir Goldstein    2018-08-27  3630  		       int advice);
cf1ea0592dbf10 Jan Kara          2019-08-29  3631  extern int generic_fadvise(struct file *file, loff_t offset, loff_t len,
cf1ea0592dbf10 Jan Kara          2019-08-29  3632  			   int advice);
45cd0faae3715e Amir Goldstein    2018-08-27  3633  
1bc6d4452d5c91 Christian Brauner 2024-04-30  3634  static inline bool vfs_empty_path(int dfd, const char __user *path)
1bc6d4452d5c91 Christian Brauner 2024-04-30  3635  {
1bc6d4452d5c91 Christian Brauner 2024-04-30  3636  	char c;
1bc6d4452d5c91 Christian Brauner 2024-04-30  3637  
1bc6d4452d5c91 Christian Brauner 2024-04-30  3638  	if (dfd < 0)
1bc6d4452d5c91 Christian Brauner 2024-04-30  3639  		return false;
1bc6d4452d5c91 Christian Brauner 2024-04-30  3640  
1bc6d4452d5c91 Christian Brauner 2024-04-30  3641  	/* We now allow NULL to be used for empty path. */
1bc6d4452d5c91 Christian Brauner 2024-04-30  3642  	if (!path)
1bc6d4452d5c91 Christian Brauner 2024-04-30  3643  		return true;
1bc6d4452d5c91 Christian Brauner 2024-04-30  3644  
1bc6d4452d5c91 Christian Brauner 2024-04-30 @3645  	if (unlikely(get_user(c, path)))
1bc6d4452d5c91 Christian Brauner 2024-04-30  3646  		return false;
1bc6d4452d5c91 Christian Brauner 2024-04-30  3647  
1bc6d4452d5c91 Christian Brauner 2024-04-30  3648  	return !c;
1bc6d4452d5c91 Christian Brauner 2024-04-30  3649  }
1bc6d4452d5c91 Christian Brauner 2024-04-30  3650  

:::::: The code at line 3645 was first introduced by commit
:::::: 1bc6d4452d5c91beb09e37a98a590808e1997b79 fs: new helper vfs_empty_path()

:::::: TO: Christian Brauner <brauner@kernel.org>
:::::: CC: Christian Brauner <brauner@kernel.org>

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

                 reply	other threads:[~2024-08-19 22:19 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=202408200611.zhKlMvry-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=brauner@kernel.org \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®