Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2718704imu; Sun, 9 Dec 2018 07:51:15 -0800 (PST) X-Google-Smtp-Source: AFSGD/X6p7wpJQgqMv32g/SEmyPIV1oymhTIRpSaRJQlr3FkH+uiE+0D/JYNmF8F4Co2KYUdDQN6 X-Received: by 2002:a17:902:a70b:: with SMTP id w11mr8932737plq.84.1544370675199; Sun, 09 Dec 2018 07:51:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544370675; cv=none; d=google.com; s=arc-20160816; b=Q47sdK6CWvhFFfM5RtRqgp8YpsgXNU6KYqhh7ip938OZHrIWN5z+xAqaVPKXJ7Rco9 1XfIwxNLUBwwV+qtQAhrfQjTgcPXKXf6DgSEkLu15YUecVikr8wAeCb0uZgJ72qM0D3n rZYG2pQovG6qsRcf/QjAiyB6zcDJQz+VauECPC9b6FsC6qoZkMzMl8rJvi94jVOUV5S1 VGEWUUiavyImjhxZpDdVYEc6hj04JCKIbcTMsYrsjXFwfs8eRHcgUovf6XSnDE4nuvEs i6CPv4zY82SSWF2MWxlmIphVIY0J7OBerp30yBEvLvOiMI3GfLIJku3CHAp6bHLgh+Sn QlhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=2UnM7SjM5idYEYNJNMIosUvMnjrwJ6EuFmsmm9FT2VQ=; b=JlSAX68eo3EZEwcdr0uBmigD3/J02SC0I6+ZDW3Iu1mO9nSEaRXSbSlQrZq7mK2V6n dPpcahTPwkCuwH/NnBEiV6OeMwvml2M3p++i6SkJOIvR/4kusIWT39igdRO87Q9IgWxT Nz1EKXMAA+hXr7ZGhm8ZL4FIdR5KM01j4loIi6AJmOdxZuavL1Q2wGDGj7qHb5th5qiF KGu8cLfm2622yalKSRvvXh1IIuv3hmJBzU0xKCfWqB8nGlXSCJvWb36c36J9d9xUMU6b VkBOgZPIGGcy0Wiybuu9nyhwLWtKD7uXE7m7HRNQi6cRj0OIq8xIsFXMD6mXPTakgPJZ PDIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=SSMgFM14; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i9si8057370plb.35.2018.12.09.07.50.57; Sun, 09 Dec 2018 07:51:15 -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=@gmail.com header.s=20161025 header.b=SSMgFM14; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726179AbeLIPtz (ORCPT + 99 others); Sun, 9 Dec 2018 10:49:55 -0500 Received: from mail-ed1-f68.google.com ([209.85.208.68]:34593 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726086AbeLIPty (ORCPT ); Sun, 9 Dec 2018 10:49:54 -0500 Received: by mail-ed1-f68.google.com with SMTP id b3so7481787ede.1 for ; Sun, 09 Dec 2018 07:49:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=2UnM7SjM5idYEYNJNMIosUvMnjrwJ6EuFmsmm9FT2VQ=; b=SSMgFM14IttMuSH3UyEfLMkZGbOEhxa3o2r3uxunMMRb+T3b8nKSZGGf6OK2r3kyG/ wIs0zfZZzGlBPQOC/maTOHqCVyc04QzFk8Ci9AiPBBxmTZlAwj320e+MioXly/9yLl8h g8rng1ghnOejBDhnrtqIbwaHq9IWynMZqJXe+dZo759flQzn6rlQ+cSiR7BgxHP6W9pJ 5GzO7NRLvWIHVAQEgZMRSBIAgX/pK1MTWxRYIGgU36wRlN5P1scOy9M+I37uiWwSXdlA Ho4tItWoMP2rz/F5T/smb8auL9EXkD/3IdPMRTGas6RBbEQSoJuQUfg4rG8h8JEg1LmS fEHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=2UnM7SjM5idYEYNJNMIosUvMnjrwJ6EuFmsmm9FT2VQ=; b=Wq0oiSBcAt75MAa14NcHTvE1+59CmjodZ4Yw+XK5tfVYgfuIflusRO5hX9GobndwX9 uOX9cyjwopuVKIaaLbMeMNIsVzd+VTbtiQzBaEntno7NwTTElENN98uU9EsCy3XsONyi 3KMva6S1meQgjrgHIbgH7JBpuRyxB9VchrlviH2zwVuuanuwhfSzYw41S7DchbjdKsRN g8NNNizwpDQqhKyRQJleZ4jBsRXO/pyLT31TRkJAYDdDnH/VhCzf8VA7eZ/VkSUBJcyg C+4xB63MqT/EwUwB2gLjgbPICYU+VzLlCW+vbv2M1EBXxJpErYS0YowakI8kpFS+ZxP/ aolQ== X-Gm-Message-State: AA+aEWaX46HxVHaeONIU1IObn2kNQkfP82p8KIdHommBzr/ROAJPtNt/ 14KLZY71gufacXUg5hhJX9uGSIOTh5E= X-Received: by 2002:a50:ba3d:: with SMTP id g58mr8715554edc.35.1544370593189; Sun, 09 Dec 2018 07:49:53 -0800 (PST) Received: from shadow.parknet.dk ([80.71.142.126]) by smtp.gmail.com with ESMTPSA id p36sm2687506edc.78.2018.12.09.07.49.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Dec 2018 07:49:52 -0800 (PST) From: Thomas Jespersen To: gaoxiang25@huawei.com, yuchao0@huawei.com Cc: gregkh@linuxfoundation.org, linux-erofs@lists.ozlabs.org, linux-kernel@vger.kernel.org, Thomas Jespersen Subject: [PATCH] staging: erofs: Add braces to do-while statements Date: Sun, 9 Dec 2018 16:59:00 +0100 Message-Id: <20181209155900.10164-1-laumann.thomas@gmail.com> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This fixes warning reported by sparse (with -Wsparse-all). 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); #endif goto repeat; } diff --git a/drivers/staging/erofs/utils.c b/drivers/staging/erofs/utils.c index ea8a962e5c95..cd76df4a48c7 100644 --- a/drivers/staging/erofs/utils.c +++ b/drivers/staging/erofs/utils.c @@ -217,9 +217,9 @@ unsigned long erofs_shrink_scan(struct shrinker *shrink, unsigned long freed = 0; spin_lock(&erofs_sb_list_lock); - do + do { run_no = ++shrinker_run_no; - while (run_no == 0); + } while (run_no == 0); /* Iterate over all mounted superblocks and try to shrink them */ p = erofs_sb_list.next; -- 2.19.2