All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: arm64: vgic-debug: remove unnecessary type castings
@ 2022-03-28 10:38 ` yuzhe
  0 siblings, 0 replies; 24+ messages in thread
From: yuzhe @ 2022-03-28 10:38 UTC (permalink / raw)
  To: maz, james.morse, alexandru.elisei, suzuki.poulose
  Cc: catalin.marinas, will, linux-arm-kernel, kvmarm, linux-kernel,
	liqiong, kernel-janitors, yuzhe

remove unnecessary castings, from "void *" to "struct kvm *"

Signed-off-by: yuzhe <yuzhe@nfschina.com>
---
 arch/arm64/kvm/vgic/vgic-debug.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm64/kvm/vgic/vgic-debug.c b/arch/arm64/kvm/vgic/vgic-debug.c
index f38c40a76251..927e5c1f650d 100644
--- a/arch/arm64/kvm/vgic/vgic-debug.c
+++ b/arch/arm64/kvm/vgic/vgic-debug.c
@@ -82,7 +82,7 @@ static bool end_of_vgic(struct vgic_state_iter *iter)
 
 static void *vgic_debug_start(struct seq_file *s, loff_t *pos)
 {
-	struct kvm *kvm = (struct kvm *)s->private;
+	struct kvm *kvm = s->private;
 	struct vgic_state_iter *iter;
 
 	mutex_lock(&kvm->lock);
@@ -110,7 +110,7 @@ static void *vgic_debug_start(struct seq_file *s, loff_t *pos)
 
 static void *vgic_debug_next(struct seq_file *s, void *v, loff_t *pos)
 {
-	struct kvm *kvm = (struct kvm *)s->private;
+	struct kvm *kvm = s->private;
 	struct vgic_state_iter *iter = kvm->arch.vgic.iter;
 
 	++*pos;
@@ -122,7 +122,7 @@ static void *vgic_debug_next(struct seq_file *s, void *v, loff_t *pos)
 
 static void vgic_debug_stop(struct seq_file *s, void *v)
 {
-	struct kvm *kvm = (struct kvm *)s->private;
+	struct kvm *kvm = s->private;
 	struct vgic_state_iter *iter;
 
 	/*
@@ -229,7 +229,7 @@ static void print_irq_state(struct seq_file *s, struct vgic_irq *irq,
 
 static int vgic_debug_show(struct seq_file *s, void *v)
 {
-	struct kvm *kvm = (struct kvm *)s->private;
+	struct kvm *kvm = s->private;
 	struct vgic_state_iter *iter = (struct vgic_state_iter *)v;
 	struct vgic_irq *irq;
 	struct kvm_vcpu *vcpu = NULL;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH] KVM: arm64: vgic-debug: remove unnecessary type castings
@ 2022-03-28 10:38 ` yuzhe
  0 siblings, 0 replies; 24+ messages in thread
From: yuzhe @ 2022-03-28 10:38 UTC (permalink / raw)
  To: maz, james.morse, alexandru.elisei, suzuki.poulose
  Cc: catalin.marinas, will, linux-arm-kernel, kvmarm, linux-kernel,
	liqiong, kernel-janitors, yuzhe

remove unnecessary castings, from "void *" to "struct kvm *"

Signed-off-by: yuzhe <yuzhe@nfschina.com>
---
 arch/arm64/kvm/vgic/vgic-debug.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm64/kvm/vgic/vgic-debug.c b/arch/arm64/kvm/vgic/vgic-debug.c
index f38c40a76251..927e5c1f650d 100644
--- a/arch/arm64/kvm/vgic/vgic-debug.c
+++ b/arch/arm64/kvm/vgic/vgic-debug.c
@@ -82,7 +82,7 @@ static bool end_of_vgic(struct vgic_state_iter *iter)
 
 static void *vgic_debug_start(struct seq_file *s, loff_t *pos)
 {
-	struct kvm *kvm = (struct kvm *)s->private;
+	struct kvm *kvm = s->private;
 	struct vgic_state_iter *iter;
 
 	mutex_lock(&kvm->lock);
@@ -110,7 +110,7 @@ static void *vgic_debug_start(struct seq_file *s, loff_t *pos)
 
 static void *vgic_debug_next(struct seq_file *s, void *v, loff_t *pos)
 {
-	struct kvm *kvm = (struct kvm *)s->private;
+	struct kvm *kvm = s->private;
 	struct vgic_state_iter *iter = kvm->arch.vgic.iter;
 
 	++*pos;
@@ -122,7 +122,7 @@ static void *vgic_debug_next(struct seq_file *s, void *v, loff_t *pos)
 
 static void vgic_debug_stop(struct seq_file *s, void *v)
 {
-	struct kvm *kvm = (struct kvm *)s->private;
+	struct kvm *kvm = s->private;
 	struct vgic_state_iter *iter;
 
 	/*
@@ -229,7 +229,7 @@ static void print_irq_state(struct seq_file *s, struct vgic_irq *irq,
 
 static int vgic_debug_show(struct seq_file *s, void *v)
 {
-	struct kvm *kvm = (struct kvm *)s->private;
+	struct kvm *kvm = s->private;
 	struct vgic_state_iter *iter = (struct vgic_state_iter *)v;
 	struct vgic_irq *irq;
 	struct kvm_vcpu *vcpu = NULL;
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH] KVM: arm64: vgic-debug: remove unnecessary type castings
@ 2022-03-28 10:38 ` yuzhe
  0 siblings, 0 replies; 24+ messages in thread
From: yuzhe @ 2022-03-28 10:38 UTC (permalink / raw)
  To: maz, james.morse, alexandru.elisei, suzuki.poulose
  Cc: yuzhe, catalin.marinas, kernel-janitors, linux-kernel, liqiong,
	will, kvmarm, linux-arm-kernel

remove unnecessary castings, from "void *" to "struct kvm *"

Signed-off-by: yuzhe <yuzhe@nfschina.com>
---
 arch/arm64/kvm/vgic/vgic-debug.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm64/kvm/vgic/vgic-debug.c b/arch/arm64/kvm/vgic/vgic-debug.c
index f38c40a76251..927e5c1f650d 100644
--- a/arch/arm64/kvm/vgic/vgic-debug.c
+++ b/arch/arm64/kvm/vgic/vgic-debug.c
@@ -82,7 +82,7 @@ static bool end_of_vgic(struct vgic_state_iter *iter)
 
 static void *vgic_debug_start(struct seq_file *s, loff_t *pos)
 {
-	struct kvm *kvm = (struct kvm *)s->private;
+	struct kvm *kvm = s->private;
 	struct vgic_state_iter *iter;
 
 	mutex_lock(&kvm->lock);
@@ -110,7 +110,7 @@ static void *vgic_debug_start(struct seq_file *s, loff_t *pos)
 
 static void *vgic_debug_next(struct seq_file *s, void *v, loff_t *pos)
 {
-	struct kvm *kvm = (struct kvm *)s->private;
+	struct kvm *kvm = s->private;
 	struct vgic_state_iter *iter = kvm->arch.vgic.iter;
 
 	++*pos;
@@ -122,7 +122,7 @@ static void *vgic_debug_next(struct seq_file *s, void *v, loff_t *pos)
 
 static void vgic_debug_stop(struct seq_file *s, void *v)
 {
-	struct kvm *kvm = (struct kvm *)s->private;
+	struct kvm *kvm = s->private;
 	struct vgic_state_iter *iter;
 
 	/*
@@ -229,7 +229,7 @@ static void print_irq_state(struct seq_file *s, struct vgic_irq *irq,
 
 static int vgic_debug_show(struct seq_file *s, void *v)
 {
-	struct kvm *kvm = (struct kvm *)s->private;
+	struct kvm *kvm = s->private;
 	struct vgic_state_iter *iter = (struct vgic_state_iter *)v;
 	struct vgic_irq *irq;
 	struct kvm_vcpu *vcpu = NULL;
-- 
2.25.1

_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* Re: [PATCH] KVM: arm64: vgic-debug: remove unnecessary type castings
  2022-03-28 10:38 ` yuzhe
  (?)
@ 2022-03-28 13:36   ` Marc Zyngier
  -1 siblings, 0 replies; 24+ messages in thread
From: Marc Zyngier @ 2022-03-28 13:36 UTC (permalink / raw)
  To: yuzhe
  Cc: james.morse, alexandru.elisei, suzuki.poulose, catalin.marinas,
	will, linux-arm-kernel, kvmarm, linux-kernel, liqiong,
	kernel-janitors

On Mon, 28 Mar 2022 11:38:36 +0100,
yuzhe <yuzhe@nfschina.com> wrote:
> 
> remove unnecessary castings, from "void *" to "struct kvm *"
> 
> Signed-off-by: yuzhe <yuzhe@nfschina.com>
> ---
>  arch/arm64/kvm/vgic/vgic-debug.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm64/kvm/vgic/vgic-debug.c b/arch/arm64/kvm/vgic/vgic-debug.c
> index f38c40a76251..927e5c1f650d 100644
> --- a/arch/arm64/kvm/vgic/vgic-debug.c
> +++ b/arch/arm64/kvm/vgic/vgic-debug.c
> @@ -82,7 +82,7 @@ static bool end_of_vgic(struct vgic_state_iter *iter)
>  
>  static void *vgic_debug_start(struct seq_file *s, loff_t *pos)
>  {
> -	struct kvm *kvm = (struct kvm *)s->private;
> +	struct kvm *kvm = s->private;
>  	struct vgic_state_iter *iter;
>  
>  	mutex_lock(&kvm->lock);
> @@ -110,7 +110,7 @@ static void *vgic_debug_start(struct seq_file *s, loff_t *pos)
>  
>  static void *vgic_debug_next(struct seq_file *s, void *v, loff_t *pos)
>  {
> -	struct kvm *kvm = (struct kvm *)s->private;
> +	struct kvm *kvm = s->private;
>  	struct vgic_state_iter *iter = kvm->arch.vgic.iter;
>  
>  	++*pos;
> @@ -122,7 +122,7 @@ static void *vgic_debug_next(struct seq_file *s, void *v, loff_t *pos)
>  
>  static void vgic_debug_stop(struct seq_file *s, void *v)
>  {
> -	struct kvm *kvm = (struct kvm *)s->private;
> +	struct kvm *kvm = s->private;
>  	struct vgic_state_iter *iter;
>  
>  	/*
> @@ -229,7 +229,7 @@ static void print_irq_state(struct seq_file *s, struct vgic_irq *irq,
>  
>  static int vgic_debug_show(struct seq_file *s, void *v)
>  {
> -	struct kvm *kvm = (struct kvm *)s->private;
> +	struct kvm *kvm = s->private;
>  	struct vgic_state_iter *iter = (struct vgic_state_iter *)v;

How about you fully get rid of the unnecessary casts then?

	M.

-- 
Without deviation from the norm, progress is not possible.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] KVM: arm64: vgic-debug: remove unnecessary type castings
@ 2022-03-28 13:36   ` Marc Zyngier
  0 siblings, 0 replies; 24+ messages in thread
From: Marc Zyngier @ 2022-03-28 13:36 UTC (permalink / raw)
  To: yuzhe
  Cc: will, catalin.marinas, kernel-janitors, linux-kernel, liqiong,
	kvmarm, linux-arm-kernel

On Mon, 28 Mar 2022 11:38:36 +0100,
yuzhe <yuzhe@nfschina.com> wrote:
> 
> remove unnecessary castings, from "void *" to "struct kvm *"
> 
> Signed-off-by: yuzhe <yuzhe@nfschina.com>
> ---
>  arch/arm64/kvm/vgic/vgic-debug.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm64/kvm/vgic/vgic-debug.c b/arch/arm64/kvm/vgic/vgic-debug.c
> index f38c40a76251..927e5c1f650d 100644
> --- a/arch/arm64/kvm/vgic/vgic-debug.c
> +++ b/arch/arm64/kvm/vgic/vgic-debug.c
> @@ -82,7 +82,7 @@ static bool end_of_vgic(struct vgic_state_iter *iter)
>  
>  static void *vgic_debug_start(struct seq_file *s, loff_t *pos)
>  {
> -	struct kvm *kvm = (struct kvm *)s->private;
> +	struct kvm *kvm = s->private;
>  	struct vgic_state_iter *iter;
>  
>  	mutex_lock(&kvm->lock);
> @@ -110,7 +110,7 @@ static void *vgic_debug_start(struct seq_file *s, loff_t *pos)
>  
>  static void *vgic_debug_next(struct seq_file *s, void *v, loff_t *pos)
>  {
> -	struct kvm *kvm = (struct kvm *)s->private;
> +	struct kvm *kvm = s->private;
>  	struct vgic_state_iter *iter = kvm->arch.vgic.iter;
>  
>  	++*pos;
> @@ -122,7 +122,7 @@ static void *vgic_debug_next(struct seq_file *s, void *v, loff_t *pos)
>  
>  static void vgic_debug_stop(struct seq_file *s, void *v)
>  {
> -	struct kvm *kvm = (struct kvm *)s->private;
> +	struct kvm *kvm = s->private;
>  	struct vgic_state_iter *iter;
>  
>  	/*
> @@ -229,7 +229,7 @@ static void print_irq_state(struct seq_file *s, struct vgic_irq *irq,
>  
>  static int vgic_debug_show(struct seq_file *s, void *v)
>  {
> -	struct kvm *kvm = (struct kvm *)s->private;
> +	struct kvm *kvm = s->private;
>  	struct vgic_state_iter *iter = (struct vgic_state_iter *)v;

How about you fully get rid of the unnecessary casts then?

	M.

-- 
Without deviation from the norm, progress is not possible.
_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] KVM: arm64: vgic-debug: remove unnecessary type castings
@ 2022-03-28 13:36   ` Marc Zyngier
  0 siblings, 0 replies; 24+ messages in thread
From: Marc Zyngier @ 2022-03-28 13:36 UTC (permalink / raw)
  To: yuzhe
  Cc: james.morse, alexandru.elisei, suzuki.poulose, catalin.marinas,
	will, linux-arm-kernel, kvmarm, linux-kernel, liqiong,
	kernel-janitors

On Mon, 28 Mar 2022 11:38:36 +0100,
yuzhe <yuzhe@nfschina.com> wrote:
> 
> remove unnecessary castings, from "void *" to "struct kvm *"
> 
> Signed-off-by: yuzhe <yuzhe@nfschina.com>
> ---
>  arch/arm64/kvm/vgic/vgic-debug.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm64/kvm/vgic/vgic-debug.c b/arch/arm64/kvm/vgic/vgic-debug.c
> index f38c40a76251..927e5c1f650d 100644
> --- a/arch/arm64/kvm/vgic/vgic-debug.c
> +++ b/arch/arm64/kvm/vgic/vgic-debug.c
> @@ -82,7 +82,7 @@ static bool end_of_vgic(struct vgic_state_iter *iter)
>  
>  static void *vgic_debug_start(struct seq_file *s, loff_t *pos)
>  {
> -	struct kvm *kvm = (struct kvm *)s->private;
> +	struct kvm *kvm = s->private;
>  	struct vgic_state_iter *iter;
>  
>  	mutex_lock(&kvm->lock);
> @@ -110,7 +110,7 @@ static void *vgic_debug_start(struct seq_file *s, loff_t *pos)
>  
>  static void *vgic_debug_next(struct seq_file *s, void *v, loff_t *pos)
>  {
> -	struct kvm *kvm = (struct kvm *)s->private;
> +	struct kvm *kvm = s->private;
>  	struct vgic_state_iter *iter = kvm->arch.vgic.iter;
>  
>  	++*pos;
> @@ -122,7 +122,7 @@ static void *vgic_debug_next(struct seq_file *s, void *v, loff_t *pos)
>  
>  static void vgic_debug_stop(struct seq_file *s, void *v)
>  {
> -	struct kvm *kvm = (struct kvm *)s->private;
> +	struct kvm *kvm = s->private;
>  	struct vgic_state_iter *iter;
>  
>  	/*
> @@ -229,7 +229,7 @@ static void print_irq_state(struct seq_file *s, struct vgic_irq *irq,
>  
>  static int vgic_debug_show(struct seq_file *s, void *v)
>  {
> -	struct kvm *kvm = (struct kvm *)s->private;
> +	struct kvm *kvm = s->private;
>  	struct vgic_state_iter *iter = (struct vgic_state_iter *)v;

How about you fully get rid of the unnecessary casts then?

	M.

-- 
Without deviation from the norm, progress is not possible.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] KVM: arm64: vgic-debug: remove unnecessary type castings
  2022-03-28 13:36   ` Marc Zyngier
  (?)
@ 2022-03-29  6:14     ` yuzhe
  -1 siblings, 0 replies; 24+ messages in thread
From: yuzhe @ 2022-03-29  6:14 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: james.morse, alexandru.elisei, suzuki.poulose, catalin.marinas,
	will, linux-arm-kernel, kvmarm, linux-kernel, liqiong,
	kernel-janitors

在 2022/3/28 21:36, Marc Zyngier 写道:

> On Mon, 28 Mar 2022 11:38:36 +0100,
> yuzhe <yuzhe@nfschina.com> wrote:
>> remove unnecessary castings, from "void *" to "struct kvm *"
>>
>> Signed-off-by: yuzhe <yuzhe@nfschina.com>
>> ---
>>   arch/arm64/kvm/vgic/vgic-debug.c | 8 ++++----
>>   1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/arch/arm64/kvm/vgic/vgic-debug.c b/arch/arm64/kvm/vgic/vgic-debug.c
>> index f38c40a76251..927e5c1f650d 100644
>> --- a/arch/arm64/kvm/vgic/vgic-debug.c
>> +++ b/arch/arm64/kvm/vgic/vgic-debug.c
>> @@ -82,7 +82,7 @@ static bool end_of_vgic(struct vgic_state_iter *iter)
>>   
>>   static void *vgic_debug_start(struct seq_file *s, loff_t *pos)
>>   {
>> -	struct kvm *kvm = (struct kvm *)s->private;
>> +	struct kvm *kvm = s->private;
>>   	struct vgic_state_iter *iter;
>>   
>>   	mutex_lock(&kvm->lock);
>> @@ -110,7 +110,7 @@ static void *vgic_debug_start(struct seq_file *s, loff_t *pos)
>>   
>>   static void *vgic_debug_next(struct seq_file *s, void *v, loff_t *pos)
>>   {
>> -	struct kvm *kvm = (struct kvm *)s->private;
>> +	struct kvm *kvm = s->private;
>>   	struct vgic_state_iter *iter = kvm->arch.vgic.iter;
>>   
>>   	++*pos;
>> @@ -122,7 +122,7 @@ static void *vgic_debug_next(struct seq_file *s, void *v, loff_t *pos)
>>   
>>   static void vgic_debug_stop(struct seq_file *s, void *v)
>>   {
>> -	struct kvm *kvm = (struct kvm *)s->private;
>> +	struct kvm *kvm = s->private;
>>   	struct vgic_state_iter *iter;
>>   
>>   	/*
>> @@ -229,7 +229,7 @@ static void print_irq_state(struct seq_file *s, struct vgic_irq *irq,
>>   
>>   static int vgic_debug_show(struct seq_file *s, void *v)
>>   {
>> -	struct kvm *kvm = (struct kvm *)s->private;
>> +	struct kvm *kvm = s->private;
>>   	struct vgic_state_iter *iter = (struct vgic_state_iter *)v;
> How about you fully get rid of the unnecessary casts then?
>
> 	M.

I don't know what you exactly mean. I follow the kernel-janitors/TODO List to get rid of the unnecessary casts.
And I checked all the code in the arch directory and found these issues.


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] KVM: arm64: vgic-debug: remove unnecessary type castings
@ 2022-03-29  6:14     ` yuzhe
  0 siblings, 0 replies; 24+ messages in thread
From: yuzhe @ 2022-03-29  6:14 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: james.morse, alexandru.elisei, suzuki.poulose, catalin.marinas,
	will, linux-arm-kernel, kvmarm, linux-kernel, liqiong,
	kernel-janitors

在 2022/3/28 21:36, Marc Zyngier 写道:

> On Mon, 28 Mar 2022 11:38:36 +0100,
> yuzhe <yuzhe@nfschina.com> wrote:
>> remove unnecessary castings, from "void *" to "struct kvm *"
>>
>> Signed-off-by: yuzhe <yuzhe@nfschina.com>
>> ---
>>   arch/arm64/kvm/vgic/vgic-debug.c | 8 ++++----
>>   1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/arch/arm64/kvm/vgic/vgic-debug.c b/arch/arm64/kvm/vgic/vgic-debug.c
>> index f38c40a76251..927e5c1f650d 100644
>> --- a/arch/arm64/kvm/vgic/vgic-debug.c
>> +++ b/arch/arm64/kvm/vgic/vgic-debug.c
>> @@ -82,7 +82,7 @@ static bool end_of_vgic(struct vgic_state_iter *iter)
>>   
>>   static void *vgic_debug_start(struct seq_file *s, loff_t *pos)
>>   {
>> -	struct kvm *kvm = (struct kvm *)s->private;
>> +	struct kvm *kvm = s->private;
>>   	struct vgic_state_iter *iter;
>>   
>>   	mutex_lock(&kvm->lock);
>> @@ -110,7 +110,7 @@ static void *vgic_debug_start(struct seq_file *s, loff_t *pos)
>>   
>>   static void *vgic_debug_next(struct seq_file *s, void *v, loff_t *pos)
>>   {
>> -	struct kvm *kvm = (struct kvm *)s->private;
>> +	struct kvm *kvm = s->private;
>>   	struct vgic_state_iter *iter = kvm->arch.vgic.iter;
>>   
>>   	++*pos;
>> @@ -122,7 +122,7 @@ static void *vgic_debug_next(struct seq_file *s, void *v, loff_t *pos)
>>   
>>   static void vgic_debug_stop(struct seq_file *s, void *v)
>>   {
>> -	struct kvm *kvm = (struct kvm *)s->private;
>> +	struct kvm *kvm = s->private;
>>   	struct vgic_state_iter *iter;
>>   
>>   	/*
>> @@ -229,7 +229,7 @@ static void print_irq_state(struct seq_file *s, struct vgic_irq *irq,
>>   
>>   static int vgic_debug_show(struct seq_file *s, void *v)
>>   {
>> -	struct kvm *kvm = (struct kvm *)s->private;
>> +	struct kvm *kvm = s->private;
>>   	struct vgic_state_iter *iter = (struct vgic_state_iter *)v;
> How about you fully get rid of the unnecessary casts then?
>
> 	M.

I don't know what you exactly mean. I follow the kernel-janitors/TODO List to get rid of the unnecessary casts.
And I checked all the code in the arch directory and found these issues.


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] KVM: arm64: vgic-debug: remove unnecessary type castings
@ 2022-03-29  6:14     ` yuzhe
  0 siblings, 0 replies; 24+ messages in thread
From: yuzhe @ 2022-03-29  6:14 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: will, catalin.marinas, kernel-janitors, linux-kernel, liqiong,
	kvmarm, linux-arm-kernel

在 2022/3/28 21:36, Marc Zyngier 写道:

> On Mon, 28 Mar 2022 11:38:36 +0100,
> yuzhe <yuzhe@nfschina.com> wrote:
>> remove unnecessary castings, from "void *" to "struct kvm *"
>>
>> Signed-off-by: yuzhe <yuzhe@nfschina.com>
>> ---
>>   arch/arm64/kvm/vgic/vgic-debug.c | 8 ++++----
>>   1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/arch/arm64/kvm/vgic/vgic-debug.c b/arch/arm64/kvm/vgic/vgic-debug.c
>> index f38c40a76251..927e5c1f650d 100644
>> --- a/arch/arm64/kvm/vgic/vgic-debug.c
>> +++ b/arch/arm64/kvm/vgic/vgic-debug.c
>> @@ -82,7 +82,7 @@ static bool end_of_vgic(struct vgic_state_iter *iter)
>>   
>>   static void *vgic_debug_start(struct seq_file *s, loff_t *pos)
>>   {
>> -	struct kvm *kvm = (struct kvm *)s->private;
>> +	struct kvm *kvm = s->private;
>>   	struct vgic_state_iter *iter;
>>   
>>   	mutex_lock(&kvm->lock);
>> @@ -110,7 +110,7 @@ static void *vgic_debug_start(struct seq_file *s, loff_t *pos)
>>   
>>   static void *vgic_debug_next(struct seq_file *s, void *v, loff_t *pos)
>>   {
>> -	struct kvm *kvm = (struct kvm *)s->private;
>> +	struct kvm *kvm = s->private;
>>   	struct vgic_state_iter *iter = kvm->arch.vgic.iter;
>>   
>>   	++*pos;
>> @@ -122,7 +122,7 @@ static void *vgic_debug_next(struct seq_file *s, void *v, loff_t *pos)
>>   
>>   static void vgic_debug_stop(struct seq_file *s, void *v)
>>   {
>> -	struct kvm *kvm = (struct kvm *)s->private;
>> +	struct kvm *kvm = s->private;
>>   	struct vgic_state_iter *iter;
>>   
>>   	/*
>> @@ -229,7 +229,7 @@ static void print_irq_state(struct seq_file *s, struct vgic_irq *irq,
>>   
>>   static int vgic_debug_show(struct seq_file *s, void *v)
>>   {
>> -	struct kvm *kvm = (struct kvm *)s->private;
>> +	struct kvm *kvm = s->private;
>>   	struct vgic_state_iter *iter = (struct vgic_state_iter *)v;
> How about you fully get rid of the unnecessary casts then?
>
> 	M.

I don't know what you exactly mean. I follow the kernel-janitors/TODO List to get rid of the unnecessary casts.
And I checked all the code in the arch directory and found these issues.

_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] KVM: arm64: vgic-debug: remove unnecessary type castings
  2022-03-29  6:14     ` yuzhe
  (?)
@ 2022-03-29  7:07       ` Marc Zyngier
  -1 siblings, 0 replies; 24+ messages in thread
From: Marc Zyngier @ 2022-03-29  7:07 UTC (permalink / raw)
  To: yuzhe
  Cc: james.morse, alexandru.elisei, suzuki.poulose, catalin.marinas,
	will, linux-arm-kernel, kvmarm, linux-kernel, liqiong,
	kernel-janitors

On Tue, 29 Mar 2022 07:14:16 +0100,
yuzhe <yuzhe@nfschina.com> wrote:
> 
> >> @@ -229,7 +229,7 @@ static void print_irq_state(struct seq_file *s, struct vgic_irq *irq,
> >>     static int vgic_debug_show(struct seq_file *s, void *v)
> >>   {
> >> -	struct kvm *kvm = (struct kvm *)s->private;
> >> +	struct kvm *kvm = s->private;
> >>   	struct vgic_state_iter *iter = (struct vgic_state_iter *)v;
> > How about you fully get rid of the unnecessary casts then?
> > 
> > 	M.
> 
> I don't know what you exactly mean. I follow the
> kernel-janitors/TODO List to get rid of the unnecessary casts.  And
> I checked all the code in the arch directory and found these issues.

Let me quote the lines again:

> >>     static int vgic_debug_show(struct seq_file *s, void *v)
[...]
> >>   	struct vgic_state_iter *iter = (struct vgic_state_iter *)v;

Do you see what I mean?

	M.

-- 
Without deviation from the norm, progress is not possible.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] KVM: arm64: vgic-debug: remove unnecessary type castings
@ 2022-03-29  7:07       ` Marc Zyngier
  0 siblings, 0 replies; 24+ messages in thread
From: Marc Zyngier @ 2022-03-29  7:07 UTC (permalink / raw)
  To: yuzhe
  Cc: will, catalin.marinas, kernel-janitors, linux-kernel, liqiong,
	kvmarm, linux-arm-kernel

On Tue, 29 Mar 2022 07:14:16 +0100,
yuzhe <yuzhe@nfschina.com> wrote:
> 
> >> @@ -229,7 +229,7 @@ static void print_irq_state(struct seq_file *s, struct vgic_irq *irq,
> >>     static int vgic_debug_show(struct seq_file *s, void *v)
> >>   {
> >> -	struct kvm *kvm = (struct kvm *)s->private;
> >> +	struct kvm *kvm = s->private;
> >>   	struct vgic_state_iter *iter = (struct vgic_state_iter *)v;
> > How about you fully get rid of the unnecessary casts then?
> > 
> > 	M.
> 
> I don't know what you exactly mean. I follow the
> kernel-janitors/TODO List to get rid of the unnecessary casts.  And
> I checked all the code in the arch directory and found these issues.

Let me quote the lines again:

> >>     static int vgic_debug_show(struct seq_file *s, void *v)
[...]
> >>   	struct vgic_state_iter *iter = (struct vgic_state_iter *)v;

Do you see what I mean?

	M.

-- 
Without deviation from the norm, progress is not possible.
_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] KVM: arm64: vgic-debug: remove unnecessary type castings
@ 2022-03-29  7:07       ` Marc Zyngier
  0 siblings, 0 replies; 24+ messages in thread
From: Marc Zyngier @ 2022-03-29  7:07 UTC (permalink / raw)
  To: yuzhe
  Cc: james.morse, alexandru.elisei, suzuki.poulose, catalin.marinas,
	will, linux-arm-kernel, kvmarm, linux-kernel, liqiong,
	kernel-janitors

On Tue, 29 Mar 2022 07:14:16 +0100,
yuzhe <yuzhe@nfschina.com> wrote:
> 
> >> @@ -229,7 +229,7 @@ static void print_irq_state(struct seq_file *s, struct vgic_irq *irq,
> >>     static int vgic_debug_show(struct seq_file *s, void *v)
> >>   {
> >> -	struct kvm *kvm = (struct kvm *)s->private;
> >> +	struct kvm *kvm = s->private;
> >>   	struct vgic_state_iter *iter = (struct vgic_state_iter *)v;
> > How about you fully get rid of the unnecessary casts then?
> > 
> > 	M.
> 
> I don't know what you exactly mean. I follow the
> kernel-janitors/TODO List to get rid of the unnecessary casts.  And
> I checked all the code in the arch directory and found these issues.

Let me quote the lines again:

> >>     static int vgic_debug_show(struct seq_file *s, void *v)
[...]
> >>   	struct vgic_state_iter *iter = (struct vgic_state_iter *)v;

Do you see what I mean?

	M.

-- 
Without deviation from the norm, progress is not possible.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] KVM: arm64: vgic-debug: remove unnecessary type castings
  2022-03-29  7:07       ` Marc Zyngier
  (?)
@ 2022-03-29  7:26         ` yuzhe
  -1 siblings, 0 replies; 24+ messages in thread
From: yuzhe @ 2022-03-29  7:26 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: james.morse, alexandru.elisei, suzuki.poulose, catalin.marinas,
	will, linux-arm-kernel, kvmarm, linux-kernel, liqiong,
	kernel-janitors

在 2022/3/29 15:07, Marc Zyngier 写道:

> On Tue, 29 Mar 2022 07:14:16 +0100,
> yuzhe <yuzhe@nfschina.com> wrote:
>>>> @@ -229,7 +229,7 @@ static void print_irq_state(struct seq_file *s, struct vgic_irq *irq,
>>>>      static int vgic_debug_show(struct seq_file *s, void *v)
>>>>    {
>>>> -	struct kvm *kvm = (struct kvm *)s->private;
>>>> +	struct kvm *kvm = s->private;
>>>>    	struct vgic_state_iter *iter = (struct vgic_state_iter *)v;
>>> How about you fully get rid of the unnecessary casts then?
>>>
>>> 	M.
>> I don't know what you exactly mean. I follow the
>> kernel-janitors/TODO List to get rid of the unnecessary casts.  And
>> I checked all the code in the arch directory and found these issues.
> Let me quote the lines again:
>
>>>>      static int vgic_debug_show(struct seq_file *s, void *v)
> [...]
>>>>    	struct vgic_state_iter *iter = (struct vgic_state_iter *)v;
> Do you see what I mean?
>
> 	M.

Got it, thanks. I will check again and resubmit.

yuzhe


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] KVM: arm64: vgic-debug: remove unnecessary type castings
@ 2022-03-29  7:26         ` yuzhe
  0 siblings, 0 replies; 24+ messages in thread
From: yuzhe @ 2022-03-29  7:26 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: james.morse, alexandru.elisei, suzuki.poulose, catalin.marinas,
	will, linux-arm-kernel, kvmarm, linux-kernel, liqiong,
	kernel-janitors

在 2022/3/29 15:07, Marc Zyngier 写道:

> On Tue, 29 Mar 2022 07:14:16 +0100,
> yuzhe <yuzhe@nfschina.com> wrote:
>>>> @@ -229,7 +229,7 @@ static void print_irq_state(struct seq_file *s, struct vgic_irq *irq,
>>>>      static int vgic_debug_show(struct seq_file *s, void *v)
>>>>    {
>>>> -	struct kvm *kvm = (struct kvm *)s->private;
>>>> +	struct kvm *kvm = s->private;
>>>>    	struct vgic_state_iter *iter = (struct vgic_state_iter *)v;
>>> How about you fully get rid of the unnecessary casts then?
>>>
>>> 	M.
>> I don't know what you exactly mean. I follow the
>> kernel-janitors/TODO List to get rid of the unnecessary casts.  And
>> I checked all the code in the arch directory and found these issues.
> Let me quote the lines again:
>
>>>>      static int vgic_debug_show(struct seq_file *s, void *v)
> [...]
>>>>    	struct vgic_state_iter *iter = (struct vgic_state_iter *)v;
> Do you see what I mean?
>
> 	M.

Got it, thanks. I will check again and resubmit.

yuzhe


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] KVM: arm64: vgic-debug: remove unnecessary type castings
@ 2022-03-29  7:26         ` yuzhe
  0 siblings, 0 replies; 24+ messages in thread
From: yuzhe @ 2022-03-29  7:26 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: will, catalin.marinas, kernel-janitors, linux-kernel, liqiong,
	kvmarm, linux-arm-kernel

在 2022/3/29 15:07, Marc Zyngier 写道:

> On Tue, 29 Mar 2022 07:14:16 +0100,
> yuzhe <yuzhe@nfschina.com> wrote:
>>>> @@ -229,7 +229,7 @@ static void print_irq_state(struct seq_file *s, struct vgic_irq *irq,
>>>>      static int vgic_debug_show(struct seq_file *s, void *v)
>>>>    {
>>>> -	struct kvm *kvm = (struct kvm *)s->private;
>>>> +	struct kvm *kvm = s->private;
>>>>    	struct vgic_state_iter *iter = (struct vgic_state_iter *)v;
>>> How about you fully get rid of the unnecessary casts then?
>>>
>>> 	M.
>> I don't know what you exactly mean. I follow the
>> kernel-janitors/TODO List to get rid of the unnecessary casts.  And
>> I checked all the code in the arch directory and found these issues.
> Let me quote the lines again:
>
>>>>      static int vgic_debug_show(struct seq_file *s, void *v)
> [...]
>>>>    	struct vgic_state_iter *iter = (struct vgic_state_iter *)v;
> Do you see what I mean?
>
> 	M.

Got it, thanks. I will check again and resubmit.

yuzhe

_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH] KVM: arm64: vgic: remove unnecessary type castings
  2022-03-28 10:38 ` yuzhe
  (?)
@ 2022-03-29 10:20   ` Yu Zhe
  -1 siblings, 0 replies; 24+ messages in thread
From: Yu Zhe @ 2022-03-29 10:20 UTC (permalink / raw)
  To: maz, james.morse, alexandru.elisei, suzuki.poulose
  Cc: catalin.marinas, will, keescook, samitolvanen, ricarkol,
	justin.he, linux-arm-kernel, kvmarm, linux-kernel,
	kernel-janitors, Yu Zhe

remove unnecessary casts.

Signed-off-by: Yu Zhe <yuzhe@nfschina.com>
---
 arch/arm64/kvm/vgic/vgic-debug.c | 10 +++++-----
 arch/arm64/kvm/vgic/vgic-its.c   |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm64/kvm/vgic/vgic-debug.c b/arch/arm64/kvm/vgic/vgic-debug.c
index f38c40a76251..78cde687383c 100644
--- a/arch/arm64/kvm/vgic/vgic-debug.c
+++ b/arch/arm64/kvm/vgic/vgic-debug.c
@@ -82,7 +82,7 @@ static bool end_of_vgic(struct vgic_state_iter *iter)
 
 static void *vgic_debug_start(struct seq_file *s, loff_t *pos)
 {
-	struct kvm *kvm = (struct kvm *)s->private;
+	struct kvm *kvm = s->private;
 	struct vgic_state_iter *iter;
 
 	mutex_lock(&kvm->lock);
@@ -110,7 +110,7 @@ static void *vgic_debug_start(struct seq_file *s, loff_t *pos)
 
 static void *vgic_debug_next(struct seq_file *s, void *v, loff_t *pos)
 {
-	struct kvm *kvm = (struct kvm *)s->private;
+	struct kvm *kvm = s->private;
 	struct vgic_state_iter *iter = kvm->arch.vgic.iter;
 
 	++*pos;
@@ -122,7 +122,7 @@ static void *vgic_debug_next(struct seq_file *s, void *v, loff_t *pos)
 
 static void vgic_debug_stop(struct seq_file *s, void *v)
 {
-	struct kvm *kvm = (struct kvm *)s->private;
+	struct kvm *kvm = s->private;
 	struct vgic_state_iter *iter;
 
 	/*
@@ -229,8 +229,8 @@ static void print_irq_state(struct seq_file *s, struct vgic_irq *irq,
 
 static int vgic_debug_show(struct seq_file *s, void *v)
 {
-	struct kvm *kvm = (struct kvm *)s->private;
-	struct vgic_state_iter *iter = (struct vgic_state_iter *)v;
+	struct kvm *kvm = s->private;
+	struct vgic_state_iter *iter = v;
 	struct vgic_irq *irq;
 	struct kvm_vcpu *vcpu = NULL;
 	unsigned long flags;
diff --git a/arch/arm64/kvm/vgic/vgic-its.c b/arch/arm64/kvm/vgic/vgic-its.c
index 089fc2ffcb43..2e13402be3bd 100644
--- a/arch/arm64/kvm/vgic/vgic-its.c
+++ b/arch/arm64/kvm/vgic/vgic-its.c
@@ -2143,7 +2143,7 @@ static int vgic_its_save_ite(struct vgic_its *its, struct its_device *dev,
 static int vgic_its_restore_ite(struct vgic_its *its, u32 event_id,
 				void *ptr, void *opaque)
 {
-	struct its_device *dev = (struct its_device *)opaque;
+	struct its_device *dev = opaque;
 	struct its_collection *collection;
 	struct kvm *kvm = its->dev->kvm;
 	struct kvm_vcpu *vcpu = NULL;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH] KVM: arm64: vgic: remove unnecessary type castings
@ 2022-03-29 10:20   ` Yu Zhe
  0 siblings, 0 replies; 24+ messages in thread
From: Yu Zhe @ 2022-03-29 10:20 UTC (permalink / raw)
  To: maz, james.morse, alexandru.elisei, suzuki.poulose
  Cc: catalin.marinas, will, keescook, samitolvanen, ricarkol,
	justin.he, linux-arm-kernel, kvmarm, linux-kernel,
	kernel-janitors, Yu Zhe

remove unnecessary casts.

Signed-off-by: Yu Zhe <yuzhe@nfschina.com>
---
 arch/arm64/kvm/vgic/vgic-debug.c | 10 +++++-----
 arch/arm64/kvm/vgic/vgic-its.c   |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm64/kvm/vgic/vgic-debug.c b/arch/arm64/kvm/vgic/vgic-debug.c
index f38c40a76251..78cde687383c 100644
--- a/arch/arm64/kvm/vgic/vgic-debug.c
+++ b/arch/arm64/kvm/vgic/vgic-debug.c
@@ -82,7 +82,7 @@ static bool end_of_vgic(struct vgic_state_iter *iter)
 
 static void *vgic_debug_start(struct seq_file *s, loff_t *pos)
 {
-	struct kvm *kvm = (struct kvm *)s->private;
+	struct kvm *kvm = s->private;
 	struct vgic_state_iter *iter;
 
 	mutex_lock(&kvm->lock);
@@ -110,7 +110,7 @@ static void *vgic_debug_start(struct seq_file *s, loff_t *pos)
 
 static void *vgic_debug_next(struct seq_file *s, void *v, loff_t *pos)
 {
-	struct kvm *kvm = (struct kvm *)s->private;
+	struct kvm *kvm = s->private;
 	struct vgic_state_iter *iter = kvm->arch.vgic.iter;
 
 	++*pos;
@@ -122,7 +122,7 @@ static void *vgic_debug_next(struct seq_file *s, void *v, loff_t *pos)
 
 static void vgic_debug_stop(struct seq_file *s, void *v)
 {
-	struct kvm *kvm = (struct kvm *)s->private;
+	struct kvm *kvm = s->private;
 	struct vgic_state_iter *iter;
 
 	/*
@@ -229,8 +229,8 @@ static void print_irq_state(struct seq_file *s, struct vgic_irq *irq,
 
 static int vgic_debug_show(struct seq_file *s, void *v)
 {
-	struct kvm *kvm = (struct kvm *)s->private;
-	struct vgic_state_iter *iter = (struct vgic_state_iter *)v;
+	struct kvm *kvm = s->private;
+	struct vgic_state_iter *iter = v;
 	struct vgic_irq *irq;
 	struct kvm_vcpu *vcpu = NULL;
 	unsigned long flags;
diff --git a/arch/arm64/kvm/vgic/vgic-its.c b/arch/arm64/kvm/vgic/vgic-its.c
index 089fc2ffcb43..2e13402be3bd 100644
--- a/arch/arm64/kvm/vgic/vgic-its.c
+++ b/arch/arm64/kvm/vgic/vgic-its.c
@@ -2143,7 +2143,7 @@ static int vgic_its_save_ite(struct vgic_its *its, struct its_device *dev,
 static int vgic_its_restore_ite(struct vgic_its *its, u32 event_id,
 				void *ptr, void *opaque)
 {
-	struct its_device *dev = (struct its_device *)opaque;
+	struct its_device *dev = opaque;
 	struct its_collection *collection;
 	struct kvm *kvm = its->dev->kvm;
 	struct kvm_vcpu *vcpu = NULL;
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH] KVM: arm64: vgic: remove unnecessary type castings
@ 2022-03-29 10:20   ` Yu Zhe
  0 siblings, 0 replies; 24+ messages in thread
From: Yu Zhe @ 2022-03-29 10:20 UTC (permalink / raw)
  To: maz, james.morse, alexandru.elisei, suzuki.poulose
  Cc: justin.he, keescook, Yu Zhe, catalin.marinas, kernel-janitors,
	linux-kernel, samitolvanen, will, kvmarm, linux-arm-kernel

remove unnecessary casts.

Signed-off-by: Yu Zhe <yuzhe@nfschina.com>
---
 arch/arm64/kvm/vgic/vgic-debug.c | 10 +++++-----
 arch/arm64/kvm/vgic/vgic-its.c   |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm64/kvm/vgic/vgic-debug.c b/arch/arm64/kvm/vgic/vgic-debug.c
index f38c40a76251..78cde687383c 100644
--- a/arch/arm64/kvm/vgic/vgic-debug.c
+++ b/arch/arm64/kvm/vgic/vgic-debug.c
@@ -82,7 +82,7 @@ static bool end_of_vgic(struct vgic_state_iter *iter)
 
 static void *vgic_debug_start(struct seq_file *s, loff_t *pos)
 {
-	struct kvm *kvm = (struct kvm *)s->private;
+	struct kvm *kvm = s->private;
 	struct vgic_state_iter *iter;
 
 	mutex_lock(&kvm->lock);
@@ -110,7 +110,7 @@ static void *vgic_debug_start(struct seq_file *s, loff_t *pos)
 
 static void *vgic_debug_next(struct seq_file *s, void *v, loff_t *pos)
 {
-	struct kvm *kvm = (struct kvm *)s->private;
+	struct kvm *kvm = s->private;
 	struct vgic_state_iter *iter = kvm->arch.vgic.iter;
 
 	++*pos;
@@ -122,7 +122,7 @@ static void *vgic_debug_next(struct seq_file *s, void *v, loff_t *pos)
 
 static void vgic_debug_stop(struct seq_file *s, void *v)
 {
-	struct kvm *kvm = (struct kvm *)s->private;
+	struct kvm *kvm = s->private;
 	struct vgic_state_iter *iter;
 
 	/*
@@ -229,8 +229,8 @@ static void print_irq_state(struct seq_file *s, struct vgic_irq *irq,
 
 static int vgic_debug_show(struct seq_file *s, void *v)
 {
-	struct kvm *kvm = (struct kvm *)s->private;
-	struct vgic_state_iter *iter = (struct vgic_state_iter *)v;
+	struct kvm *kvm = s->private;
+	struct vgic_state_iter *iter = v;
 	struct vgic_irq *irq;
 	struct kvm_vcpu *vcpu = NULL;
 	unsigned long flags;
diff --git a/arch/arm64/kvm/vgic/vgic-its.c b/arch/arm64/kvm/vgic/vgic-its.c
index 089fc2ffcb43..2e13402be3bd 100644
--- a/arch/arm64/kvm/vgic/vgic-its.c
+++ b/arch/arm64/kvm/vgic/vgic-its.c
@@ -2143,7 +2143,7 @@ static int vgic_its_save_ite(struct vgic_its *its, struct its_device *dev,
 static int vgic_its_restore_ite(struct vgic_its *its, u32 event_id,
 				void *ptr, void *opaque)
 {
-	struct its_device *dev = (struct its_device *)opaque;
+	struct its_device *dev = opaque;
 	struct its_collection *collection;
 	struct kvm *kvm = its->dev->kvm;
 	struct kvm_vcpu *vcpu = NULL;
-- 
2.25.1

_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* Re: [PATCH] KVM: arm64: vgic-debug: remove unnecessary type castings
  2022-03-29  6:14     ` yuzhe
  (?)
@ 2022-03-29 11:21       ` Dan Carpenter
  -1 siblings, 0 replies; 24+ messages in thread
From: Dan Carpenter @ 2022-03-29 11:21 UTC (permalink / raw)
  To: yuzhe
  Cc: Marc Zyngier, james.morse, alexandru.elisei, suzuki.poulose,
	catalin.marinas, will, linux-arm-kernel, kvmarm, linux-kernel,
	liqiong, kernel-janitors

On Tue, Mar 29, 2022 at 02:14:16PM +0800, yuzhe wrote:
> > > @@ -229,7 +229,7 @@ static void print_irq_state(struct seq_file *s, struct vgic_irq *irq,
> > >   static int vgic_debug_show(struct seq_file *s, void *v)
> > >   {
> > > -	struct kvm *kvm = (struct kvm *)s->private;
> > > +	struct kvm *kvm = s->private;
> > >   	struct vgic_state_iter *iter = (struct vgic_state_iter *)v;
                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^
This cast is unnecessary.  Look for others as well.

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] KVM: arm64: vgic-debug: remove unnecessary type castings
@ 2022-03-29 11:21       ` Dan Carpenter
  0 siblings, 0 replies; 24+ messages in thread
From: Dan Carpenter @ 2022-03-29 11:21 UTC (permalink / raw)
  To: yuzhe
  Cc: kernel-janitors, Marc Zyngier, linux-kernel, liqiong,
	catalin.marinas, will, kvmarm, linux-arm-kernel

On Tue, Mar 29, 2022 at 02:14:16PM +0800, yuzhe wrote:
> > > @@ -229,7 +229,7 @@ static void print_irq_state(struct seq_file *s, struct vgic_irq *irq,
> > >   static int vgic_debug_show(struct seq_file *s, void *v)
> > >   {
> > > -	struct kvm *kvm = (struct kvm *)s->private;
> > > +	struct kvm *kvm = s->private;
> > >   	struct vgic_state_iter *iter = (struct vgic_state_iter *)v;
                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^
This cast is unnecessary.  Look for others as well.

regards,
dan carpenter

_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] KVM: arm64: vgic-debug: remove unnecessary type castings
@ 2022-03-29 11:21       ` Dan Carpenter
  0 siblings, 0 replies; 24+ messages in thread
From: Dan Carpenter @ 2022-03-29 11:21 UTC (permalink / raw)
  To: yuzhe
  Cc: Marc Zyngier, james.morse, alexandru.elisei, suzuki.poulose,
	catalin.marinas, will, linux-arm-kernel, kvmarm, linux-kernel,
	liqiong, kernel-janitors

On Tue, Mar 29, 2022 at 02:14:16PM +0800, yuzhe wrote:
> > > @@ -229,7 +229,7 @@ static void print_irq_state(struct seq_file *s, struct vgic_irq *irq,
> > >   static int vgic_debug_show(struct seq_file *s, void *v)
> > >   {
> > > -	struct kvm *kvm = (struct kvm *)s->private;
> > > +	struct kvm *kvm = s->private;
> > >   	struct vgic_state_iter *iter = (struct vgic_state_iter *)v;
                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^
This cast is unnecessary.  Look for others as well.

regards,
dan carpenter


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] KVM: arm64: vgic: remove unnecessary type castings
  2022-03-29 10:20   ` Yu Zhe
  (?)
@ 2022-04-06 13:22     ` Marc Zyngier
  -1 siblings, 0 replies; 24+ messages in thread
From: Marc Zyngier @ 2022-04-06 13:22 UTC (permalink / raw)
  To: alexandru.elisei, suzuki.poulose, Yu Zhe, james.morse
  Cc: justin.he, keescook, catalin.marinas, kernel-janitors,
	linux-kernel, samitolvanen, will, kvmarm, linux-arm-kernel

On Tue, 29 Mar 2022 03:20:59 -0700, Yu Zhe wrote:
> remove unnecessary casts.

Applied to fixes, thanks!

[1/1] KVM: arm64: vgic: remove unnecessary type castings
      commit: c707663e81ef48d279719e97fd86acef835a2671

Cheers,

	M.
-- 
Without deviation from the norm, progress is not possible.


_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] KVM: arm64: vgic: remove unnecessary type castings
@ 2022-04-06 13:22     ` Marc Zyngier
  0 siblings, 0 replies; 24+ messages in thread
From: Marc Zyngier @ 2022-04-06 13:22 UTC (permalink / raw)
  To: alexandru.elisei, suzuki.poulose, Yu Zhe, james.morse
  Cc: keescook, ricarkol, justin.he, linux-arm-kernel, samitolvanen,
	kernel-janitors, catalin.marinas, kvmarm, will, linux-kernel

On Tue, 29 Mar 2022 03:20:59 -0700, Yu Zhe wrote:
> remove unnecessary casts.

Applied to fixes, thanks!

[1/1] KVM: arm64: vgic: remove unnecessary type castings
      commit: c707663e81ef48d279719e97fd86acef835a2671

Cheers,

	M.
-- 
Without deviation from the norm, progress is not possible.



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] KVM: arm64: vgic: remove unnecessary type castings
@ 2022-04-06 13:22     ` Marc Zyngier
  0 siblings, 0 replies; 24+ messages in thread
From: Marc Zyngier @ 2022-04-06 13:22 UTC (permalink / raw)
  To: alexandru.elisei, suzuki.poulose, Yu Zhe, james.morse
  Cc: keescook, ricarkol, justin.he, linux-arm-kernel, samitolvanen,
	kernel-janitors, catalin.marinas, kvmarm, will, linux-kernel

On Tue, 29 Mar 2022 03:20:59 -0700, Yu Zhe wrote:
> remove unnecessary casts.

Applied to fixes, thanks!

[1/1] KVM: arm64: vgic: remove unnecessary type castings
      commit: c707663e81ef48d279719e97fd86acef835a2671

Cheers,

	M.
-- 
Without deviation from the norm, progress is not possible.



^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2022-04-06 15:55 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-28 10:38 [PATCH] KVM: arm64: vgic-debug: remove unnecessary type castings yuzhe
2022-03-28 10:38 ` yuzhe
2022-03-28 10:38 ` yuzhe
2022-03-28 13:36 ` Marc Zyngier
2022-03-28 13:36   ` Marc Zyngier
2022-03-28 13:36   ` Marc Zyngier
2022-03-29  6:14   ` yuzhe
2022-03-29  6:14     ` yuzhe
2022-03-29  6:14     ` yuzhe
2022-03-29  7:07     ` Marc Zyngier
2022-03-29  7:07       ` Marc Zyngier
2022-03-29  7:07       ` Marc Zyngier
2022-03-29  7:26       ` yuzhe
2022-03-29  7:26         ` yuzhe
2022-03-29  7:26         ` yuzhe
2022-03-29 11:21     ` Dan Carpenter
2022-03-29 11:21       ` Dan Carpenter
2022-03-29 11:21       ` Dan Carpenter
2022-03-29 10:20 ` [PATCH] KVM: arm64: vgic: " Yu Zhe
2022-03-29 10:20   ` Yu Zhe
2022-03-29 10:20   ` Yu Zhe
2022-04-06 13:22   ` Marc Zyngier
2022-04-06 13:22     ` Marc Zyngier
2022-04-06 13:22     ` Marc Zyngier

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.