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] [day] [month] [year] [list]
Date:   Wed, 03 Feb 2021 23:34:05 -0800
From:   Joe Perches <joe@...ches.com>
To:     Zhiyuan Dai <daizhiyuan@...tium.com.cn>, jlayton@...nel.org,
        idryomov@...il.com
Cc:     ceph-devel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ceph: minor coding style tweaks

On Thu, 2021-02-04 at 14:32 +0800, Zhiyuan Dai wrote:
> Fixed some coding style issues, improve code reading.

Might describe the patch does 3 things:

o Move the pointer location
	struct foo* bar; -> struct foo *bar;
o Move brace position
  from
	struct foo
	{
  to
	struct foo {
o Alignment to open parenthesis

And one more comment:

> diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
[]
> @@ -309,8 +309,8 @@ static int ceph_fill_dirfrag(struct inode *inode,
>  
>  static int frag_tree_split_cmp(const void *l, const void *r)
>  {
> -	struct ceph_frag_tree_split *ls = (struct ceph_frag_tree_split*)l;
> -	struct ceph_frag_tree_split *rs = (struct ceph_frag_tree_split*)r;
> +	struct ceph_frag_tree_split *ls = (struct ceph_frag_tree_split *)l;
> +	struct ceph_frag_tree_split *rs = (struct ceph_frag_tree_split *)r;

It's unnecessary to cast void pointers and it's bad form to lose
the const qualifier.

	const struct ceph_frag_tree_split *ls = l;
	const struct ceph_frag_tree_split *rs = r;

>  	return ceph_frag_compare(le32_to_cpu(ls->frag),
>  				 le32_to_cpu(rs->frag));
>  }


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ