Skip to content

Commit c707663

Browse files
yuzhenfschinaMarc Zyngier
authored andcommitted
KVM: arm64: vgic: Remove unnecessary type castings
Remove unnecessary casts. Signed-off-by: Yu Zhe <yuzhe@nfschina.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20220329102059.268983-1-yuzhe@nfschina.com
1 parent f587661 commit c707663

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

arch/arm64/kvm/vgic/vgic-debug.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ static bool end_of_vgic(struct vgic_state_iter *iter)
8282

8383
static void *vgic_debug_start(struct seq_file *s, loff_t *pos)
8484
{
85-
struct kvm *kvm = (struct kvm *)s->private;
85+
struct kvm *kvm = s->private;
8686
struct vgic_state_iter *iter;
8787

8888
mutex_lock(&kvm->lock);
@@ -110,7 +110,7 @@ static void *vgic_debug_start(struct seq_file *s, loff_t *pos)
110110

111111
static void *vgic_debug_next(struct seq_file *s, void *v, loff_t *pos)
112112
{
113-
struct kvm *kvm = (struct kvm *)s->private;
113+
struct kvm *kvm = s->private;
114114
struct vgic_state_iter *iter = kvm->arch.vgic.iter;
115115

116116
++*pos;
@@ -122,7 +122,7 @@ static void *vgic_debug_next(struct seq_file *s, void *v, loff_t *pos)
122122

123123
static void vgic_debug_stop(struct seq_file *s, void *v)
124124
{
125-
struct kvm *kvm = (struct kvm *)s->private;
125+
struct kvm *kvm = s->private;
126126
struct vgic_state_iter *iter;
127127

128128
/*
@@ -229,8 +229,8 @@ static void print_irq_state(struct seq_file *s, struct vgic_irq *irq,
229229

230230
static int vgic_debug_show(struct seq_file *s, void *v)
231231
{
232-
struct kvm *kvm = (struct kvm *)s->private;
233-
struct vgic_state_iter *iter = (struct vgic_state_iter *)v;
232+
struct kvm *kvm = s->private;
233+
struct vgic_state_iter *iter = v;
234234
struct vgic_irq *irq;
235235
struct kvm_vcpu *vcpu = NULL;
236236
unsigned long flags;

arch/arm64/kvm/vgic/vgic-its.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2143,7 +2143,7 @@ static int vgic_its_save_ite(struct vgic_its *its, struct its_device *dev,
21432143
static int vgic_its_restore_ite(struct vgic_its *its, u32 event_id,
21442144
void *ptr, void *opaque)
21452145
{
2146-
struct its_device *dev = (struct its_device *)opaque;
2146+
struct its_device *dev = opaque;
21472147
struct its_collection *collection;
21482148
struct kvm *kvm = its->dev->kvm;
21492149
struct kvm_vcpu *vcpu = NULL;

0 commit comments

Comments
 (0)