Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4152263yba; Sun, 19 May 2019 12:01:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqw7Fi8uTuCfANM5P8DW5x3j2fHo1NBhQqn/UcK7Ej46lwpzFjObUTzKiE5/1iRSMHxeWDsy X-Received: by 2002:a65:5347:: with SMTP id w7mr15014196pgr.375.1558292501709; Sun, 19 May 2019 12:01:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558292501; cv=none; d=google.com; s=arc-20160816; b=Z1K/lM2zcHUsqOnm13rlqYYXCtur6DUVyWkItKMi6R8XyF7yjJt2KajH50QgpkZm9n GR/cQ3KSRba+MbijEGFyoOuWPlilV1bUysykp7W1yOsCFYSAql73xofAONt0qrvZiODh gStL1XCp8POn4wdkvctShjKRR+HIlm/sLQk4UF0Zf3HBse7Pu0bzlRpFIB9yxMN3vzri VK1cA8NwIP/ZYFXT4Itu8w5roUVs6bs9d5es32n07+eNDzy/J0fez5EHxhO5Tad7m3j5 Y2hQV7r0M7Yu0oDLkHUgSnEcbH9kYfR3ecusF5B8xCj2aq9eCaVp3KrwZHfcTQx0kazP 4iKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:to:from:date:dkim-signature; bh=3nXBmIh7/vFkJ4Tm2l4dtTScuooDKNvEF1jpFXfvwsc=; b=dzVmc0RrWs6DJZ56uAXvvuCdQbem7OohWpdhZ4iVjxVKgBxL7RDxLbSJDmgcs8OQzu E1/Fh1LBNnB/STc4NKNhP0r2zsCHSb6EmGBkDOvJFyX0cHij3VkHRpPl/PTaMFG4UaxL p0AsgirNvg4pfPsp6+u9FWvyPE89gf1u3TOCEp9Wrze0FZ0WX5TccZpGdWPhOiUs8Jxv yuHbCVkXkfoEynfJEP4GWQQJhTty2Jbyf9HLHpo/eLZXobwIsk/IlLCTRNA6x3iseJz7 Xj4EYRN/6g1vWIe+RTlVoox20ZlHFn6VTMEcdy3HXuFpJTbpezDknvLjapYRcxDupWzy ZAJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=prPrOvv+; 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 o12si15866281plg.262.2019.05.19.12.01.26; Sun, 19 May 2019 12:01:41 -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=prPrOvv+; 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 S1727204AbfESRaZ (ORCPT + 99 others); Sun, 19 May 2019 13:30:25 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:43031 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725769AbfESRaZ (ORCPT ); Sun, 19 May 2019 13:30:25 -0400 Received: by mail-pl1-f193.google.com with SMTP id gn7so1441079plb.10 for ; Sun, 19 May 2019 10:30:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=3nXBmIh7/vFkJ4Tm2l4dtTScuooDKNvEF1jpFXfvwsc=; b=prPrOvv+nXzlq37dw9S0qdmegNQMY9mMQmGxVdosiPQlKvmQHZwzyNNaISmaHYISPL X+MnJT//NcQ21npBKca3WpAApauj41TAIoPfE8Yn1PKHUg9dRm+3twylCz1VcUhpj9AY TcBLFLBaEYI9qMBT/BXar0olvQLimM1sWud1T1/GfOO13CqMdqbUwAOF6akeVMHvShBG 389EvyUF/W8ChWuTLWfKobvsEmxcppXOOvx5AbluLHXBrSxVUDsPtbnSGtuNc47AipJP LrRYAfePFA7lz8yV6lvkrbyhb38/XY3u7Pi4ItdkOP+VRZUORZzNtLVvNvBwQHUVJgbK jkPQ== 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:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=3nXBmIh7/vFkJ4Tm2l4dtTScuooDKNvEF1jpFXfvwsc=; b=R+jVfNpSHDcdY7aT9vJ1878WuMHrDX4OWUdb6plfP+2TDQ7+u7u+E/axbDuKEnV9SX 9KbStvbn3Z+c1MAWyVhjV+eS92vAnQCsTRaAuuQhUFy8BeeP9z90ge4Tko8XIRtHs9WU l7eZ+9nWNmTRV56Y51extDtVhN8KpygiKCxozOGqgOBqLhi3t4XQNYDNhZTY4YhLXEzu oLTMwEcjTKJ+cVeFAogm6AESDHav3kwM2VJEaKGtEj6kpPKInGwhZZ+ymBW2aWP5l8Le ncLftjB4fskQ0JCpoDx1MVC9n16vNGOBXJajaq9ERARtxGA52umn5QfkZJgrHPEIb3xQ QWjg== X-Gm-Message-State: APjAAAUgHDBYV5C8zbqiAjyW/7qrtHHpAsdHvL6co3ZlxUsUNVtj9hJg x9CfKydRXHR1WZX6OR25eW6jb57s X-Received: by 2002:a17:902:204:: with SMTP id 4mr17066355plc.21.1558260698892; Sun, 19 May 2019 03:11:38 -0700 (PDT) Received: from hari-Inspiron-1545 ([183.83.92.73]) by smtp.gmail.com with ESMTPSA id c17sm9740268pfo.114.2019.05.19.03.11.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 19 May 2019 03:11:38 -0700 (PDT) Date: Sun, 19 May 2019 15:41:32 +0530 From: Hariprasad Kelam To: Gao Xiang , Gao Xiang , Chao Yu , Greg Kroah-Hartman , linux-erofs@lists.ozlabs.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [Patch v2] staging: erofs: fix Warning Use BUG_ON instead of if condition followed by BUG Message-ID: <20190519101132.GA22620@hari-Inspiron-1545> References: <20190519093440.GA16838@hari-Inspiron-1545> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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 On Sun, May 19, 2019 at 05:50:40PM +0800, Gao Xiang wrote: > > > On 2019/5/19 下午5:34, Hariprasad Kelam wrote: > > 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); > > } > > > > I'd like to delete this line > > > - if (unlikely(nr >= ctor->nr)) > > - BUG(); > > + DBG_BUGON(nr >= ctor->nr); > > > > and this line.. I have already sent a new patch based on your v1 patch, > could you please check it out if it is acceptable for you? :) > > Thanks, > Gao Xiang Hi Gai Xiang, The patch which you sent has all required. Thanks for the patch. We can ignore this v2 patch. Thanks, Hariprasad k > > return NULL; > > } > >