Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp474240pxj; Fri, 14 May 2021 08:00:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxKCt/Y1Ai16oh/LQV/gjkQhqvRFUSZTri1Xt+DgK8lVjxoUthvUQYvwKj/9HQSLU24rLK8 X-Received: by 2002:a05:6402:1a58:: with SMTP id bf24mr17205675edb.146.1621004446464; Fri, 14 May 2021 08:00:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621004446; cv=none; d=google.com; s=arc-20160816; b=tpnBw2Lu8NXxAtbLk8NU9TTq+iW+b2Elxzljj4BTUJjftEHqhiumZSchkSGFCciK8Y W5F5E13OlbZWOJR6j2QOQMhAYEV9fr8s0nLr8MOJHn2CwdWsQ+Azd1Hj8FJHtwkMwpR+ xGxSwNdzaiLTRDo8TGDWMG6UfaY5yvxWne83FAkdiyQdKhrzB1SIF3iR6/NKOnCAw5Hr 6/39ncCRFU33d8f1PuL0pq0mQq5ps3igyXFKEV4hTyTqDZnyWHYfiKzWNUMB7/plG+y3 /v//zGL0bm7fPaUAm9Z1Cz8+srfVLrjpsiKVAb+bigHTy+tocA/F9pAz3KqsOaRl49Vi b0GA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=mlG25bpCTFSAKbYeZKG7vScV6cWQoES9+wW2ARm2JJU=; b=jZs1svSTxTqUtisSNn6VQJabWdoGE9F6fkJRZMKKkLddqmGNHE4SbbmWtmANEqPRJf JjKspemOxQC+0ia2AJb1wb6YYq/J6F1yXBtUuY+tqkBXHEN5rTQxollD3L+WK13KKVQi UFY4hUdHotRtBtvrld+2DHa5Wv+Xkw19vi5SwqAW6Rx4pxtzpv1Oba4yA0hmHzLq+K2+ ALkkN0kocDRSvaNI02XK8NhzEf4Dkg2tG8duAdy3kO7Oyqu8nDjaPQVp2b3QBi1RXK/4 4e5hfFltNDjkfi5KVlqIUM7KJocb/9RjAhUEMj8FrAtIgeJI2fJB5o55qjnzjTXdtZ19 bQRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=duxnHOMr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e12si6233715ejk.225.2021.05.14.08.00.23; Fri, 14 May 2021 08:00:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=duxnHOMr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233389AbhENIVQ (ORCPT + 99 others); Fri, 14 May 2021 04:21:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:45340 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229654AbhENIVO (ORCPT ); Fri, 14 May 2021 04:21:14 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3A07A61457; Fri, 14 May 2021 08:20:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1620980404; bh=t7IeHlZBRCXl4t7slKWm6HY44Ba6kKP4CTYxi9OlQ50=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=duxnHOMrhWHvICY5zKu5hJBjYtymCymdEL3dBYaTCfS4HqxPmkx/e0Nca2xvEyx7p BIztXq8OpS+fGEs2M4eJkWhYfT6vyVh8xmJZEvph9K+T/MbnKSxkvjGp3SK4q8P5K8 I0QA0FH33+1NUwEKrZRP+uN4mOVYcUONU7Vab1rCU/bl1Fem2TtgWLvIEOcKFhtl4C 1gnk/qffGkCMtZq6Kgva+2I/Y33NYdofYfebYcw37U71BMScA5zYJzEN8sScvEVpT6 J81uKVcsSX7Ku6G9Ga6dIcQW9/DWMdLNUX9t73PTbYbDh48gntnFIcOch2DPKPm5qX iA/7LKLCSdl5g== Date: Fri, 14 May 2021 10:20:00 +0200 From: Jessica Yu To: zhouchuangao Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] kernel/module: Use BUG_ON instead of if condition followed by BUG Message-ID: References: <1620828117-88111-1-git-send-email-zhouchuangao@vivo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <1620828117-88111-1-git-send-email-zhouchuangao@vivo.com> X-OS: Linux p200300cbcf361a0029e37a38368d6727.dip0.t-ipconnect.de 5.12.0-2-default x86_64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org +++ zhouchuangao [12/05/21 07:01 -0700]: >Fix the following coccinelle report: > >kernel/module.c:1018:2-5: >WARNING: Use BUG_ON instead of if condition followed by BUG. > >BUG_ON uses unlikely in if(). Through disassembly, we can see that >brk #0x800 is compiled to the end of the function. >As you can see below: > ...... > ffffff8008660bec: d65f03c0 ret > ffffff8008660bf0: d4210000 brk #0x800 > >Usually, the condition in if () is not satisfied. For the >multi-stage pipeline, we do not need to perform fetch decode >and excute operation on brk instruction. > >In my opinion, this can improve the efficiency of the >multi-stage pipeline. > >Signed-off-by: zhouchuangao Thanks for fixing the changelog. Queued on modules-next. Jessica