lkml.org 
[lkml]   [2020]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/1] mm: remove an unnecessary goto jump
From
Date
On 05.05.20 13:58, Zhen Lei wrote:
> This "goto" doesn't reduce any code, but bother the readers.

"mm/page_io.c: mm: remove an unnecessary goto in generic_swapfile_activate"

>
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
> ---
> mm/page_io.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/mm/page_io.c b/mm/page_io.c
> index 76965be1d40e..b1d4f4558e6b 100644
> --- a/mm/page_io.c
> +++ b/mm/page_io.c
> @@ -235,10 +235,10 @@ int generic_swapfile_activate(struct swap_info_struct *sis,
> sis->highest_bit = page_no - 1;
> out:
> return ret;
> +

nit: I'd just not mess with newlines here.

> bad_bmap:
> pr_err("swapon: swapfile has holes\n");
> - ret = -EINVAL;
> - goto out;
> + return -EINVAL;
> }
>
> /*
>

apart from that

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


--
Thanks,

David / dhildenb

\
 
 \ /
  Last update: 2020-05-08 10:07    [W:0.060 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site