[PATCH] cxl: fix coccinelle warnings

Ian Munsie imunsie at au1.ibm.com
Wed Nov 23 18:32:23 AEDT 2016


Excerpts from andrew.donnellan's message of 2016-11-23 18:06:59 +1100:
> On 23/11/16 17:49, Ian Munsie wrote:
> > Most of these look fine
> >
> >> -    return debugfs_create_file(name, mode, parent, (void __force *)value, &fops_io_x64);
> >> +    return debugfs_create_file_unsafe(name, mode, parent,
> >> +                      (void __force *)value, &fops_io_x64);
> >
> > Just wondering what this one is about?
> 
> See explanation at https://lkml.org/lkml/2016/3/6/75 - when we use 
> DEFINE_DEBUGFS_ATTRIBUTE() rather than DEFINE_SIMPLE_ATTRIBUTE(), we 
> don't need the "lifetime managing proxy" that debugfs_create_file() sets up.
> 
> coccinelle proposed that change based on 
> scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci

Thanks, that makes sense :)

Acked-by: Ian Munsie <imunsie at au1.ibm.com>



More information about the Linuxppc-dev mailing list