Re: [PATCH] net/bluetooth: Fix the follow coccicheck warnings

From: Marcel Holtmann
Date: Tue Jan 26 2021 - 02:37:01 EST


Hi Jiapeng,

> ./net/bluetooth/hci_debugfs.c: WARNING: sniff_min_interval_fops
> should be defined with DEFINE_DEBUGFS_ATTRIBUTE
>
> Signed-off-by: Jiapeng Zhong <abaci-bugfix@xxxxxxxxxxxxxxxxx>
> Reported-by: Abaci Robot<abaci@xxxxxxxxxxxxxxxxx>
> ---
> net/bluetooth/hci_debugfs.c | 38 +++++++++++++++++++-------------------
> 1 file changed, 19 insertions(+), 19 deletions(-)
>
> diff --git a/net/bluetooth/hci_debugfs.c b/net/bluetooth/hci_debugfs.c
> index 4626e02..65cad9f 100644
> --- a/net/bluetooth/hci_debugfs.c
> +++ b/net/bluetooth/hci_debugfs.c
> @@ -237,7 +237,7 @@ static int conn_info_min_age_get(void *data, u64 *val)
> return 0;
> }
>
> -DEFINE_SIMPLE_ATTRIBUTE(conn_info_min_age_fops, conn_info_min_age_get,
> +DEFINE_DEBUGFS_ATTRIBUTE(conn_info_min_age_fops, conn_info_min_age_get,
> conn_info_min_age_set, "%llu\n");

while I am fine with the patch, put please make sure the indentation alignment of the second line is also correct.

Regards

Marcel