All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Bo Liu <liubo03@inspur.com>
Cc: michael@amarulasolutions.com,
	dario.binacchi@amarulasolutions.com,
	wsa+renesas@sang-engineering.com,
	oliver.graute@kococonnector.com, linux-input@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Input: edt-ft5x06 - replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE
Date: Tue, 1 Nov 2022 11:58:54 -0700	[thread overview]
Message-ID: <Y2FsbufV00jbyF0B@google.com> (raw)
In-Reply-To: <20221101081458.8119-1-liubo03@inspur.com>

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

      parent reply	other threads:[~2022-11-01 18:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y2FsbufV00jbyF0B@google.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=dario.binacchi@amarulasolutions.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liubo03@inspur.com \
    --cc=michael@amarulasolutions.com \
    --cc=oliver.graute@kococonnector.com \
    --cc=wsa+renesas@sang-engineering.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.