[PATCH] crypto: ccp - Remove redundant __GFP_ZERO

Qianfeng Rong posted 1 patch 1 month, 3 weeks ago
drivers/crypto/ccp/hsti.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] crypto: ccp - Remove redundant __GFP_ZERO
Posted by Qianfeng Rong 1 month, 3 weeks ago
Remove the redundant __GFP_ZERO flag from kzalloc() since kzalloc()
inherently zeroes memory.

Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
---
 drivers/crypto/ccp/hsti.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/ccp/hsti.c b/drivers/crypto/ccp/hsti.c
index 1b39a4fb55c0..0ab3708951af 100644
--- a/drivers/crypto/ccp/hsti.c
+++ b/drivers/crypto/ccp/hsti.c
@@ -84,7 +84,7 @@ static int psp_poulate_hsti(struct psp_device *psp)
 		return 0;
 
 	/* Allocate command-response buffer */
-	req = kzalloc(sizeof(*req), GFP_KERNEL | __GFP_ZERO);
+	req = kzalloc(sizeof(*req), GFP_KERNEL);
 	if (!req)
 		return -ENOMEM;
 
-- 
2.34.1
Re: [PATCH] crypto: ccp - Remove redundant __GFP_ZERO
Posted by Herbert Xu 1 month, 2 weeks ago
On Fri, Aug 08, 2025 at 03:44:26PM +0800, Qianfeng Rong wrote:
> Remove the redundant __GFP_ZERO flag from kzalloc() since kzalloc()
> inherently zeroes memory.
> 
> Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
> ---
>  drivers/crypto/ccp/hsti.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Patch applied.  Thanks.
-- 
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
Re: [PATCH] crypto: ccp - Remove redundant __GFP_ZERO
Posted by Mario Limonciello 1 month, 3 weeks ago
On 8/8/2025 2:44 AM, Qianfeng Rong wrote:
> Remove the redundant __GFP_ZERO flag from kzalloc() since kzalloc()
> inherently zeroes memory.
> 
> Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
> ---
>   drivers/crypto/ccp/hsti.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/crypto/ccp/hsti.c b/drivers/crypto/ccp/hsti.c
> index 1b39a4fb55c0..0ab3708951af 100644
> --- a/drivers/crypto/ccp/hsti.c
> +++ b/drivers/crypto/ccp/hsti.c
> @@ -84,7 +84,7 @@ static int psp_poulate_hsti(struct psp_device *psp)
>   		return 0;
>   
>   	/* Allocate command-response buffer */
> -	req = kzalloc(sizeof(*req), GFP_KERNEL | __GFP_ZERO);
> +	req = kzalloc(sizeof(*req), GFP_KERNEL);
>   	if (!req)
>   		return -ENOMEM;
>   

Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>