Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3227469yba; Sat, 18 May 2019 12:01:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqw2SssETjHvhE6t29aJQM3T8EZC4DCnsxbgUq/48LoqZxrSN9y4Fidf8C9Y8uEwE4+SZPg1 X-Received: by 2002:a63:fa16:: with SMTP id y22mr25444432pgh.15.1558206112341; Sat, 18 May 2019 12:01:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558206112; cv=none; d=google.com; s=arc-20160816; b=QxHQWjugu66cpSfPZCa0QIt35pslt/DBwF5zlfu2sTsuy5SLByi4VfUmhj/OVzT6RF vEGtFLWDrgyG5TZc4nGRS/qDXGW5uRG1am37vuEq8WMBYcZDU0+eqnGZoz3S3mi85MGA b56zdfSAldUVXu3tCzpEw2zwoKVBKEnjSoqgQW8M2KN/ul3KzmUN9hr7XAhXVIYCwl6W 98kcN+GXbHWouhTEcjN88mX0JXzYfmZnxwip32ApSUIaqLXgImCg1Bng37YS1hG6iA4q 6YscI0SLIJkePiJrbfVyfMvaLxHXp5HMYbE3guR1kpNoKCh+PKXiNcdZGT1Qp2KYiFVM fTqg== 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=pBUOpcZZhVnAEMzK2Qi13gp5BqUlujzgGPYXraDy+LU=; b=LYuMna92ohK8q9o+lhf8kpeoGcCGliRwjPhZdZTt8srFSCQ/EZbqh/FyxiGAwxrngt It6cJu4pmjvs6cAWR2CZBU/34z8ljKVVoAzQ38ruX7M9ba5BhmW+hE9kk7XqjZ4v1vcZ zs6HDT4vhc5e8tavG8kFMXBjIs6e/9Yof1v42ea69LtuJZeblvNbWUtxLVfB7O03r9cs h8+e9Jm1zGLS44SRhnVvuZS8B9Uc2jpQFptlQT2s2lecBDHzJSMBy7KTAsy7CUIP1KUB h2YvRyDgzVoZKw3F4O7oeZe4chrKeYpcNVu74qZdLWMoAfsGMkHZFoxE0E8qU3sJ+viN Ujog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=auLY2NMG; 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 132si13652594pfx.25.2019.05.18.12.01.04; Sat, 18 May 2019 12:01:52 -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=auLY2NMG; 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 S1729182AbfERRdi (ORCPT + 99 others); Sat, 18 May 2019 13:33:38 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:46565 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727380AbfERRdh (ORCPT ); Sat, 18 May 2019 13:33:37 -0400 Received: by mail-pf1-f194.google.com with SMTP id y11so5180841pfm.13 for ; Sat, 18 May 2019 10:33:37 -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=pBUOpcZZhVnAEMzK2Qi13gp5BqUlujzgGPYXraDy+LU=; b=auLY2NMGRP93XGfuqVGmCFv10ilgSNvE32chNovFfE3hNYk+VsNegdj6oqOIFK73I8 nyRJu8ucZYf9s/GnyxmcyL1TYCVAB8kgcSbw2EBPUo1O27isB1yk6MS1MoqMAXBD4tyt 0o/2CbJmzo8YtOYlwlReJ2LTMk3330zP9twY45DZrszNfoE33pyL5rUYIYgZeKd9XUmD wdRxsywK2ENZRtEyaBQpGCWr5teezmZIRu83oMej7Cer77vKEQdQ5jv8UIiba4yaFrVK ZbheqtkH6gSt8mF/FDGh0HjKmeHUgjwWuD/oHMX52RIBM0oCj3XQz2PH6CtLkwnzARoT blZw== 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=pBUOpcZZhVnAEMzK2Qi13gp5BqUlujzgGPYXraDy+LU=; b=KhzAeSy0oh+PJ7PB4TMu1LMTwdEkl9htaCz3weg67wGYqwKOGEbK5E0j6t/oVQIHTW X3A3IU0Pacib4bMJOVZFxFtwv3RP0IP8JkzaWs8DCcwV+mr2pOnuk/5bQK5EEPaYn1Wv LYmmBVIjCB3OUFc81YxHnXTnUpOECuHdOeFPRZRoblPmLOpfuf/NmBIXVhWZNvkle5az fopdoz7ahLWlpvky/oakOmegVYi/Ck1ClsLxK2HxTYWcoujBV/NJhVTDMpjak2OLfki2 y/qlXdLk6ml92RAkWYOaArVb3xQI5IdM1nAEvThpINaxngL0/aqm/Lar4IwQII1JMvNb DViA== X-Gm-Message-State: APjAAAVkd3aAqs0L1xMVRMeNYz3IceSeD2HzZZmVRr+ubLWrtne2DQHw m/KG3sG7akP+7EO8L2rT7SIhog1S X-Received: by 2002:a63:c54d:: with SMTP id g13mr65078775pgd.376.1558200817033; Sat, 18 May 2019 10:33:37 -0700 (PDT) Received: from hari-Inspiron-1545 ([183.83.92.73]) by smtp.gmail.com with ESMTPSA id n21sm15160229pgf.28.2019.05.18.10.33.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 18 May 2019 10:33:36 -0700 (PDT) Date: Sat, 18 May 2019 23:03:31 +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] staging: erofs: fix Warning Use BUG_ON instead of if condition followed by BUG Message-ID: <20190518173331.GA1069@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 --- 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..0f61c54 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(); + BUG_ON(nr >= ctor->nr); return NULL; } -- 2.7.4