From: kernel test robot <lkp@intel.com>
To: Nhat Pham <nphamcs@gmail.com>, akpm@linux-foundation.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
hannes@cmpxchg.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, bfoster@redhat.com,
willy@infradead.org, arnd@arndb.de, linux-api@vger.kernel.org,
kernel-team@meta.com
Subject: Re: [PATCH v10 2/3] cachestat: implement cachestat syscall
Date: Sun, 19 Feb 2023 17:44:59 +0800 [thread overview]
Message-ID: <202302191728.rXGLcydi-lkp@intel.com> (raw)
In-Reply-To: <20230219073318.366189-3-nphamcs@gmail.com>
Hi Nhat,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on 1440f576022887004f719883acb094e7e0dd4944]
url: https://github.com/intel-lab-lkp/linux/commits/Nhat-Pham/workingset-refactor-LRU-refault-to-expose-refault-recency-check/20230219-153500
base: 1440f576022887004f719883acb094e7e0dd4944
patch link: https://lore.kernel.org/r/20230219073318.366189-3-nphamcs%40gmail.com
patch subject: [PATCH v10 2/3] cachestat: implement cachestat syscall
config: hexagon-randconfig-r014-20230219 (https://download.01.org/0day-ci/archive/20230219/202302191728.rXGLcydi-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project db89896bbbd2251fff457699635acbbedeead27f)
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/intel-lab-lkp/linux/commit/d691a3b4a696ab20c9c5fe86c624e9e36814523c
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Nhat-Pham/workingset-refactor-LRU-refault-to-expose-refault-recency-check/20230219-153500
git checkout d691a3b4a696ab20c9c5fe86c624e9e36814523c
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202302191728.rXGLcydi-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from mm/filemap.c:20:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/hexagon/include/asm/io.h:334:
include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __raw_readb(PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
^
In file included from mm/filemap.c:20:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/hexagon/include/asm/io.h:334:
include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
^
In file included from mm/filemap.c:20:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/hexagon/include/asm/io.h:334:
include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
>> mm/filemap.c:4035:6: warning: no previous prototype for function 'ksys_cachestat' [-Wmissing-prototypes]
long ksys_cachestat(unsigned int fd, size_t len, loff_t off,
^
mm/filemap.c:4035:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
long ksys_cachestat(unsigned int fd, size_t len, loff_t off,
^
static
7 warnings generated.
vim +/ksys_cachestat +4035 mm/filemap.c
4033
4034 #ifdef CONFIG_CACHESTAT_SYSCALL
> 4035 long ksys_cachestat(unsigned int fd, size_t len, loff_t off,
4036 struct cachestat __user *cstat, unsigned int flags)
4037 {
4038 struct fd f = fdget(fd);
4039 struct address_space *mapping;
4040 struct cachestat cs;
4041 pgoff_t first_index = off >> PAGE_SHIFT;
4042 pgoff_t last_index =
4043 len == 0 ? ULONG_MAX : (off + len - 1) >> PAGE_SHIFT;
4044
4045 if (!f.file)
4046 return -EBADF;
4047
4048 if (off < 0 || flags != 0) {
4049 fdput(f);
4050 return -EINVAL;
4051 }
4052
4053 memset(&cs, 0, sizeof(struct cachestat));
4054 mapping = f.file->f_mapping;
4055 filemap_cachestat(mapping, first_index, last_index, &cs);
4056 fdput(f);
4057
4058 if (copy_to_user(cstat, &cs, sizeof(struct cachestat)))
4059 return -EFAULT;
4060
4061 return 0;
4062 }
4063
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
next prev parent reply other threads:[~2023-02-19 9:45 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-19 7:33 [PATCH v10 0/3] cachestat: a new syscall for page cache state of files Nhat Pham
2023-02-19 7:33 ` [PATCH v10 1/3] workingset: refactor LRU refault to expose refault recency check Nhat Pham
2023-02-19 12:05 ` Matthew Wilcox
2023-02-21 8:49 ` Nhat Pham
2023-02-19 7:33 ` [PATCH v10 2/3] cachestat: implement cachestat syscall Nhat Pham
2023-02-19 9:44 ` kernel test robot [this message]
2023-02-19 9:45 ` kernel test robot
2023-02-19 9:45 ` kernel test robot
2023-02-19 10:36 ` kernel test robot
2023-02-19 12:21 ` Matthew Wilcox
2023-03-03 6:55 ` Nhat Pham
2023-03-03 7:03 ` Matthew Wilcox
2023-03-05 10:24 ` Nhat Pham
2023-03-05 10:32 ` Nhat Pham
2023-02-19 7:33 ` [PATCH v10 3/3] selftests: Add selftests for cachestat Nhat Pham
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=202302191728.rXGLcydi-lkp@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=bfoster@redhat.com \
--cc=hannes@cmpxchg.org \
--cc=kernel-team@meta.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=llvm@lists.linux.dev \
--cc=nphamcs@gmail.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=willy@infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).