All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexandre Ghiti <alexghiti@rivosinc.com>
To: lkp@intel.com, linux-mm@kvack.org, linux@weissschuh.net,
	llvm@lists.linux.dev, mcgrof@kernel.org,
	oe-kbuild-all@lists.linux.dev
Cc: Alexandre Ghiti <alexghiti@rivosinc.com>
Subject: [PATCH -next] drivers: perf: Fix build error by adding const to ctl_table argument of handler
Date: Thu,  7 Dec 2023 09:35:12 +0100	[thread overview]
Message-ID: <20231207083512.51792-1-alexghiti@rivosinc.com> (raw)
In-Reply-To: <202312062242.RFPPozG9-lkp@intel.com>

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)
 {
-- 
2.39.2


  reply	other threads:[~2023-12-07  8:35 UTC|newest]

Thread overview: 8+ 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 ` Alexandre Ghiti [this message]
2023-12-12 15:11   ` [PATCH -next] drivers: perf: Fix build error by adding const to ctl_table argument of handler Björn Töpel
2023-12-12 15:11     ` Björn Töpel
2023-12-12 15:21     ` Conor Dooley
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=20231207083512.51792-1-alexghiti@rivosinc.com \
    --to=alexghiti@rivosinc.com \
    --cc=linux-mm@kvack.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.