[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200723072213.GA4760@gondor.apana.org.au>
Date: Thu, 23 Jul 2020 17:22:13 +1000
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Qinglang Miao <miaoqinglang@...wei.com>
Cc: gregkh@...uxfoundation.org, wangzhou1@...ilicon.com,
linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH -next] crypto: hisilicon: Convert to DEFINE_SHOW_ATTRIBUTE
Qinglang Miao <miaoqinglang@...wei.com> wrote:
> From: Liu Shixin <liushixin2@...wei.com>
>
> Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
>
> Signed-off-by: Liu Shixin <liushixin2@...wei.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@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Powered by blists - more mailing lists