Skip to content

Conversation

@linux-riscv-bot
Copy link

PR for series 1045343 applied to workflow__riscv__fixes

Name: riscv: Add intermediate cast to 'unsigned long' in __get_user_asm
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1045343
Version: 1

After commit bdce162 ("riscv: Use 64-bit variable for output in
__get_user_asm"), there is a warning when building for 32-bit RISC-V:

  In file included from include/linux/uaccess.h:13,
                   from include/linux/sched/task.h:13,
                   from include/linux/sched/signal.h:9,
                   from include/linux/rcuwait.h:6,
                   from include/linux/mm.h:36,
                   from include/linux/migrate.h:5,
                   from mm/migrate.c:16:
  mm/migrate.c: In function 'do_pages_move':
  arch/riscv/include/asm/uaccess.h:115:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    115 |         (x) = (__typeof__(x))__tmp;                             \
        |               ^
  arch/riscv/include/asm/uaccess.h:198:17: note: in expansion of macro '__get_user_asm'
    198 |                 __get_user_asm("lb", (x), __gu_ptr, label);     \
        |                 ^~~~~~~~~~~~~~
  arch/riscv/include/asm/uaccess.h:218:9: note: in expansion of macro '__get_user_nocheck'
    218 |         __get_user_nocheck(x, ptr, __gu_failed);                        \
        |         ^~~~~~~~~~~~~~~~~~
  arch/riscv/include/asm/uaccess.h:255:9: note: in expansion of macro '__get_user_error'
    255 |         __get_user_error(__gu_val, __gu_ptr, __gu_err);         \
        |         ^~~~~~~~~~~~~~~~
  arch/riscv/include/asm/uaccess.h:285:17: note: in expansion of macro '__get_user'
    285 |                 __get_user((x), __p) :                          \
        |                 ^~~~~~~~~~
  mm/migrate.c:2358:29: note: in expansion of macro 'get_user'
   2358 |                         if (get_user(p, pages + i))
        |                             ^~~~~~~~

Add an intermediate cast to 'unsigned long', which is guaranteed to be the same
width as a pointer, before the cast to the type of the output variable to clear
up the warning.

Fixes: bdce162 ("riscv: Use 64-bit variable for output in __get_user_asm")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202601210526.OT45dlOZ-lkp@intel.com/
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
@linux-riscv-bot
Copy link
Author

Patch 1: "riscv: Add intermediate cast to 'unsigned long' in __get_user_asm"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 114.68 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "riscv: Add intermediate cast to 'unsigned long' in __get_user_asm"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 2460.00 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "riscv: Add intermediate cast to 'unsigned long' in __get_user_asm"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 3088.21 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "riscv: Add intermediate cast to 'unsigned long' in __get_user_asm"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 25.10 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "riscv: Add intermediate cast to 'unsigned long' in __get_user_asm"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 26.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "riscv: Add intermediate cast to 'unsigned long' in __get_user_asm"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 0.91 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "riscv: Add intermediate cast to 'unsigned long' in __get_user_asm"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 80.50 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "riscv: Add intermediate cast to 'unsigned long' in __get_user_asm"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "riscv: Add intermediate cast to 'unsigned long' in __get_user_asm"
kdoc
Desc: Detects for kdoc errors
Duration: 0.98 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "riscv: Add intermediate cast to 'unsigned long' in __get_user_asm"
module-param
Desc: Detect module_param changes
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "riscv: Add intermediate cast to 'unsigned long' in __get_user_asm"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.26 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "riscv: Add intermediate cast to 'unsigned long' in __get_user_asm"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.28 seconds
Result: PASS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants