2020-07-16 09:01:06

by Qinglang Miao

[permalink] [raw]
Subject: [PATCH -next] crypto: caam: Convert to DEFINE_SHOW_ATTRIBUTE

From: Liu Shixin <[email protected]>

Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.

Signed-off-by: Liu Shixin <[email protected]>
---
drivers/crypto/caam/dpseci-debugfs.c | 23 ++---------------------
1 file changed, 2 insertions(+), 21 deletions(-)

diff --git a/drivers/crypto/caam/dpseci-debugfs.c b/drivers/crypto/caam/dpseci-debugfs.c
index aa10841b6..0eca8c2fd 100644
--- a/drivers/crypto/caam/dpseci-debugfs.c
+++ b/drivers/crypto/caam/dpseci-debugfs.c
@@ -44,33 +44,14 @@ static int dpseci_dbg_fqs_show(struct seq_file *file, void *offset)
return 0;
}

-static int dpseci_dbg_fqs_open(struct inode *inode, struct file *file)
-{
- int err;
- struct dpaa2_caam_priv *priv;
-
- priv = (struct dpaa2_caam_priv *)inode->i_private;
-
- err = single_open(file, dpseci_dbg_fqs_show, priv);
- if (err < 0)
- dev_err(priv->dev, "single_open() failed\n");
-
- return err;
-}
-
-static const struct file_operations dpseci_dbg_fq_ops = {
- .open = dpseci_dbg_fqs_open,
- .read_iter = seq_read_iter,
- .llseek = seq_lseek,
- .release = single_release,
-};
+DEFINE_SHOW_ATTRIBUTE(dpseci_dbg_fqs);

void dpaa2_dpseci_debugfs_init(struct dpaa2_caam_priv *priv)
{
priv->dfs_root = debugfs_create_dir(dev_name(priv->dev), NULL);

debugfs_create_file("fq_stats", 0444, priv->dfs_root, priv,
- &dpseci_dbg_fq_ops);
+ &dpseci_dbg_fqs_fops);
}

void dpaa2_dpseci_debugfs_exit(struct dpaa2_caam_priv *priv)
--
2.17.1


2020-07-20 12:03:09

by Horia Geanta

[permalink] [raw]
Subject: Re: [PATCH -next] crypto: caam: Convert to DEFINE_SHOW_ATTRIBUTE

On 7/16/2020 12:00 PM, Qinglang Miao wrote:
> From: Liu Shixin <[email protected]>
>
> Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
>
> Signed-off-by: Liu Shixin <[email protected]>
Reviewed-by: Horia Geantă <[email protected]>

This patch depends on linux-next
commit 4d4901c6d748 ("seq_file: switch over direct seq_read method calls to seq_read_iter")

Horia

2020-07-23 07:26:37

by Herbert Xu

[permalink] [raw]
Subject: Re: [PATCH -next] crypto: caam: Convert to DEFINE_SHOW_ATTRIBUTE

Horia Geantă <[email protected]> wrote:
> On 7/16/2020 12:00 PM, Qinglang Miao wrote:
>> From: Liu Shixin <[email protected]>
>>
>> Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
>>
>> Signed-off-by: Liu Shixin <[email protected]>
> Reviewed-by: Horia Geantă <[email protected]>
>
> This patch depends on linux-next
> commit 4d4901c6d748 ("seq_file: switch over direct seq_read method calls to seq_read_iter")

Please postpone these cleanups until that patch hits mainline.

Thanks,
--
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

2020-07-25 09:01:02

by Qinglang Miao

[permalink] [raw]
Subject: Re: [PATCH -next] crypto: caam: Convert to DEFINE_SHOW_ATTRIBUTE



在 2020/7/23 15:25, Herbert Xu 写道:
> Horia Geantă <[email protected]> wrote:
>> On 7/16/2020 12:00 PM, Qinglang Miao wrote:
>>> From: Liu Shixin <[email protected]>
>>>
>>> Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
>>>
>>> Signed-off-by: Liu Shixin <[email protected]>
>> Reviewed-by: Horia Geantă <[email protected]>
>>
>> This patch depends on linux-next
>> commit 4d4901c6d748 ("seq_file: switch over direct seq_read method calls to seq_read_iter")
>
> Please postpone these cleanups until that patch hits mainline.
>
> Thanks,
>
Hi Horia,

I'm agree with what you said and I would repostpone these patch when it
hits mainline.

Or If you don't mind, I can resend a patch besed on mainline rather than
-next now.

Thanks,

Qinglang.

2020-07-25 12:07:40

by Herbert Xu

[permalink] [raw]
Subject: Re: [PATCH -next] crypto: caam: Convert to DEFINE_SHOW_ATTRIBUTE

On Sat, Jul 25, 2020 at 05:00:02PM +0800, miaoqinglang wrote:
>
> Or If you don't mind, I can resend a patch besed on mainline rather than
> -next now.

Please don't as that will just cause more conflicts.

Thanks,
--
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

2020-09-18 01:26:01

by Qinglang Miao

[permalink] [raw]
Subject: Re: [PATCH -next] crypto: caam: Convert to DEFINE_SHOW_ATTRIBUTE



?? 2020/7/25 20:05, Herbert Xu д??:
> On Sat, Jul 25, 2020 at 05:00:02PM +0800, miaoqinglang wrote:
>>
>> Or If you don't mind, I can resend a patch besed on mainline rather than
>> -next now.
>
> Please don't as that will just cause more conflicts.
>
Hi Herbert,

I've resent a new patch against linux-next(20200917), and it can
be applied to mainline cleanly now. There won't be conflicts anymore,

Thanks.

> Thanks,
>

2020-09-18 01:29:56

by Qinglang Miao

[permalink] [raw]
Subject: Re: [PATCH -next] crypto: caam: Convert to DEFINE_SHOW_ATTRIBUTE



在 2020/7/20 20:01, Horia Geantă 写道:
> On 7/16/2020 12:00 PM, Qinglang Miao wrote:
>> From: Liu Shixin <[email protected]>
>>
>> Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
>>
>> Signed-off-by: Liu Shixin <[email protected]>
> Reviewed-by: Horia Geantă <[email protected]>
>
> This patch depends on linux-next
> commit 4d4901c6d748 ("seq_file: switch over direct seq_read method calls to seq_read_iter")
Hi Horia,

I noticed that 4d4901c6d748 in linux-next has been reverted, so I resent
a new patch against linux-next(20200917), and it can be applied to
mainline cleanly now.

Thanks.
>
> Horia
>