Skip to content

Commit de56fb1

Browse files
wildea01chazy
authored andcommitted
KVM: vgic: declare probe function pointer as const
We extract the vgic probe function from the of_device_id data pointer, which is const. Kill the sparse warning by ensuring that the local function pointer is also marked as const. Cc: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
1 parent 1fa451b commit de56fb1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎virt/kvm/arm/vgic.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1557,8 +1557,8 @@ static const struct of_device_id vgic_ids[] = {
15571557
int kvm_vgic_hyp_init(void)
15581558
{
15591559
const struct of_device_id *matched_id;
1560-
int (*vgic_probe)(struct device_node *,const struct vgic_ops **,
1561-
const struct vgic_params **);
1560+
const int (*vgic_probe)(struct device_node *,const struct vgic_ops **,
1561+
const struct vgic_params **);
15621562
struct device_node *vgic_node;
15631563
int ret;
15641564

0 commit comments

Comments
 (0)