Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2771392imj; Mon, 11 Feb 2019 08:13:24 -0800 (PST) X-Google-Smtp-Source: AHgI3IaoywE3az24u18z2/UTsziENErIF5in1s0bEd/KvQz9Y42cUc5GT7njQyxrYuM1y+y3FCzo X-Received: by 2002:a62:9359:: with SMTP id b86mr37476398pfe.161.1549901604492; Mon, 11 Feb 2019 08:13:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549901604; cv=none; d=google.com; s=arc-20160816; b=0MLSCJiYdvjLy0zLedKj1o8d/4FDblWp11O3O5gPGC0oopaQ38FLh3YPidlCToX9+B 4V8/JyA914znJCGF1a0+MIfs15yIGlW1vcpbHoDQCZDiPQma8SZeO3gjRFI7tKb749lJ pQ79tPI+WTjZpCHnsS78SC9ZdSoQnYyMB4Gr89yLiQP+GorENairlXV1ph+bejRRNpv2 Hsg+cbU/ORe6CLYKAHdmrrCMaXsxx0fe2WI49pehhsnt/rQ9dhil/pqpKyXM63MCGbYz IXH4flIsh6hiVi3vCq5JkQs39wvIHVAS7E2fa9+sTmCdcycOrHrKDCLku/YXQZCccRQd 7rvA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=9NtUPALFnhW6fghE7x2gC1qM65/44ftZF6msUVCknZA=; b=ZoQFze3YQGKXrZeBXw5HMhzRk2ffUR+DmuJEIOl+o+8qbZjFm3elv3H8aIu8Svp8wE RABWxxDBmO9/3x36z20F12O2j2W5ceHtp3cyKwvZtwchEv+I7ljFGQiDf8QGjIGqY0yg JGh33Uq6c+OAgg9OromhoZ6rW2HpHlPLGRPvtqr4+RZxzRD8T7kLqnfSr6jBommLXiOC n83SAjuxITdf4u3+sPUVDIzjfZF6eoGpY9BElORxywCzNV7OewcRNfDv38qAImTwYzBn yhkFgDrnmx811ZT3+UI0g6PPVeaBH4OvPN+8M0TEfV6yeQKcaB7lrKZsM4IgFge/5Akk 41Vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ktBJcyYQ; 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 b12si10221849pls.32.2019.02.11.08.13.03; Mon, 11 Feb 2019 08:13:24 -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=ktBJcyYQ; 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 S1729001AbfBKOX3 (ORCPT + 99 others); Mon, 11 Feb 2019 09:23:29 -0500 Received: from mail.kernel.org ([198.145.29.99]:56474 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728990AbfBKOX0 (ORCPT ); Mon, 11 Feb 2019 09:23:26 -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 D59D720844; Mon, 11 Feb 2019 14:23:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549895005; bh=b1IP5Ot1yceWBUc1lu2PwEGWl8UgeOe2aY3Rb1ZYoVQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ktBJcyYQXQxsyhN46Zb7+kArNYRRSg9O+Z+f47+3FXjNecw0MxEBOj3Cbiqsq3rzn DE9DHHD+50qyO4YcQdz7P6DfI6DqM1XkImSSJ6zKO21oYlt2/E7QTuSDX5wKju4np0 JXGJ/Zvl8dMn09hyD9mhIVzIwEW6m5vmiwubN71M= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chao Yu , Gao Xiang , Sasha Levin Subject: [PATCH 4.20 060/352] staging: erofs: fix the definition of DBG_BUGON Date: Mon, 11 Feb 2019 15:14:47 +0100 Message-Id: <20190211141849.951127858@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211141846.543045703@linuxfoundation.org> References: <20190211141846.543045703@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.20-stable review patch. If anyone has any objections, please let me know. ------------------ [ 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 57575c7f5635..048fb034b5aa 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 enum { -- 2.19.1