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]
Message-ID: <30abe7aa-ce3a-782b-b4d4-b2177040ed6b@huawei.com>
Date: Wed, 28 Aug 2024 17:11:37 +0800
From: Zhihao Cheng <chengzhihao1@...wei.com>
To: Shen Lichuan <shenlichuan@...o.com>, <richard@....at>
CC: <linux-mtd@...ts.infradead.org>, <linux-kernel@...r.kernel.org>,
	<opensource.kernel@...o.com>
Subject: Re: [PATCH v1] ubifs: Convert to use ERR_CAST()

在 2024/8/28 16:59, Shen Lichuan 写道:
> As opposed to open-code, using the ERR_CAST macro clearly indicates that
> this is a pointer to an error value and a type conversion was performed.
> 
> Signed-off-by: Shen Lichuan <shenlichuan@...o.com>
> ---
>   fs/ubifs/lpt_commit.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 

Reviewed-by: Zhihao Cheng <chengzhihao1@...wei.com>
> diff --git a/fs/ubifs/lpt_commit.c b/fs/ubifs/lpt_commit.c
> index 07351fdce722..aa8837e6247c 100644
> --- a/fs/ubifs/lpt_commit.c
> +++ b/fs/ubifs/lpt_commit.c
> @@ -577,7 +577,7 @@ static struct ubifs_pnode *next_pnode_to_dirty(struct ubifs_info *c,
>   	/* Go right */
>   	nnode = ubifs_get_nnode(c, nnode, iip);
>   	if (IS_ERR(nnode))
> -		return (void *)nnode;
> +		return ERR_CAST(nnode);
>   
>   	/* Go down to level 1 */
>   	while (nnode->level > 1) {
> @@ -594,7 +594,7 @@ static struct ubifs_pnode *next_pnode_to_dirty(struct ubifs_info *c,
>   		}
>   		nnode = ubifs_get_nnode(c, nnode, iip);
>   		if (IS_ERR(nnode))
> -			return (void *)nnode;
> +			return ERR_CAST(nnode);
>   	}
>   
>   	for (iip = 0; iip < UBIFS_LPT_FANOUT; iip++)
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ