Input: edt-ft5x06: Replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE
Subsystems (2)
PATCH 1/1 Input: edt-ft5x06: Replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE
Fix the following coccicheck warning:
./drivers/input/touchscreen/edt-ft5x06.c:697:0-23: WARNING:debugfs_mode_fops should be defined with DEFINE_DEBUGFS_ATTRIBUTE
Reported-by Abaci Robot <[email protected]>
Signed-off-by Yang Li <[email protected]>
--- drivers/input/touchscreen/edt-ft5x06.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/touchscreen/edt-ft5x06.c +1 -1
@@ -694,7 +694,7 @@ static int edt_ft5x06_debugfs_mode_set(void *data, u64 mode)return retval; }; -DEFINE_SIMPLE_ATTRIBUTE (debugfs_mode_fops, edt_ft5x06_debugfs_mode_get, +DEFINE_DEBUGFS_ATTRIBUTE (debugfs_mode_fops, edt_ft5x06_debugfs_mode_get, edt_ft5x06_debugfs_mode_set,"%llu\n" ); static ssize_t edt_ft5x06_debugfs_raw_data_read(struct file *file,
Signature · 1 line
1.8.3.1
Dmitry Torokhov
maintainerHi Yang,
Quoted 3 lines · Yang Li
Fix the following coccicheck warning:
./drivers/input/touchscreen/edt-ft5x06.c:697:0-23: WARNING:debugfs_mode_fopsshould be defined withDEFINE_DEBUGFS_ATTRIBUTE
Thank you for the patch, however reading the coccinelle script not only we need to change the attribute definition, but also use debugfs_create_file_unsafe() to register it. I do not see the 2nd part of the change in your patch...
Quoted 23 lines
Reported-by Abaci Robot <[email protected]>Signed-off-by Yang Li <[email protected]>--- drivers/input/touchscreen/edt-ft5x06.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/input/touchscreen/edt-ft5x06.c +1
-1@@ -694,7 +694,7 @@ static int edt_ft5x06_debugfs_mode_set(void *data, u64 mode)return retval; }; -DEFINE_SIMPLE_ATTRIBUTE (debugfs_mode_fops, edt_ft5x06_debugfs_mode_get, +DEFINE_DEBUGFS_ATTRIBUTE (debugfs_mode_fops, edt_ft5x06_debugfs_mode_get, edt_ft5x06_debugfs_mode_set,"%llu\n" ); static ssize_t edt_ft5x06_debugfs_raw_data_read(struct file *file,Signature · 1 line
1.8.3.1
Thanks.
Signature · 1 line
Dmitry