linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] crypto: caam: Convert to DEFINE_SHOW_ATTRIBUTE
@ 2020-07-16  9:04 Qinglang Miao
  2020-07-20 12:01 ` Horia Geantă
  0 siblings, 1 reply; 7+ messages in thread
From: Qinglang Miao @ 2020-07-16  9:04 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Horia Geantă, Aymen Sghaier
  Cc: linux-crypto, linux-kernel

From: Liu Shixin <liushixin2@huawei.com>

Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.

Signed-off-by: Liu Shixin <liushixin2@huawei.com>
---
 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


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH -next] crypto: caam: Convert to DEFINE_SHOW_ATTRIBUTE
  2020-07-16  9:04 [PATCH -next] crypto: caam: Convert to DEFINE_SHOW_ATTRIBUTE Qinglang Miao
@ 2020-07-20 12:01 ` Horia Geantă
  2020-07-23  7:25   ` Herbert Xu
  2020-09-18  1:29   ` miaoqinglang
  0 siblings, 2 replies; 7+ messages in thread
From: Horia Geantă @ 2020-07-20 12:01 UTC (permalink / raw)
  To: Qinglang Miao, Greg Kroah-Hartman, Aymen Sghaier
  Cc: linux-crypto, linux-kernel

On 7/16/2020 12:00 PM, Qinglang Miao wrote:
> From: Liu Shixin <liushixin2@huawei.com>
> 
> Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
> 
> Signed-off-by: Liu Shixin <liushixin2@huawei.com>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>

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

Horia

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH -next] crypto: caam: Convert to DEFINE_SHOW_ATTRIBUTE
  2020-07-20 12:01 ` Horia Geantă
@ 2020-07-23  7:25   ` Herbert Xu
  2020-07-25  9:00     ` miaoqinglang
  2020-09-18  1:29   ` miaoqinglang
  1 sibling, 1 reply; 7+ messages in thread
From: Herbert Xu @ 2020-07-23  7:25 UTC (permalink / raw)
  To: Horia Geantă
  Cc: miaoqinglang, gregkh, aymen.sghaier, linux-crypto, linux-kernel

Horia Geantă <horia.geanta@nxp.com> wrote:
> On 7/16/2020 12:00 PM, Qinglang Miao wrote:
>> From: Liu Shixin <liushixin2@huawei.com>
>> 
>> Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
>> 
>> Signed-off-by: Liu Shixin <liushixin2@huawei.com>
> Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
> 
> 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 <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH -next] crypto: caam: Convert to DEFINE_SHOW_ATTRIBUTE
  2020-07-23  7:25   ` Herbert Xu
@ 2020-07-25  9:00     ` miaoqinglang
  2020-07-25 12:05       ` Herbert Xu
  0 siblings, 1 reply; 7+ messages in thread
From: miaoqinglang @ 2020-07-25  9:00 UTC (permalink / raw)
  To: Herbert Xu, Horia Geantă
  Cc: gregkh, aymen.sghaier, linux-crypto, linux-kernel



在 2020/7/23 15:25, Herbert Xu 写道:
> Horia Geantă <horia.geanta@nxp.com> wrote:
>> On 7/16/2020 12:00 PM, Qinglang Miao wrote:
>>> From: Liu Shixin <liushixin2@huawei.com>
>>>
>>> Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
>>>
>>> Signed-off-by: Liu Shixin <liushixin2@huawei.com>
>> Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
>>
>> 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.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH -next] crypto: caam: Convert to DEFINE_SHOW_ATTRIBUTE
  2020-07-25  9:00     ` miaoqinglang
@ 2020-07-25 12:05       ` Herbert Xu
  2020-09-18  1:25         ` miaoqinglang
  0 siblings, 1 reply; 7+ messages in thread
From: Herbert Xu @ 2020-07-25 12:05 UTC (permalink / raw)
  To: miaoqinglang
  Cc: Horia Geantă, gregkh, aymen.sghaier, linux-crypto, linux-kernel

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 <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH -next] crypto: caam: Convert to DEFINE_SHOW_ATTRIBUTE
  2020-07-25 12:05       ` Herbert Xu
@ 2020-09-18  1:25         ` miaoqinglang
  0 siblings, 0 replies; 7+ messages in thread
From: miaoqinglang @ 2020-09-18  1:25 UTC (permalink / raw)
  To: Herbert Xu
  Cc: Horia Geantă, gregkh, aymen.sghaier, linux-crypto, linux-kernel



在 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,
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH -next] crypto: caam: Convert to DEFINE_SHOW_ATTRIBUTE
  2020-07-20 12:01 ` Horia Geantă
  2020-07-23  7:25   ` Herbert Xu
@ 2020-09-18  1:29   ` miaoqinglang
  1 sibling, 0 replies; 7+ messages in thread
From: miaoqinglang @ 2020-09-18  1:29 UTC (permalink / raw)
  To: Horia Geantă, Greg Kroah-Hartman, Aymen Sghaier
  Cc: linux-crypto, linux-kernel



在 2020/7/20 20:01, Horia Geantă 写道:
> On 7/16/2020 12:00 PM, Qinglang Miao wrote:
>> From: Liu Shixin <liushixin2@huawei.com>
>>
>> Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
>>
>> Signed-off-by: Liu Shixin <liushixin2@huawei.com>
> Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
> 
> 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
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-09-18  1:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-16  9:04 [PATCH -next] crypto: caam: Convert to DEFINE_SHOW_ATTRIBUTE Qinglang Miao
2020-07-20 12:01 ` Horia Geantă
2020-07-23  7:25   ` Herbert Xu
2020-07-25  9:00     ` miaoqinglang
2020-07-25 12:05       ` Herbert Xu
2020-09-18  1:25         ` miaoqinglang
2020-09-18  1:29   ` miaoqinglang

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).