Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp169430ybl; Tue, 20 Aug 2019 17:43:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqwiuCx1F5zEmrtpa86LMOhkv6XcxzGqX2VY4m/hdAPfNzoXWob0gfxFcmq1eLNDlNMz6ljK X-Received: by 2002:a17:90a:35a7:: with SMTP id r36mr2733915pjb.17.1566348214596; Tue, 20 Aug 2019 17:43:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566348214; cv=none; d=google.com; s=arc-20160816; b=IZ+N+MZ8AfzyIMqBqBirw8BcP4N8bWgjztFol7I3dz6+KLk7OM3J49cQjvcwbo6tVp V61f0HjWORomfrmY1MWYi6R5dX9jSC0io2t3BLCqHRXXhetJQuQ9UwFf0/FbfHqtkPYG 4RLgoU4SxYFm1dsd+ngEP/OY7AuB2fD4FADYDPYRpBSqLear31raBSU0Ad7qnL++83Rs HKfmvW6P4gzfe4cUA4eS5drbtaO/EKQhDeHo4QwjWgGApYKKT0SFs8/+LbKbj6CEfxgf fabBV7LZt9sMd7datj8metgHS58ZEbkXyQqjqwPp2CLxL9GuNQFi7yplr1WLbrTVfEIw deNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=uoHNZJxJa9VRsV+z7AQWvIn+F0BxqijmyJlY6MgZLx4=; b=K4gcT91MaGxxN6P/7MN9Aw+ibbqIHgkYF85tq1aSubZ715vEPQY9G7r2k3hNNsXuQ+ c9CAImAefNRvYvG1k6Vj3j/XPAP8GTsOijW1Wx0cedUyiA2ez7FEnh5cJA7PtSdTX7Yg DArCHRQLz9LRtNyOwupYSrS6+OfXKy15EdJHSB6pTQ5XRS+aZ3tk6NzJ2qyHsBKSiZ6x /K6f7gIBKGCeRNEHwvwosxMO4bt3c5HpkM6g8Eu5SZ3e4jwkRKvxb5llscGuXSIS1uMa mwwlXKYVfTIEBrSLtlRrFJuuJ0nnDkUC92T2julUWOYKPeypDTcWTpNHxBJTbRFpHSH7 giew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@aol.com header.s=a2048 header.b=kuYZOndM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=aol.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j1si13125558pgk.187.2019.08.20.17.43.19; Tue, 20 Aug 2019 17:43:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@aol.com header.s=a2048 header.b=kuYZOndM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=aol.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726751AbfHUAkz (ORCPT + 99 others); Tue, 20 Aug 2019 20:40:55 -0400 Received: from sonic303-21.consmr.mail.ir2.yahoo.com ([77.238.178.202]:32905 "EHLO sonic303-21.consmr.mail.ir2.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726571AbfHUAkz (ORCPT ); Tue, 20 Aug 2019 20:40:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1566348053; bh=uoHNZJxJa9VRsV+z7AQWvIn+F0BxqijmyJlY6MgZLx4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject; b=kuYZOndMqe7ZC5FVvgqTPSEpRRpR/v17n+9t5OkwnoB/azmQsYebPx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.CRFSFIFzHrEzChXRZVc5BgoFwjtiWLFO ZI.yiu.13oXMtbvZ7LKEWTlINS4ynkYKevHWS9OFK6cfH0lvlXqiti3AJyq8DbvNWLg6VmlVhEZz z8JE8v8PcfpSkl9mdNaWOu1pekRdbY1tz_MVFtkRPMF_owBgcWZjlFTM3JMrWWP1ptDOWOm.ZTRQ FFz5zwez9E4ybJHA23D8hd889Mx.o3GGlcLZD8ioq_gnIwM0tirQUSsUNWNN77ZYCDsBHbfYNR1e OETXSoROVgqo1HH3fJqsxnMq26.KqAVEOpQdoVESyDRklcNzBAx10YQQgOUwZrMQnU8vgvK4NpFj _5iL.eWA8esgzd7qQXVxmiCPTs9Qf0MOcww63yQ5Fr7D4oEDzLjeJlMaU3Nc8jPFDyz53wzjFwSa fOQF2Dlz5IYqRDk7wQ2m.ikDhZ0Oa85W2uErgxpbA6kqZcjA0OZsgeQkFGzRSpF8WLLd2eZ.E8SV QGnwLyTj0Jdfo9LOOArcM.j1cJJvyXg-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic303.consmr.mail.ir2.yahoo.com with HTTP; Wed, 21 Aug 2019 00:40:53 +0000 Received: by smtp405.mail.ir2.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 9bc5d03928255fbfd31111b341626360; Wed, 21 Aug 2019 00:40:49 +0000 (UTC) Date: Wed, 21 Aug 2019 08:40:43 +0800 From: Gao Xiang To: Caitlyn Cc: Gao Xiang , Chao Yu , Greg Kroah-Hartman , devel@driverdev.osuosl.org, linux-erofs@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] staging/erofs: Balanced braces around a few conditional statements. Message-ID: <20190821004042.GB18606@hsiangkao-HP-ZHAN-66-Pro-G1> References: <1566346700-28536-1-git-send-email-caitlynannefinn@gmail.com> <1566346700-28536-3-git-send-email-caitlynannefinn@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1566346700-28536-3-git-send-email-caitlynannefinn@gmail.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 20, 2019 at 08:18:20PM -0400, Caitlyn wrote: > Balanced braces to fix some checkpath warnings in inode.c and > unzip_vle.c > > Signed-off-by: Caitlyn > --- > drivers/staging/erofs/inode.c | 4 ++-- > drivers/staging/erofs/unzip_vle.c | 12 ++++++------ > 2 files changed, 8 insertions(+), 8 deletions(-) > > diff --git a/drivers/staging/erofs/inode.c b/drivers/staging/erofs/inode.c > index 4c3d8bf..8de6fcd 100644 > --- a/drivers/staging/erofs/inode.c > +++ b/drivers/staging/erofs/inode.c > @@ -278,9 +278,9 @@ struct inode *erofs_iget(struct super_block *sb, > vi->nid = nid; > > err = fill_inode(inode, isdir); > - if (likely(!err)) > + if (likely(!err)) { > unlock_new_inode(inode); The only valid place is here. Thanks, Gao Xiang > - else { > + } else { > iget_failed(inode); > inode = ERR_PTR(err); > } > diff --git a/drivers/staging/erofs/unzip_vle.c b/drivers/staging/erofs/unzip_vle.c > index f0dab81..f431614 100644 > --- 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)) { > 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 { > mutex_lock(&z_pagemap_global_lock); > pages = z_pagemap_global; > } > -- > 2.7.4 > > _______________________________________________ > devel mailing list > devel@linuxdriverproject.org > http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel