Re: [PATCH v3 2/3] RISC-V: KVM: Use unsigned int for vma_pageshift

Anup Patel <[email protected]> Wed, 29 Jul 2026 21:39:16 +0530
Newsgroups org.infradead.lists.linux-riscv,org.infradead.lists.kvm-riscv,org.kernel.vger.kvm,org.kernel.vger.linux-kernel,org.kernel.vger.stable
Message-ID <CAAhSdy0Bn3N+weuszLa3VX6rJHRoXRSwqEf3MZEoSJXy6=cwxw@mail.gmail.com>
On Wed, Jul 29, 2026 at 5:37 PM Bingyu.Xian <[email protected]> wrote:
>
> vma_pageshift in kvm_riscv_mmu_map() was declared short.  Use unsigned
> int, the conventional kernel type for bit widths and shift counts, in
> preparation for sharing a common struct kvm_page_fault across
> architectures.  No functional change.
>
> Assisted-by: YuanSheng: deepseek-v4-pro
> Co-developed-by: Quan Zhou <[email protected]>
> Signed-off-by: Quan Zhou <[email protected]>
> Signed-off-by: Bingyu Xian <[email protected]>

LGTM.

Reviewed-by: Anup Patel <[email protected]>

Queued this patch for Linux-7.3

Thanks,
Anup

> ---
>  arch/riscv/kvm/mmu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/riscv/kvm/mmu.c b/arch/riscv/kvm/mmu.c
> index 943d8dc72105..d2a06a54be17 100644
> --- a/arch/riscv/kvm/mmu.c
> +++ b/arch/riscv/kvm/mmu.c
> @@ -541,7 +541,7 @@ int kvm_riscv_mmu_map(struct kvm_vcpu *vcpu, struct kvm_memory_slot *memslot,
>         kvm_pfn_t hfn;
>         bool is_hugetlb;
>         bool writable;
> -       short vma_pageshift;
> +       unsigned int vma_pageshift;
>         gfn_t gfn = gpa >> PAGE_SHIFT;
>         struct vm_area_struct *vma;
>         struct kvm *kvm = vcpu->kvm;
> --
> 2.54.0
>

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv