linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Conor Dooley <conor@kernel.org>
To: "Björn Töpel" <bjorn@kernel.org>
Cc: Alexandre Ghiti <alexghiti@rivosinc.com>,
	lkp@intel.com, linux-mm@kvack.org, linux@weissschuh.net,
	llvm@lists.linux.dev, mcgrof@kernel.org,
	oe-kbuild-all@lists.linux.dev, linux-riscv@lists.infradead.org
Subject: Re: [PATCH -next] drivers: perf: Fix build error by adding const to ctl_table argument of handler
Date: Tue, 12 Dec 2023 15:21:04 +0000	[thread overview]
Message-ID: <20231212-garage-pellet-c6a2bd34854c@spud> (raw)
In-Reply-To: <877cljsbes.fsf@all.your.base.are.belong.to.us>

[-- Attachment #1: Type: text/plain, Size: 1711 bytes --]

On Tue, Dec 12, 2023 at 04:11:55PM +0100, Björn Töpel wrote:
> Alexandre Ghiti <alexghiti@rivosinc.com> writes:
> 
> > 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)
> 
> Adding linux-riscv.
> 
> Reviewed-by: Björn Töpel <bjorn@rivosinc.com>

There's already a patch for this:
https://lore.kernel.org/linux-riscv/20231206084642.802053-1-m.szyprowski@samsung.com/

The maintainer of the tree with the broken patch (Luis) has not deigned to
pick it up yet unfortunately. It can't go into Palmer's tree cos it will
break the build if applied there.

Cheers,
Conor.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2023-12-12 15:21 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 [this message]
2023-12-12 21:04   ` Palmer Dabbelt
2023-12-13  6:28     ` Luis Chamberlain

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=20231212-garage-pellet-c6a2bd34854c@spud \
    --to=conor@kernel.org \
    --cc=alexghiti@rivosinc.com \
    --cc=bjorn@kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux@weissschuh.net \
    --cc=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=mcgrof@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