All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jesse Taube <jesse@rivosinc.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Anup Patel <anup@brainfault.org>
Subject: [avpatel:riscv_acpi_apei_v1 32/55] arch/riscv/kernel/kgdb.c:38:31: error: incompatible integer to pointer conversion passing 'unsigned int' to parameter of type 'ulong *' (aka 'unsigned long *')
Date: Mon, 11 Aug 2025 17:59:32 +0800	[thread overview]
Message-ID: <202508111709.XQryIX6L-lkp@intel.com> (raw)

tree:   https://github.com/avpatel/linux.git riscv_acpi_apei_v1
head:   eaca137f211dcb260f7eb52d983ddad7f27277f3
commit: 87868b1826434a428632177d565fce3d8ebe43dd [32/55] riscv: Add insn.c, consolidate instruction decoding
config: riscv-randconfig-002-20250811 (https://download.01.org/0day-ci/archive/20250811/202508111709.XQryIX6L-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 3769ce013be2879bf0b329c14a16f5cb766f26ce)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250811/202508111709.XQryIX6L-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/202508111709.XQryIX6L-lkp@intel.com/

All errors (new ones prefixed by >>):

>> arch/riscv/kernel/kgdb.c:38:31: error: incompatible integer to pointer conversion passing 'unsigned int' to parameter of type 'ulong *' (aka 'unsigned long *') [-Wint-conversion]
      38 |         error = get_insn(regs, addr, stepped_opcode);
         |                                      ^~~~~~~~~~~~~~
   arch/riscv/include/asm/insn.h:555:54: note: passing argument to parameter 'r_insn' here
     555 | int get_insn(struct pt_regs *regs, ulong epc, ulong *r_insn);
         |                                                      ^
   1 error generated.


vim +38 arch/riscv/kernel/kgdb.c

    25	
    26	static int do_single_step(struct pt_regs *regs)
    27	{
    28		/* Determine where the target instruction will send us to */
    29		unsigned long addr, insn;
    30		int error = get_insn(regs, regs->epc, &insn);
    31	
    32		if (error)
    33			return error;
    34	
    35		addr = get_step_address(regs, insn);
    36	
    37		/* Store the op code in the stepped address */
  > 38		error = get_insn(regs, addr, stepped_opcode);
    39		if (error)
    40			return error;
    41	
    42		stepped_address = addr;
    43	
    44		/* Replace the op code with the break instruction */
    45		error = copy_to_kernel_nofault((void *)stepped_address,
    46					   arch_kgdb_ops.gdb_bpt_instr,
    47					   BREAK_INSTR_SIZE);
    48		/* Flush and return */
    49		if (!error) {
    50			flush_icache_range(addr, addr + BREAK_INSTR_SIZE);
    51			kgdb_single_step = 1;
    52			atomic_set(&kgdb_cpu_doing_single_step,
    53				   raw_smp_processor_id());
    54		} else {
    55			stepped_address = 0;
    56			stepped_opcode = 0;
    57		}
    58		return error;
    59	}
    60	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2025-08-11 10:00 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=202508111709.XQryIX6L-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=anup@brainfault.org \
    --cc=jesse@rivosinc.com \
    --cc=llvm@lists.linux.dev \
    --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.