lkml.org 
[lkml]   [2019]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/2] staging/erofs: Balanced braces around a few conditional statements.
From
Date
On Tue, 2019-08-20 at 20:18 -0400, Caitlyn wrote:
> Balanced braces to fix some checkpath warnings in inode.c and
> unzip_vle.c
[]
> diff --git a/drivers/staging/erofs/unzip_vle.c b/drivers/staging/erofs/unzip_vle.c
[]
> @@ -915,21 +915,21 @@ static int z_erofs_vle_unzip(struct super_block *sb,
> mutex_lock(&work->lock);
> nr_pages = work->nr_pages;
>
> - if (likely(nr_pages <= Z_EROFS_VLE_VMAP_ONSTACK_PAGES))
> + if (likely(nr_pages <= Z_EROFS_VLE_VMAP_ONSTACK_PAGES)) {
> pages = pages_onstack;
> - else if (nr_pages <= Z_EROFS_VLE_VMAP_GLOBAL_PAGES &&
> - mutex_trylock(&z_pagemap_global_lock))
> + } else if (nr_pages <= Z_EROFS_VLE_VMAP_GLOBAL_PAGES &&
> + mutex_trylock(&z_pagemap_global_lock)) {

Extra space after tab

> pages = z_pagemap_global;
> - else {
> + } else {
> repeat:
> pages = kvmalloc_array(nr_pages, sizeof(struct page *),
> GFP_KERNEL);
>
> /* fallback to global pagemap for the lowmem scenario */
> if (unlikely(!pages)) {
> - if (nr_pages > Z_EROFS_VLE_VMAP_GLOBAL_PAGES)
> + if (nr_pages > Z_EROFS_VLE_VMAP_GLOBAL_PAGES) {
> goto repeat;
> - else {
> + } else {

Unnecessary else

> mutex_lock(&z_pagemap_global_lock);
> pages = z_pagemap_global;
> }


\
 
 \ /
  Last update: 2019-08-21 04:27    [W:0.142 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site