From: kernel test robot <lkp@intel.com>
To: Alexandre Ghiti <alexghiti@rivosinc.com>
Cc: oe-kbuild-all@lists.linux.dev,
Linux Memory Management List <linux-mm@kvack.org>,
Palmer Dabbelt <palmer@rivosinc.com>
Subject: [linux-next:master 6674/7300] drivers/perf/riscv_pmu_sbi.c:1015:35: error: initialization of 'int (*)(struct ctl_table *, int, void *, size_t *, loff_t *)' {aka 'int (*)(struct ctl_table *, int, void *, long unsigned int *, long long int *)'} from incompatible pointer type 'int (*)(...
Date: Wed, 13 Dec 2023 15:47:27 +0800 [thread overview]
Message-ID: <202312131509.n6cZrTLi-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 48e8992e33abf054bcc0bb2e77b2d43bb899212e
commit: 0bd6bc435f7db3e22acb410b721e97a97463c51c [6674/7300] drivers: perf: Fix build error by adding const to ctl_table argument of handler
config: riscv-defconfig (https://download.01.org/0day-ci/archive/20231213/202312131509.n6cZrTLi-lkp@intel.com/config)
compiler: riscv64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231213/202312131509.n6cZrTLi-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/202312131509.n6cZrTLi-lkp@intel.com/
Note: the linux-next/master HEAD 48e8992e33abf054bcc0bb2e77b2d43bb899212e builds fine.
It may have been fixed somewhere.
All errors (new ones prefixed by >>):
drivers/perf/riscv_pmu_sbi.c: In function 'riscv_pmu_proc_user_access_handler':
drivers/perf/riscv_pmu_sbi.c:994:40: warning: passing argument 1 of 'proc_dointvec_minmax' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
994 | int ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos);
| ^~~~~
In file included from include/linux/key.h:17,
from include/linux/cred.h:13,
from include/linux/sched/signal.h:10,
from include/linux/rcuwait.h:6,
from include/linux/percpu-rwsem.h:7,
from include/linux/fs.h:33,
from include/linux/perf_event.h:49,
from include/linux/perf/riscv_pmu.h:12,
from drivers/perf/riscv_pmu_sbi.c:14:
include/linux/sysctl.h:72:26: note: expected 'struct ctl_table *' but argument is of type 'const struct ctl_table *'
72 | int proc_dointvec_minmax(struct ctl_table *, int, void *, size_t *, loff_t *);
| ^~~~~~~~~~~~~~~~~~
drivers/perf/riscv_pmu_sbi.c: At top level:
>> drivers/perf/riscv_pmu_sbi.c:1015:35: error: initialization of 'int (*)(struct ctl_table *, int, void *, size_t *, loff_t *)' {aka 'int (*)(struct ctl_table *, int, void *, long unsigned int *, long long int *)'} from incompatible pointer type 'int (*)(const struct ctl_table *, int, void *, size_t *, loff_t *)' {aka 'int (*)(const struct ctl_table *, int, void *, long unsigned int *, long long int *)'} [-Werror=incompatible-pointer-types]
1015 | .proc_handler = riscv_pmu_proc_user_access_handler,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/perf/riscv_pmu_sbi.c:1015:35: note: (near initialization for 'sbi_pmu_sysctl_table[0].proc_handler')
cc1: some warnings being treated as errors
vim +1015 drivers/perf/riscv_pmu_sbi.c
cc4c07c89aada1 Alexandre Ghiti 2023-08-02 1008
cc4c07c89aada1 Alexandre Ghiti 2023-08-02 1009 static struct ctl_table sbi_pmu_sysctl_table[] = {
cc4c07c89aada1 Alexandre Ghiti 2023-08-02 1010 {
cc4c07c89aada1 Alexandre Ghiti 2023-08-02 1011 .procname = "perf_user_access",
cc4c07c89aada1 Alexandre Ghiti 2023-08-02 1012 .data = &sysctl_perf_user_access,
cc4c07c89aada1 Alexandre Ghiti 2023-08-02 1013 .maxlen = sizeof(unsigned int),
cc4c07c89aada1 Alexandre Ghiti 2023-08-02 1014 .mode = 0644,
cc4c07c89aada1 Alexandre Ghiti 2023-08-02 @1015 .proc_handler = riscv_pmu_proc_user_access_handler,
cc4c07c89aada1 Alexandre Ghiti 2023-08-02 1016 .extra1 = SYSCTL_ZERO,
cc4c07c89aada1 Alexandre Ghiti 2023-08-02 1017 .extra2 = SYSCTL_TWO,
cc4c07c89aada1 Alexandre Ghiti 2023-08-02 1018 },
cc4c07c89aada1 Alexandre Ghiti 2023-08-02 1019 { }
cc4c07c89aada1 Alexandre Ghiti 2023-08-02 1020 };
cc4c07c89aada1 Alexandre Ghiti 2023-08-02 1021
:::::: The code at line 1015 was first introduced by commit
:::::: cc4c07c89aada16229084eeb93895c95b7eabaa3 drivers: perf: Implement perf event mmap support in the SBI backend
:::::: TO: Alexandre Ghiti <alexghiti@rivosinc.com>
:::::: CC: Palmer Dabbelt <palmer@rivosinc.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2023-12-13 7:47 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=202312131509.n6cZrTLi-lkp@intel.com \
--to=lkp@intel.com \
--cc=alexghiti@rivosinc.com \
--cc=linux-mm@kvack.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=palmer@rivosinc.com \
/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