lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200717211420.GA4140@amd>
Date:   Fri, 17 Jul 2020 23:14:20 +0200
From:   Pavel Machek <pavel@...x.de>
To:     Qinglang Miao <miaoqinglang@...wei.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Santosh Shilimkar <ssantosh@...nel.org>,
        linux-bcache@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH -next] memory: Convert to DEFINE_SHOW_ATTRIBUTE

On Thu 2020-07-16 17:03:03, Qinglang Miao wrote:
> From: Yongqiang Liu <liuyongqiang13@...wei.com>
> 
> Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
> 
> Signed-off-by: Yongqiang Liu <liuyongqiang13@...wei.com>
> ---
>  drivers/memory/emif.c               | 22 ++--------------------
>  drivers/memory/tegra/tegra124-emc.c | 14 +-------------
>  2 files changed, 3 insertions(+), 33 deletions(-)
> 
> diff --git a/drivers/memory/emif.c b/drivers/memory/emif.c
> index 58a82eea5..aab8ddad7 100644
> --- a/drivers/memory/emif.c
> +++ b/drivers/memory/emif.c
> @@ -131,16 +131,7 @@ static int emif_regdump_show(struct seq_file *s, void *unused)
>  	return 0;
>  }
>  
> -static int emif_regdump_open(struct inode *inode, struct file *file)
> -{
> -	return single_open(file, emif_regdump_show, inode->i_private);
> -}
> -
> -static const struct file_operations emif_regdump_fops = {
> -	.open			= emif_regdump_open,
> -	.read_iter			= seq_read_iter,
> -	.release		= single_release,
> -};
> +DEFINE_SHOW_ATTRIBUTE(emif_regdump);

This is not equivalent (and I guess changelog should mention that).

Along with other changes, we get:

        .owner          = THIS_MODULE,
        .llseek         = seq_lseek,

. Is that okay thing to add?
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ