]> www.infradead.org Git - users/hch/misc.git/commit
ubi: ubi_get_ec_info: Fix compiling error 'cast specifies array type'
authorZhihao Cheng <chengzhihao1@huawei.com>
Mon, 20 Jan 2025 04:38:24 +0000 (12:38 +0800)
committerRichard Weinberger <richard@nod.at>
Mon, 20 Jan 2025 08:09:24 +0000 (09:09 +0100)
commit69146a8c893f734cefaac0af6f917f894f29077e
tree3cad8de523ddac18cf6a7e0594ff5e9e6cee977f
parent01099f635a4c68b8574d350a972ba062dd5142e9
ubi: ubi_get_ec_info: Fix compiling error 'cast specifies array type'

On risc V platform, there is a type conversion for the return value
(unsigned long type) of __untagged_addr_remote() in function
untagged_addr(). The compiler will complain when the parameter 'addr'
is an array type:
  arch/riscv/include/asm/uaccess.h:33:9: error: cast specifies array type
  (__force  __typeof__(addr))__untagged_addr_remote(current->mm, __addr)

Fix it by converting the input parameter as a pointer.

Fixes: 01099f635a4c ("ubi: Implement ioctl for detailed erase counters")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202501191405.WYnmdL0U-lkp@intel.com/
Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
drivers/mtd/ubi/cdev.c