Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp2299464img; Sun, 24 Mar 2019 05:13:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqzdp0puysX8hpZVbnS/O7wdtNhgl1fLAFvy/vNECctsKCZRBmIojyUcrtwrwdnQshz+ivA0 X-Received: by 2002:a62:1d90:: with SMTP id d138mr18637251pfd.232.1553429593266; Sun, 24 Mar 2019 05:13:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553429593; cv=none; d=google.com; s=arc-20160816; b=jSTTou15hIKjHv4TqKEEYzP1PgC+rx3Z8xeAoobbU62JF9JDWZpvlVCROy70sjsl0c CCxEvh7IvqoqbrhquytO8WhOZ3zM0zn1gbfLOGs0q+D8F/92JF01k75St9iXFcgPmtVw GnsvLffosNnMPti4zPJlJdmh1ZTzQ9ycNdw9bMrcxiHKN4OnmjkBAUtbpHc1TQpolLl7 MRPkdWss2HON6tqlsXObOkeC0n00MbLcgizVMc47KCC1fKb+I0D27qw0/zrAr9X6uM59 y+ClRIk7AsADUQ54vuQ+ZGWKqPDso/wMHLfVscjqv8uTBZ5jdLseCmz6tEPg6eycGQB3 2AyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature; bh=yHuINi4sCN1IqPYdZ4saS31vDOVSP80fewe1X4iki/s=; b=C8AdyLLwpg18kKQtF5ECoDcAxswlxJcFKvsPZjXyBTfRT3Enh92RvJ8bLPr7PejaE6 RXJuV6NqHINRPby7Wg+qhr9CQTmmyvXqDplisT63nZKSbpsrRp4SIP1rEas7v5vNiy6j SeGBiBd9wH/hbLWOZeWPr2MSiUt/fKJA3dKoHdYG8PVv8/70xHbGB3FGLJHBvd5Mourm 0eS4XnzWYue/GnC3KnaJqfWADqHOLMTRcFFOlYKOTC/mEG66d0BqZBMXKLu9/S8rn5DT EYOcejoJPK3QPtn3IUSi/mCLC79VdLdXr6Ff6frEGlhauVsT/PkJ6ce/NWPL1Lv4hUm1 VAaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="vdBVv/xY"; 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 p186si11237922pfp.85.2019.03.24.05.12.58; Sun, 24 Mar 2019 05:13:13 -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=@gmail.com header.s=20161025 header.b="vdBVv/xY"; 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 S1728745AbfCXMMQ (ORCPT + 99 others); Sun, 24 Mar 2019 08:12:16 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:45631 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726160AbfCXMMP (ORCPT ); Sun, 24 Mar 2019 08:12:15 -0400 Received: by mail-pf1-f195.google.com with SMTP id e24so3616709pfi.12 for ; Sun, 24 Mar 2019 05:12:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=yHuINi4sCN1IqPYdZ4saS31vDOVSP80fewe1X4iki/s=; b=vdBVv/xYt0WIBOille6OPDJMlSW16Rt10xhntoLZLpTcBzHchVBneMs21WxK/APw1L VXCWe+zyYqy0wCVwjY0yntzX0ikNimBZ3wysGV7/IYBChHUE+A3j4VzGEli/Bkz854NQ zo+jlDoQTkaouZVtHGKNlJinuv0QvXxU6JNiO1ZLXRE4AcFvw5epmLs4nQJrxuExJTkY Y+ymX8B3ISugocvMLAFZLvun/LGsjZAm3Zq9KY1rlVX5lTDdh7C9wybm/WfEuxOJiZvv DxMCmSpFG6Aqw5ihwl/xmaIYTUf+abG15yy4NV0K3cmxFm5yIXBrK0R68mQunISGPW2b gMdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=yHuINi4sCN1IqPYdZ4saS31vDOVSP80fewe1X4iki/s=; b=bxuJvtehjRAAYASldqe16VemnfHIynYbuGfegwrCGHD8oNywOhuQmxGC69dvV8OhaB CgTsCq+uvy9rDdrRY8GdsGt46W+OdoUCIfcfxpeaUL+r/4zZvBKjKVx27M5Gk8GuOP9v bqqI/J4roUToS8j2VlGNLL+7huWl+qNuCYKNAccnC2VCZnQaYpF2RJMoqGwJKzJYg22y tq48Ued8HYZsAxMmROgGVtvdfSE2xIUFFj1mL2KeRKpG2Qc1p6PM+9395oruvESLtjG1 iKAMXxk1zajC8cXf0eZEhpnJR8n6SCT8h24ymRIlXptztZ68fJuuJznJ+ypAcppkavcH rS3A== X-Gm-Message-State: APjAAAX1tw6qhTHpuaRyoX1wSNDAnjVT5MphqMUere1GdSk6Uv/Ho3G7 nCMayfUUXLAbe+8O8PQ15RQ= X-Received: by 2002:aa7:938b:: with SMTP id t11mr11698607pfe.67.1553429535263; Sun, 24 Mar 2019 05:12:15 -0700 (PDT) Received: from bharath12345-Inspiron-5559 ([103.110.42.32]) by smtp.gmail.com with ESMTPSA id v2sm19366067pfg.118.2019.03.24.05.12.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 24 Mar 2019 05:12:14 -0700 (PDT) Date: Sun, 24 Mar 2019 17:42:08 +0530 From: Bharath Vedartham To: gregkh@linuxfoundation.org, jfrederich@gmail.com, dsd@laptop.org, jon.nettleton@gmail.com Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [RFC/PATCH] staging: olpc_dcon: Use WARN_ON instead of BUG_ON Message-ID: <20190324121208.GA24213@bharath12345-Inspiron-5559> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is with respect to a checkpatch.pl CHECK: "Avoid crashing the kernel. Use WARN_ON instead of BUG_ON". But I maybe wrong here. Is a kernel crash desired if olpc_board_at_least(olpc_board(0xc2)) fails, will there be inconsistent results if execution continues? Signed-off-by: Bharath Vedartham --- drivers/staging/olpc_dcon/olpc_dcon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/olpc_dcon/olpc_dcon.c b/drivers/staging/olpc_dcon/olpc_dcon.c index 6b714f7..900baab7 100644 --- a/drivers/staging/olpc_dcon/olpc_dcon.c +++ b/drivers/staging/olpc_dcon/olpc_dcon.c @@ -138,7 +138,7 @@ static int dcon_bus_stabilize(struct dcon_priv *dcon, int is_powered_down) } if (x < 0) { pr_err("unable to stabilize dcon's smbus, reasserting power and praying.\n"); - BUG_ON(olpc_board_at_least(olpc_board(0xc2))); + WARN_ON(olpc_board_at_least(olpc_board(0xc2))); pm = 0; olpc_ec_cmd(EC_DCON_POWER_MODE, &pm, 1, NULL, 0); msleep(100); -- 2.7.4