Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3626818imu; Mon, 28 Jan 2019 08:04:34 -0800 (PST) X-Google-Smtp-Source: ALg8bN4LnGBA5XP0YwwLGRwfOsE34+pifYOwIrnr7yAbjD2KGN7ZxVcIxhzh51r9mfsUEWvlyxRk X-Received: by 2002:a17:902:830a:: with SMTP id bd10mr22451163plb.321.1548691474320; Mon, 28 Jan 2019 08:04:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548691474; cv=none; d=google.com; s=arc-20160816; b=yhR5/D2lH+czhCZ2O5Z3Dsw6q1s2P/tkbAE95Hym2aChV7izTQzvmDewijQVaTw4pC zTjY3SQ3lftRZpZiAqa8WrvFqnuvenSW2cSiXZyJX4sJASAInc0kY84MfujtbSaUHPHp r3OkVm+BW+OS72zT46ISLBXvwelaf+zG68DwYvlwmRHC5nnaPicKzIpbbSc80jsK0lGv usUzBFjlZ2zNZnHAnvEwVTz2YtJeLE+k0hWIjCzA3Je2DHvJ540uf2PhEm2dfJAa57zd Dob27CgNDkgIvF+ES5IXjbavkBDIl+e729YuhsDAEOgmdUwFXB+hYDc1Iv2FjRMRHfui OGcg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=GSY5HTsopLrSveUdkMfWeWv+KQ9rf773UV022ARIlic=; b=0u5JJEtD3CiUxCCXS0qHrfvMfpudfycrmW0wc2KIVdfLIqD4oihIJRmUO/HeybWzur SHKdr7efJBADxbLrJR4rCh6+VHjg2ilzODfdKdzKcVQ0eXDoRC8fd7lAMgYF8kf01wyu gT7tY7QPe2iDcOXV0DvGB9UB3yi0fEb2H5ClZ9GO4p4/cU6f3yvPydclpfeIwztJluN4 CF3fZZmzPrlMsl21xWyspQilOFwpfDiED4FSyejblZbdxttbASbALkvC+SW9/2rHQm98 F90xrtvaKfr+WIkS9+NoGLr0tP4ygXywPlkwIDzojNlmhM26ge0vH8rDPGGKSrgUzqOG efew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=FOUO1o4e; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z5si443595pgu.19.2019.01.28.08.04.18; Mon, 28 Jan 2019 08:04:34 -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=FOUO1o4e; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731199AbfA1QCE (ORCPT + 99 others); Mon, 28 Jan 2019 11:02:04 -0500 Received: from mail.kernel.org ([198.145.29.99]:47274 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731166AbfA1QCC (ORCPT ); Mon, 28 Jan 2019 11:02:02 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3CFF721927; Mon, 28 Jan 2019 16:02:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548691321; bh=bfYfdsACu4/XDMdOLmpqe4guQy3fQQGA9ejQermmO4c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FOUO1o4e6wvFceuLFbrGsbM+i7xPuv65Bz8xCHyHIW55GdJYHUfmllqySJ18sxdYN d2vqxuTZLak1kQG2VHYaQfX9GGM3fm/5BzSjIqYu0UWa+8ASI/E3EoQbgeOwPiV09C dOLxiuJqPOTOoiYVqxxkkR92MshVcNpxkj8mDU2w= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Gao Xiang , Greg Kroah-Hartman , Sasha Levin , linux-erofs@lists.ozlabs.org, devel@driverdev.osuosl.org Subject: [PATCH AUTOSEL 4.19 058/258] staging: erofs: fix the definition of DBG_BUGON Date: Mon, 28 Jan 2019 10:56:04 -0500 Message-Id: <20190128155924.51521-58-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190128155924.51521-1-sashal@kernel.org> References: <20190128155924.51521-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Gao Xiang [ Upstream commit eef168789866514e5d4316f030131c9fe65b643f ] It's better not to positively BUG_ON the kernel, however developers need a way to locate issues as soon as possible. DBG_BUGON is introduced and it could only crash when EROFS_FS_DEBUG (EROFS developping feature) is on. It is helpful for developers to find and solve bugs quickly by eng builds. Previously, DBG_BUGON is defined as ((void)0) if EROFS_FS_DEBUG is off, but some unused variable warnings as follows could occur: drivers/staging/erofs/unzip_vle.c: In function `init_alway:': drivers/staging/erofs/unzip_vle.c:61:33: warning: unused variable `work' [-Wunused-variable] struct z_erofs_vle_work *const work = ^~~~ Fix it to #define DBG_BUGON(x) ((void)(x)). Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/staging/erofs/internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/erofs/internal.h b/drivers/staging/erofs/internal.h index 367b39fe46e5..e6313c54e3ad 100644 --- a/drivers/staging/erofs/internal.h +++ b/drivers/staging/erofs/internal.h @@ -39,7 +39,7 @@ #define debugln(x, ...) ((void)0) #define dbg_might_sleep() ((void)0) -#define DBG_BUGON(...) ((void)0) +#define DBG_BUGON(x) ((void)(x)) #endif #ifdef CONFIG_EROFS_FAULT_INJECTION -- 2.19.1