kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH linux-next] KVM: replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE
@ 2022-11-15  0:58 guo.ziliang
  2022-11-15 17:31 ` Sean Christopherson
  0 siblings, 1 reply; 4+ messages in thread
From: guo.ziliang @ 2022-11-15  0:58 UTC (permalink / raw)
  To: pbonzini; +Cc: kvm, linux-kernel

From: guo ziliang <guo.ziliang@zte.com.cn>
Fix the following coccicheck warning:
/virt/kvm/kvm_main.c: 3849: 0-23: WARNING: vcpu_get_pid_fops
should be defined with DEFINE_DEBUGFS_ATTRIBUTE

Signed-off-by: guo ziliang <guo.ziliang@zte.com.cn>
---
virt/kvm/kvm_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 2719e10..6e58aec 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -3846,7 +3846,7 @@ static int vcpu_get_pid(void *data, u64 *val)
return 0;
}

-DEFINE_SIMPLE_ATTRIBUTE(vcpu_get_pid_fops, vcpu_get_pid, NULL, "%llu\n");
++DEFINE_DEBUGFS_ATTRIBUTE(vcpu_get_pid_fops, vcpu_get_pid, NULL, "%llu\n");

static void kvm_create_vcpu_debugfs(struct kvm_vcpu *vcpu)
{
--
1.8.3.1

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

* Re: [PATCH linux-next] KVM: replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE
  2022-11-15  0:58 [PATCH linux-next] KVM: replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE guo.ziliang
@ 2022-11-15 17:31 ` Sean Christopherson
  2022-11-15 17:37   ` Paolo Bonzini
  0 siblings, 1 reply; 4+ messages in thread
From: Sean Christopherson @ 2022-11-15 17:31 UTC (permalink / raw)
  To: guo.ziliang; +Cc: pbonzini, kvm, linux-kernel

On Tue, Nov 15, 2022, guo.ziliang@zte.com.cn wrote:
> From: guo ziliang <guo.ziliang@zte.com.cn>
> Fix the following coccicheck warning:
> /virt/kvm/kvm_main.c: 3849: 0-23: WARNING: vcpu_get_pid_fops
> should be defined with DEFINE_DEBUGFS_ATTRIBUTE
> 
> Signed-off-by: guo ziliang <guo.ziliang@zte.com.cn>
> ---
> virt/kvm/kvm_main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> index 2719e10..6e58aec 100644
> --- a/virt/kvm/kvm_main.c
> +++ b/virt/kvm/kvm_main.c
> @@ -3846,7 +3846,7 @@ static int vcpu_get_pid(void *data, u64 *val)
> return 0;
> }
> 
> -DEFINE_SIMPLE_ATTRIBUTE(vcpu_get_pid_fops, vcpu_get_pid, NULL, "%llu\n");
> ++DEFINE_DEBUGFS_ATTRIBUTE(vcpu_get_pid_fops, vcpu_get_pid, NULL, "%llu\n");

NAK, third time is not a charm.

https://lore.kernel.org/all/20221101072506.7307-1-liubo03@inspur.com
https://lore.kernel.org/all/20220815031228.64126-1-ye.xingchen@zte.com.cn

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

* Re: [PATCH linux-next] KVM: replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE
  2022-11-15 17:31 ` Sean Christopherson
@ 2022-11-15 17:37   ` Paolo Bonzini
  2022-11-15 17:40     ` Sean Christopherson
  0 siblings, 1 reply; 4+ messages in thread
From: Paolo Bonzini @ 2022-11-15 17:37 UTC (permalink / raw)
  To: Sean Christopherson, guo.ziliang; +Cc: kvm, linux-kernel

On 11/15/22 18:31, Sean Christopherson wrote:
> On Tue, Nov 15, 2022, guo.ziliang@zte.com.cn wrote:
>> From: guo ziliang <guo.ziliang@zte.com.cn>
>> Fix the following coccicheck warning:
>> /virt/kvm/kvm_main.c: 3849: 0-23: WARNING: vcpu_get_pid_fops
>> should be defined with DEFINE_DEBUGFS_ATTRIBUTE
>>
>> Signed-off-by: guo ziliang <guo.ziliang@zte.com.cn>
>> ---
>> virt/kvm/kvm_main.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
>> index 2719e10..6e58aec 100644
>> --- a/virt/kvm/kvm_main.c
>> +++ b/virt/kvm/kvm_main.c
>> @@ -3846,7 +3846,7 @@ static int vcpu_get_pid(void *data, u64 *val)
>> return 0;
>> }
>>
>> -DEFINE_SIMPLE_ATTRIBUTE(vcpu_get_pid_fops, vcpu_get_pid, NULL, "%llu\n");
>> ++DEFINE_DEBUGFS_ATTRIBUTE(vcpu_get_pid_fops, vcpu_get_pid, NULL, "%llu\n");
> 
> NAK, third time is not a charm.
> 
> https://lore.kernel.org/all/20221101072506.7307-1-liubo03@inspur.com
> https://lore.kernel.org/all/20220815031228.64126-1-ye.xingchen@zte.com.cn

Screw it, I'm going to send a pull request just to delete that file.

Paolo


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

* Re: [PATCH linux-next] KVM: replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE
  2022-11-15 17:37   ` Paolo Bonzini
@ 2022-11-15 17:40     ` Sean Christopherson
  0 siblings, 0 replies; 4+ messages in thread
From: Sean Christopherson @ 2022-11-15 17:40 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: guo.ziliang, kvm, linux-kernel

On Tue, Nov 15, 2022, Paolo Bonzini wrote:
> On 11/15/22 18:31, Sean Christopherson wrote:
> > On Tue, Nov 15, 2022, guo.ziliang@zte.com.cn wrote:
> > > From: guo ziliang <guo.ziliang@zte.com.cn>
> > > Fix the following coccicheck warning:
> > > /virt/kvm/kvm_main.c: 3849: 0-23: WARNING: vcpu_get_pid_fops
> > > should be defined with DEFINE_DEBUGFS_ATTRIBUTE
> > > 
> > > Signed-off-by: guo ziliang <guo.ziliang@zte.com.cn>
> > > ---
> > > virt/kvm/kvm_main.c | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> > > index 2719e10..6e58aec 100644
> > > --- a/virt/kvm/kvm_main.c
> > > +++ b/virt/kvm/kvm_main.c
> > > @@ -3846,7 +3846,7 @@ static int vcpu_get_pid(void *data, u64 *val)
> > > return 0;
> > > }
> > > 
> > > -DEFINE_SIMPLE_ATTRIBUTE(vcpu_get_pid_fops, vcpu_get_pid, NULL, "%llu\n");
> > > ++DEFINE_DEBUGFS_ATTRIBUTE(vcpu_get_pid_fops, vcpu_get_pid, NULL, "%llu\n");
> > 
> > NAK, third time is not a charm.
> > 
> > https://lore.kernel.org/all/20221101072506.7307-1-liubo03@inspur.com
> > https://lore.kernel.org/all/20220815031228.64126-1-ye.xingchen@zte.com.cn
> 
> Screw it, I'm going to send a pull request just to delete that file.

Heh, I was seriously considering sending a patch to do that too.

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

end of thread, other threads:[~2022-11-15 17:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-15  0:58 [PATCH linux-next] KVM: replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE guo.ziliang
2022-11-15 17:31 ` Sean Christopherson
2022-11-15 17:37   ` Paolo Bonzini
2022-11-15 17:40     ` Sean Christopherson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).