From: Luis Chamberlain <mcgrof@kernel.org>
To: "Palmer Dabbelt" <palmer@dabbelt.com>,
"Thomas Weißschuh" <linux@weissschuh.net>
Cc: alexghiti@rivosinc.com, lkp@intel.com, linux-mm@kvack.org,
linux@weissschuh.net, llvm@lists.linux.dev,
oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH -next] drivers: perf: Fix build error by adding const to ctl_table argument of handler
Date: Tue, 12 Dec 2023 22:28:35 -0800 [thread overview]
Message-ID: <ZXlPE0wYev3RUZsA@bombadil.infradead.org> (raw)
In-Reply-To: <mhng-eda68e75-0733-4b42-b2a8-3e4696bde0db@palmer-ri-x1c9a>
On Tue, Dec 12, 2023 at 01:04:41PM -0800, Palmer Dabbelt wrote:
> On Thu, 07 Dec 2023 00:35:12 PST (-0800), alexghiti@rivosinc.com wrote:
> > The ctl_table argument of the proc_handler field was constified treewide
> > but somehow missed the occurrence in the riscv pmu sbi driver, so add the
> > const to fix the build error.
> >
> > Reported-by: kernel test robot <lkp@intel.com>
> > Closes: https://lore.kernel.org/oe-kbuild-all/202312062242.RFPPozG9-lkp@intel.com/
> > Fixes: c8be9e66ca1e ("sysctl: treewide: constify the ctl_table argument of handlers")
> > Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
> > ---
> > drivers/perf/riscv_pmu_sbi.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/perf/riscv_pmu_sbi.c b/drivers/perf/riscv_pmu_sbi.c
> > index 16acd4dcdb96..97e345f7d25d 100644
> > --- a/drivers/perf/riscv_pmu_sbi.c
> > +++ b/drivers/perf/riscv_pmu_sbi.c
> > @@ -986,7 +986,7 @@ static void riscv_pmu_update_counter_access(void *info)
> > csr_write(CSR_SCOUNTEREN, 0x2);
> > }
> >
> > -static int riscv_pmu_proc_user_access_handler(struct ctl_table *table,
> > +static int riscv_pmu_proc_user_access_handler(const struct ctl_table *table,
> > int write, void *buffer,
> > size_t *lenp, loff_t *ppos)
> > {
>
> Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com>
> Acked-by: Palmer Dabbelt <palmer@rivosinc.com>
Same here, Thomas please fold into your series as you are working on a
new series.
Luis
prev parent reply other threads:[~2023-12-13 6:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-06 14:11 [linux-next:master 5063/5273] drivers/perf/riscv_pmu_sbi.c:1008:19: error: incompatible function pointer types initializing 'proc_handler *' (aka 'int (*)(const struct ctl_table *, int, void *, unsigned long *, long long *)') with an expression of type 'int (struct ctl_table *, int, v kernel test robot
2023-12-07 8:35 ` [PATCH -next] drivers: perf: Fix build error by adding const to ctl_table argument of handler Alexandre Ghiti
2023-12-12 15:11 ` Björn Töpel
2023-12-12 15:21 ` Conor Dooley
2023-12-12 21:04 ` Palmer Dabbelt
2023-12-13 6:28 ` Luis Chamberlain [this message]
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=ZXlPE0wYev3RUZsA@bombadil.infradead.org \
--to=mcgrof@kernel.org \
--cc=alexghiti@rivosinc.com \
--cc=linux-mm@kvack.org \
--cc=linux@weissschuh.net \
--cc=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=palmer@dabbelt.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