lkml.org 
[lkml]   [2019]   [Sep]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] kvm: x86: Use DEFINE_DEBUGFS_ATTRIBUTE for debugfs files
On Tue, Sep 17, 2019 at 07:18:33PM +0200, Paolo Bonzini wrote:
> On 22/07/19 09:33, Yi Wang wrote:
> > We got these coccinelle warning:
> > ./arch/x86/kvm/debugfs.c:23:0-23: WARNING: vcpu_timer_advance_ns_fops
> > should be defined with DEFINE_DEBUGFS_ATTRIBUTE
> > ./arch/x86/kvm/debugfs.c:32:0-23: WARNING: vcpu_tsc_offset_fops should
> > be defined with DEFINE_DEBUGFS_ATTRIBUTE
> > ./arch/x86/kvm/debugfs.c:41:0-23: WARNING: vcpu_tsc_scaling_fops should
> > be defined with DEFINE_DEBUGFS_ATTRIBUTE
> > ./arch/x86/kvm/debugfs.c:49:0-23: WARNING: vcpu_tsc_scaling_frac_fops
> > should be defined with DEFINE_DEBUGFS_ATTRIBUTE
> >
> > Use DEFINE_DEBUGFS_ATTRIBUTE() rather than DEFINE_SIMPLE_ATTRIBUTE()
> > to fix this.
> >
> > Signed-off-by: Yi Wang <wang.yi59@zte.com.cn>
>
> It sucks though that you have to use a function with "unsafe" in the name.

I agree, why make this change?

> Greg, is the patch doing the right thing?

I can't tell. What coccinelle script generated this patch?

thanks,

greg k-h

\
 
 \ /
  Last update: 2019-09-17 20:13    [W:0.060 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site