* [PATCH -next] crypto: hisilicon: Convert to DEFINE_SHOW_ATTRIBUTE
@ 2020-07-16 9:03 Qinglang Miao
2020-07-23 7:22 ` Herbert Xu
0 siblings, 1 reply; 2+ messages in thread
From: Qinglang Miao @ 2020-07-16 9:03 UTC (permalink / raw)
To: Greg Kroah-Hartman, Zhou Wang; +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/hisilicon/qm.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/hisilicon/qm.c
index b594dc728..5f16d8ae7 100644
--- a/drivers/crypto/hisilicon/qm.c
+++ b/drivers/crypto/hisilicon/qm.c
@@ -1046,17 +1046,7 @@ static int qm_regs_show(struct seq_file *s, void *unused)
return 0;
}
-static int qm_regs_open(struct inode *inode, struct file *file)
-{
- return single_open(file, qm_regs_show, inode->i_private);
-}
-
-static const struct file_operations qm_regs_fops = {
- .owner = THIS_MODULE,
- .open = qm_regs_open,
- .read_iter = seq_read_iter,
- .release = single_release,
-};
+DEFINE_SHOW_ATTRIBUTE(qm_regs);
static ssize_t qm_cmd_read(struct file *filp, char __user *buffer,
size_t count, loff_t *pos)
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] crypto: hisilicon: Convert to DEFINE_SHOW_ATTRIBUTE
2020-07-16 9:03 [PATCH -next] crypto: hisilicon: Convert to DEFINE_SHOW_ATTRIBUTE Qinglang Miao
@ 2020-07-23 7:22 ` Herbert Xu
0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2020-07-23 7:22 UTC (permalink / raw)
To: Qinglang Miao; +Cc: gregkh, wangzhou1, linux-crypto, linux-kernel
Qinglang Miao <miaoqinglang@huawei.com> wrote:
> 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/hisilicon/qm.c | 12 +-----------
> 1 file changed, 1 insertion(+), 11 deletions(-)
>
> diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/hisilicon/qm.c
> index b594dc728..5f16d8ae7 100644
> --- a/drivers/crypto/hisilicon/qm.c
> +++ b/drivers/crypto/hisilicon/qm.c
> @@ -1046,17 +1046,7 @@ static int qm_regs_show(struct seq_file *s, void *unused)
> return 0;
> }
>
> -static int qm_regs_open(struct inode *inode, struct file *file)
> -{
> - return single_open(file, qm_regs_show, inode->i_private);
> -}
> -
> -static const struct file_operations qm_regs_fops = {
> - .owner = THIS_MODULE,
> - .open = qm_regs_open,
> - .read_iter = seq_read_iter,
> - .release = single_release,
> -};
> +DEFINE_SHOW_ATTRIBUTE(qm_regs);
This doesn't apply against the cryptodev tree. If this patch
depends on another one, you should post them together in a series.
Cheers,
--
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] 2+ messages in thread
end of thread, other threads:[~2020-07-23 7:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-16 9:03 [PATCH -next] crypto: hisilicon: Convert to DEFINE_SHOW_ATTRIBUTE Qinglang Miao
2020-07-23 7:22 ` Herbert Xu
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).