* [PATCH] mm/zbud: remove redundant initialization
@ 2020-09-18 9:04 chenxiang
2020-09-22 13:38 ` David Hildenbrand
0 siblings, 1 reply; 2+ messages in thread
From: chenxiang @ 2020-09-18 9:04 UTC (permalink / raw)
To: sjenning, ddstreet; +Cc: linuxarm, linux-mm, Xiang Chen
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],
--
2.8.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mm/zbud: remove redundant initialization
2020-09-18 9:04 [PATCH] mm/zbud: remove redundant initialization chenxiang
@ 2020-09-22 13:38 ` David Hildenbrand
0 siblings, 0 replies; 2+ messages in thread
From: David Hildenbrand @ 2020-09-22 13:38 UTC (permalink / raw)
To: chenxiang, sjenning, ddstreet; +Cc: linuxarm, linux-mm
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>
--
Thanks,
David / dhildenb
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-09-22 13:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-18 9:04 [PATCH] mm/zbud: remove redundant initialization chenxiang
2020-09-22 13:38 ` David Hildenbrand
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.