linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Björn Töpel" <bjorn@kernel.org>
To: 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
Cc: Alexandre Ghiti <alexghiti@rivosinc.com>
Subject: Re: [PATCH -next] drivers: perf: Fix build error by adding const to ctl_table argument of handler
Date: Tue, 12 Dec 2023 16:11:55 +0100	[thread overview]
Message-ID: <877cljsbes.fsf@all.your.base.are.belong.to.us> (raw)
In-Reply-To: <20231207083512.51792-1-alexghiti@rivosinc.com>

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>


  reply	other threads:[~2023-12-12 15:12 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 [this message]
2023-12-12 15:21     ` Conor Dooley
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=877cljsbes.fsf@all.your.base.are.belong.to.us \
    --to=bjorn@kernel.org \
    --cc=alexghiti@rivosinc.com \
    --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