diff mbox series

mm/zbud: remove redundant initialization

Message ID 1600419885-191907-1-git-send-email-chenxiang66@hisilicon.com (mailing list archive)
State New, archived
Headers show
Series mm/zbud: remove redundant initialization | expand

Commit Message

chenxiang Sept. 18, 2020, 9:04 a.m. UTC
From: Xiang Chen <chenxiang66@hisilicon.com>

zhdr is already initialized in the front of the function, so remove
redundant initialization here.

Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
---
 mm/zbud.c | 1 -
 1 file changed, 1 deletion(-)

Comments

David Hildenbrand Sept. 22, 2020, 1:38 p.m. UTC | #1
On 18.09.20 11:04, chenxiang wrote:
> From: Xiang Chen <chenxiang66@hisilicon.com>
> 
> zhdr is already initialized in the front of the function, so remove
> redundant initialization here.
> 
> Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
> ---
>  mm/zbud.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/mm/zbud.c b/mm/zbud.c
> index bc93aa4..c49966e 100644
> --- a/mm/zbud.c
> +++ b/mm/zbud.c
> @@ -367,7 +367,6 @@ int zbud_alloc(struct zbud_pool *pool, size_t size, gfp_t gfp,
>  	spin_lock(&pool->lock);
>  
>  	/* First, try to find an unbuddied zbud page. */
> -	zhdr = NULL;
>  	for_each_unbuddied_list(i, chunks) {
>  		if (!list_empty(&pool->unbuddied[i])) {
>  			zhdr = list_first_entry(&pool->unbuddied[i],
> 

Reviewed-by: David Hildenbrand <david@redhat.com>
diff mbox series

Patch

diff --git a/mm/zbud.c b/mm/zbud.c
index bc93aa4..c49966e 100644
--- a/mm/zbud.c
+++ b/mm/zbud.c
@@ -367,7 +367,6 @@  int zbud_alloc(struct zbud_pool *pool, size_t size, gfp_t gfp,
 	spin_lock(&pool->lock);
 
 	/* First, try to find an unbuddied zbud page. */
-	zhdr = NULL;
 	for_each_unbuddied_list(i, chunks) {
 		if (!list_empty(&pool->unbuddied[i])) {
 			zhdr = list_first_entry(&pool->unbuddied[i],