Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4252777yba; Sun, 19 May 2019 14:46:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqxKwUvrxStUFb3L5k8WMYNG/hN3L3otRLbRzt4db+cjQmzAV/U5LYfXZGYeATCZ1su3RnwJ X-Received: by 2002:a62:ae05:: with SMTP id q5mr74991511pff.13.1558302392605; Sun, 19 May 2019 14:46:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558302392; cv=none; d=google.com; s=arc-20160816; b=dwDf9F+OoSloqSB1DkgzjT7Vbrrqik9CHt3r61uJH3FwU0oZNfHTYHEDwZ3JgKMMxH /EzWLJe2cFg12sWMTer71uLn4hKBepAcqpUR4H0L6al0o2qhltgnOhIKDg97G1tAmjFb KtQMTKkfG9bpqWETQLSBz6nlpDTiBWQCWcTi9gSOry+Xg8mRnZGIxmqU/RmGcbsA64Xm mzVPPeMuCjW1Pyg72Z6kxN3rx00/zIBiYE7UV05NEWhPCtnPIV1DCxB50IsN6KYk9jmg 5IawPiwH4FFA9g/wA2ZR2y3ko0ERvQbMpl+YXJ6W57k/X/jHdD+gpFIrm9jluuFeuUV0 x+aw== 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:to:from:date:dkim-signature; bh=11epPDMxJKikdDuH5v438Dqzhu+8xiuwN8/dlEEPf7w=; b=bocSyFRqiFzQimL2vPSxJY9cDLHowasNFJVMly/RSSzEqzeZAhH9IT8UEBva0MRPwZ OYIC5Dhxw6zK3bJZpYGa7WKVLd0rSpbXFmKcdjwOVEblZLb62xzYyrH9Mr6XLittZaYP rebLe9FYHeBjgyWC/fQfx9A++nItMFhiti84lE9o8n3kkA/ldpflMudOePIBWVuUqqTr OunloOgTs5xvOuT4G/2USltk9r3tBslJul+9OI61++aAkzQmHf5A5OD+IGcFwEt/1DvA OfmOQuBHC0frbPo27Up0Y6OBYMpatPu8iRQYFfufIOEIkAvbTiMM7cSfUyBDI86R0Um5 ej/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=IrPi4dzj; 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 u1si15554267pgr.347.2019.05.19.14.46.16; Sun, 19 May 2019 14:46:32 -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=IrPi4dzj; 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 S1729912AbfESSes (ORCPT + 99 others); Sun, 19 May 2019 14:34:48 -0400 Received: from mail-pg1-f177.google.com ([209.85.215.177]:43346 "EHLO mail-pg1-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727344AbfESSes (ORCPT ); Sun, 19 May 2019 14:34:48 -0400 Received: by mail-pg1-f177.google.com with SMTP id t22so5655058pgi.10 for ; Sun, 19 May 2019 11:34:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=11epPDMxJKikdDuH5v438Dqzhu+8xiuwN8/dlEEPf7w=; b=IrPi4dzjuT6IuaUnXQW4C/RlKY8SAQGAI5efWh0a40wMRM8t2LHgHcz1avoKtU3abK bFUrCDyneTCImqczkLbYkM6PeugMcl6RjCaBzPHsUMb2p2Qfu+d2cdlSbWEhnOqUdzd4 2H6Hc9rb8zKSVSzvYcSMEXscOSsySGNNd1unU/69ZUdiwH8CToKoW11BzMulBk5jOYJa +H0GbeS85k3CzVc3RfSojyBPlo6/khO7Y7mF0IU6XLofQ4eJlBUFLEtkP0hBnuCAZJyx VZwLlivrukrcR2MuFInFQFIZ+SZZZvgRjujyAsXkfkLjoB7fGeVs54Ztp/RiBvut1iUN UlMw== 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:subject:message-id:mime-version :content-disposition:user-agent; bh=11epPDMxJKikdDuH5v438Dqzhu+8xiuwN8/dlEEPf7w=; b=s23+4aKluYAu7VTXPMBX59DFPT55xyrnLP3eyVtQ1NQdkrXgCy9134dKA8fl1ySl3q bjW3wGW9ZTnUjsJqZSR/Jsl+X6v/Wg7bxYiY8eOszMG8DrCrcjjCYO/4d4qyk7Tg2m0H aKkMFqA4f1gKY3GLtpWnrQYZOLwVFBhVQOXZV91ntL3bKpxB/+Xk1Krhk9Er4KDThXxA f89KUuyw6i+OHQsoSmdB8c2h3dGUUJtawnT5u/HEhtgpMG/U/hY656urD0ZnEWgJ5Cp6 ojnmHmmVU3nOS5SMvq9WnEzYY6YyQpzy97626tjEyPIwhuDYa2RNVnX+VLR59xconYaf /KXQ== X-Gm-Message-State: APjAAAVNfbI+rSXcbdWfCFsxkjdssDI30ccl+l1AjpPpipPgiI/OUeGT ifhRbQnDV1dvvZ3K7rj5cpwPIOAw X-Received: by 2002:a63:7141:: with SMTP id b1mr68253806pgn.331.1558258486280; Sun, 19 May 2019 02:34:46 -0700 (PDT) Received: from hari-Inspiron-1545 ([183.83.92.73]) by smtp.gmail.com with ESMTPSA id w189sm16622660pfw.147.2019.05.19.02.34.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 19 May 2019 02:34:45 -0700 (PDT) Date: Sun, 19 May 2019 15:04:40 +0530 From: Hariprasad Kelam To: Gao Xiang , Chao Yu , Greg Kroah-Hartman , linux-erofs@lists.ozlabs.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [Patch v2] staging: erofs: fix Warning Use BUG_ON instead of if condition followed by BUG Message-ID: <20190519093440.GA16838@hari-Inspiron-1545> 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 fix below warning reported by coccicheck drivers/staging/erofs/unzip_pagevec.h:74:2-5: WARNING: Use BUG_ON instead of if condition followed by BUG. Signed-off-by: Hariprasad Kelam ----- Changes in v2: - replace BUG_ON with DBG_BUGON ----- --- drivers/staging/erofs/unzip_pagevec.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/erofs/unzip_pagevec.h b/drivers/staging/erofs/unzip_pagevec.h index f37d8fd..7938ee3 100644 --- a/drivers/staging/erofs/unzip_pagevec.h +++ b/drivers/staging/erofs/unzip_pagevec.h @@ -70,8 +70,7 @@ z_erofs_pagevec_ctor_next_page(struct z_erofs_pagevec_ctor *ctor, return tagptr_unfold_ptr(t); } - if (unlikely(nr >= ctor->nr)) - BUG(); + DBG_BUGON(nr >= ctor->nr); return NULL; } -- 2.7.4