* [PATCH] Input: edt-ft5x06 - replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE
@ 2022-11-01 8:14 Bo Liu
2022-11-01 15:47 ` Oliver Graute
2022-11-01 18:58 ` Dmitry Torokhov
0 siblings, 2 replies; 3+ messages in thread
From: Bo Liu @ 2022-11-01 8:14 UTC (permalink / raw)
To: dmitry.torokhov
Cc: michael, dario.binacchi, wsa+renesas, oliver.graute, linux-input,
linux-kernel, Bo Liu
Fix the following coccicheck warning:
drivers/input/touchscreen/edt-ft5x06.c:756:0-23: WARNING:
debugfs_mode_fops should be defined with DEFINE_DEBUGFS_ATTRIBUTE
Signed-off-by: Bo Liu <liubo03@inspur.com>
---
drivers/input/touchscreen/edt-ft5x06.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c
index 9ac1378610bc..a184425b6985 100644
--- a/drivers/input/touchscreen/edt-ft5x06.c
+++ b/drivers/input/touchscreen/edt-ft5x06.c
@@ -753,7 +753,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,
--
2.27.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Input: edt-ft5x06 - replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE
2022-11-01 8:14 [PATCH] Input: edt-ft5x06 - replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE Bo Liu
@ 2022-11-01 15:47 ` Oliver Graute
2022-11-01 18:58 ` Dmitry Torokhov
1 sibling, 0 replies; 3+ messages in thread
From: Oliver Graute @ 2022-11-01 15:47 UTC (permalink / raw)
To: Bo Liu
Cc: dmitry.torokhov, michael, dario.binacchi, wsa+renesas,
linux-input, linux-kernel
> Am 01.11.2022 um 09:14 schrieb Bo Liu <liubo03@inspur.com>:
>
> Fix the following coccicheck warning:
> drivers/input/touchscreen/edt-ft5x06.c:756:0-23: WARNING:
> debugfs_mode_fops should be defined with DEFINE_DEBUGFS_ATTRIBUTE
>
> Signed-off-by: Bo Liu <liubo03@inspur.com>
Reviewed-by: Oliver Graute <oliver.graute@kococonnector.com>
> ---
> drivers/input/touchscreen/edt-ft5x06.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c
> index 9ac1378610bc..a184425b6985 100644
> --- a/drivers/input/touchscreen/edt-ft5x06.c
> +++ b/drivers/input/touchscreen/edt-ft5x06.c
> @@ -753,7 +753,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,
> --
> 2.27.0
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Input: edt-ft5x06 - replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE
2022-11-01 8:14 [PATCH] Input: edt-ft5x06 - replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE Bo Liu
2022-11-01 15:47 ` Oliver Graute
@ 2022-11-01 18:58 ` Dmitry Torokhov
1 sibling, 0 replies; 3+ messages in thread
From: Dmitry Torokhov @ 2022-11-01 18:58 UTC (permalink / raw)
To: Bo Liu
Cc: michael, dario.binacchi, wsa+renesas, oliver.graute, linux-input,
linux-kernel
Hi Bo,
On Tue, Nov 01, 2022 at 04:14:58AM -0400, Bo Liu wrote:
> Fix the following coccicheck warning:
> drivers/input/touchscreen/edt-ft5x06.c:756:0-23: WARNING:
> debugfs_mode_fops should be defined with DEFINE_DEBUGFS_ATTRIBUTE
This is not a great justification for a change. Could you please update
the patch description to document why DEFINE_DEBUGFS_ATTRIBUTE is
preferred over DEFINE_SIMPLE_ATTRIBUTE?
>
> Signed-off-by: Bo Liu <liubo03@inspur.com>
> ---
> drivers/input/touchscreen/edt-ft5x06.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c
> index 9ac1378610bc..a184425b6985 100644
> --- a/drivers/input/touchscreen/edt-ft5x06.c
> +++ b/drivers/input/touchscreen/edt-ft5x06.c
> @@ -753,7 +753,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,
> --
> 2.27.0
>
Thanks.
--
Dmitry
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-11-01 18:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-01 8:14 [PATCH] Input: edt-ft5x06 - replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE Bo Liu
2022-11-01 15:47 ` Oliver Graute
2022-11-01 18:58 ` Dmitry Torokhov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).