CC: [email protected] CC: Linux Memory Management List <[email protected]> TO: "Ville Syrjälä" <[email protected]> CC: Jani Nikula <[email protected]> CC: Joonas Lahtinen <[email protected]> CC: Rodrigo Vivi <[email protected]> CC: David Airlie <[email protected]> CC: Daniel Vetter <[email protected]> CC: Mika Kahola <[email protected]> CC: "José Roberto de Souza" <[email protected]> CC: Matt Roper <[email protected]> CC: [email protected]
From: kernel test robot <[email protected]> drivers/gpu/drm/i915/display/intel_fbc.c:1715:0-23: WARNING: intel_fbc_debugfs_false_color_fops should be defined with DEFINE_DEBUGFS_ATTRIBUTE Use DEFINE_DEBUGFS_ATTRIBUTE rather than DEFINE_SIMPLE_ATTRIBUTE for debugfs files. Semantic patch information: Rationale: DEFINE_SIMPLE_ATTRIBUTE + debugfs_create_file() imposes some significant overhead as compared to DEFINE_DEBUGFS_ATTRIBUTE + debugfs_create_file_unsafe(). Generated by: scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci Fixes: d2de8ccfb299 ("drm/i915/fbc: Move FBC debugfs stuff into intel_fbc.c") Reported-by: kernel test robot <[email protected]> Signed-off-by: kernel test robot <[email protected]> --- tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 4eee8d0b64ecc3231040fa68ba750317ffca5c52 commit: d2de8ccfb29909272fce4eb5cb2bca4fd878df39 [4406/5842] drm/i915/fbc: Move FBC debugfs stuff into intel_fbc.c :::::: branch date: 30 hours ago :::::: commit date: 6 days ago Please take the patch only if it's a positive warning. Thanks! intel_fbc.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) --- a/drivers/gpu/drm/i915/display/intel_fbc.c +++ b/drivers/gpu/drm/i915/display/intel_fbc.c @@ -1712,10 +1712,9 @@ static int intel_fbc_debugfs_false_color return 0; } -DEFINE_SIMPLE_ATTRIBUTE(intel_fbc_debugfs_false_color_fops, - intel_fbc_debugfs_false_color_get, - intel_fbc_debugfs_false_color_set, - "%llu\n"); +DEFINE_DEBUGFS_ATTRIBUTE(intel_fbc_debugfs_false_color_fops, + intel_fbc_debugfs_false_color_get, + intel_fbc_debugfs_false_color_set, "%llu\n"); static void intel_fbc_debugfs_add(struct intel_fbc *fbc) { @@ -1727,9 +1726,9 @@ static void intel_fbc_debugfs_add(struct &intel_fbc_debugfs_status_fops); if (fbc->funcs->set_false_color) - debugfs_create_file("i915_fbc_false_color", 0644, - minor->debugfs_root, fbc, - &intel_fbc_debugfs_false_color_fops); + debugfs_create_file_unsafe("i915_fbc_false_color", 0644, + minor->debugfs_root, fbc, + &intel_fbc_debugfs_false_color_fops); } void intel_fbc_debugfs_register(struct drm_i915_private *i915) _______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
