Skip to content

Commit 3752219

Browse files
jones-drewavpatel
authored andcommitted
RISC-V: paravirt: Use correct restricted types
__le32 and __le64 types should be used with le32_to_cpu() and le64_to_cpu(), as sparse helpfully points out. Fixes: fdf68ac ("RISC-V: paravirt: Implement steal-time support") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202401011933.hL9zqmKo-lkp@intel.com/ Signed-off-by: Andrew Jones <ajones@ventanamicro.com> Reviewed-by: Atish Patra <atishp@rivosinc.com> Signed-off-by: Anup Patel <anup@brainfault.org>
1 parent 17c8e9a commit 3752219

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/riscv/kernel/paravirt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ static int pv_time_cpu_down_prepare(unsigned int cpu)
9191
static u64 pv_time_steal_clock(int cpu)
9292
{
9393
struct sbi_sta_struct *st = per_cpu_ptr(&steal_time, cpu);
94-
u32 sequence;
95-
u64 steal;
94+
__le32 sequence;
95+
__le64 steal;
9696

9797
/*
9898
* Check the sequence field before and after reading the steal

0 commit comments

Comments
 (0)