Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2766687imu; Sun, 9 Dec 2018 08:51:39 -0800 (PST) X-Google-Smtp-Source: AFSGD/XZ1GeCx0RjsBeNQ8slcCX9pkP5IpkmThgpfgQplJl+uz4oliVZhJzjf969oMLSkyDFC8Fw X-Received: by 2002:a17:902:4025:: with SMTP id b34mr9213607pld.181.1544374299297; Sun, 09 Dec 2018 08:51:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544374299; cv=none; d=google.com; s=arc-20160816; b=z2avN/+xu2lORLtZhuCkzdhb49S8/jLQx65IDnXuzTpMx9aXLB535Evtz2bbK0oUpl SxiRUoDoab4XKKxEo1+4HolSTgLjRWRdvc9zK7EXxK+tMdwBV69TbqKMurh6GAYVkhGJ JQqEzZOuiWQxt+Iuhoc/jzzfuNhmhl0oQWRhNlkuioyzXqyGxTq2aDvTvv4w6XTMWel0 c0BsUmFsJfjkZAKaP4+MkNBlIE7LhnmdxsoWxcp7NVTAZQdeTvVTzHKc4kdlGlIGmbYN rOuH1F2gOaN3d98yAfs7/wIGbX6MJczStssCGidQ4rG1vsPKUB7s1MO5jYXd3K0WQnbb qzbQ== 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=kLF8JuUwaoPwZQqLHs4FVsJEyFAKtobpDbYQCPo3QQg=; b=mJSFCDUNrpj0q50z0XFM8zSEI6F5P+6RLIWrcA0luJXKQjrwc9IxJ0P+AKuhrL3GKa ww1V7ANLgJV+Jdzdc7tmRnK9ThL0m0h1RbET+puAGlexXP4VEAOaaVvNMlQGSoK9eIZr Pp5TpopinyGhQM4zzTHeBEId/N785Y7mX1Lojig05p5VCs0eEsC1GfkSgBSAxGD+iF9G 4qILRd8VswzUGn4OGc/io1IcRHFcuXXCadrx3ybjXUebiaEn4i8c+7XOoekAIHwi0H54 OBDum+6tVL6z/K0f08zpKQYS1e4CddjiBUeHbdxZ34WR9cjFJR7jJo/a3qlguumkiDWc 7JkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=QG6KDOOl; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f35si7961098plh.399.2018.12.09.08.51.23; Sun, 09 Dec 2018 08:51:39 -0800 (PST) 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=@kernel.org header.s=default header.b=QG6KDOOl; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726290AbeLIQUR (ORCPT + 99 others); Sun, 9 Dec 2018 11:20:17 -0500 Received: from mail.kernel.org ([198.145.29.99]:55420 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726086AbeLIQUQ (ORCPT ); Sun, 9 Dec 2018 11:20:16 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AA36E20865; Sun, 9 Dec 2018 16:20:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544372416; bh=NKx9Rv8cfOUkSl/MPreubq4zoY+jwT9r88U2dDMg3h8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=QG6KDOOlN5KFEsaoHsJ2plFGBHm8AM/v905p1tf8X9DVD1oJiq4imtDB5jPCLOvSq DmkMb2Q58pvy5zBvTSMEGZd85T0P27c9UgtKp+uOLqIitgmJgC6UfwHJywvEBVDntw cIa5sWd8hhlQ4d109P+h66j7wIqtxKPlxEYxtopQ= Date: Sun, 9 Dec 2018 17:20:07 +0100 From: Greg KH To: Thomas Jespersen Cc: gaoxiang25@huawei.com, yuchao0@huawei.com, linux-erofs@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: erofs: Add braces to do-while statements Message-ID: <20181209162007.GA22432@kroah.com> References: <20181209155900.10164-1-laumann.thomas@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181209155900.10164-1-laumann.thomas@gmail.com> User-Agent: Mutt/1.11.1 (2018-12-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Dec 09, 2018 at 04:59:00PM +0100, Thomas Jespersen wrote: > This fixes warning reported by sparse (with -Wsparse-all). Why is sparse warning about this? > Signed-off-by: Thomas Jespersen > --- > drivers/staging/erofs/internal.h | 4 ++-- > drivers/staging/erofs/utils.c | 4 ++-- > 2 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/staging/erofs/internal.h b/drivers/staging/erofs/internal.h > index 57575c7f5635..bf180a803446 100644 > --- a/drivers/staging/erofs/internal.h > +++ b/drivers/staging/erofs/internal.h > @@ -232,9 +232,9 @@ static inline bool erofs_workgroup_get(struct erofs_workgroup *grp, int *ocnt) > /* spin if it is temporarily locked at the reclaim path */ > if (unlikely(o == locked)) { > #if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK) > - do > + do { > cpu_relax(); > - while (atomic_read(&grp->refcount) == locked); > + } while (atomic_read(&grp->refcount) == locked); That looks like valid code to me, why change this? greg k-h