summaryrefslogtreecommitdiffstats
path: root/lib/interval_tree_test.c
diff options
context:
space:
mode:
authorkernel test robot <lkp@intel.com>2020-10-25 11:20:04 +0100
committerBorislav Petkov <bp@suse.de>2021-01-18 11:03:26 +0100
commit443121b3ebb9025fd99ff11851d3537cb756d456 (patch)
tree4e61fead10a1ddd0c827636a7000cdd6935c1ca2 /lib/interval_tree_test.c
parentselftests/x86: Use __builtin_ia32_read/writeeflags (diff)
downloadlinux-443121b3ebb9025fd99ff11851d3537cb756d456.tar.xz
linux-443121b3ebb9025fd99ff11851d3537cb756d456.zip
selftests/fpu: Fix debugfs_simple_attr.cocci warning
lib/test_fpu.c:66:0-23: WARNING: test_fpu_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(). In order to protect against file removal races, debugfs files created via debugfs_create_file() now get wrapped by a struct file_operations at their opening. If the original struct file_operations are known to be safe against removal races by themselves already, the proxy creation may be bypassed by creating the files through debugfs_create_file_unsafe(). In order to help debugfs users who use the common DEFINE_SIMPLE_ATTRIBUTE() + debugfs_create_file() idiom to transition to removal safe struct file_operations, the helper macro DEFINE_DEBUGFS_ATTRIBUTE() has been introduced. Thus, the preferred strategy is to use DEFINE_DEBUGFS_ATTRIBUTE() + debugfs_create_file_unsafe() now. Generated by: scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci Fixes: 4185b3b92792 ("selftests/fpu: Add an FPU selftest") Signed-off-by: kernel test robot <lkp@intel.com> Signed-off-by: Julia Lawall <julia.lawall@inria.fr> Signed-off-by: Borislav Petkov <bp@suse.de> Link: https://lkml.kernel.org/r/alpine.DEB.2.22.394.2010251117180.2714@hadrien
Diffstat (limited to 'lib/interval_tree_test.c')
0 files changed, 0 insertions, 0 deletions