From patchwork Sun Oct 4 06:18:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geliang Tang X-Patchwork-Id: 7323161 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9ADB5BEEA4 for ; Sun, 4 Oct 2015 06:20:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C2352206DB for ; Sun, 4 Oct 2015 06:20:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E73C5206D5 for ; Sun, 4 Oct 2015 06:20:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751314AbbJDGTi (ORCPT ); Sun, 4 Oct 2015 02:19:38 -0400 Received: from m50-134.163.com ([123.125.50.134]:52855 "EHLO m50-134.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751199AbbJDGTI (ORCPT ); Sun, 4 Oct 2015 02:19:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id; bh=tHHthX1dMWmk6c02CN Ebd5/U/K1Gt1V+Y1xuWFfEXrI=; b=JABxxAhVlrdjcaU073LrfCvBHrMUfD67XG csa0POdUcdqgzCdhBTPfwUX6JZ0L3Rypzj4+4OPV/ZXlqVzQMwKNDJOd2UcJ88MH FCFHfLGeNc8BPi7wH5PW5X0r+hrNYP/dkLafNNpfr94HJbrMfpJ+lDoTKAdZUS+v gHCwLYw7Y= Received: from localhost (unknown [116.77.141.25]) by smtp4 (Coremail) with SMTP id DtGowED5uU6exBBWI_30AA--.23479S3; Sun, 04 Oct 2015 14:18:08 +0800 (CST) From: Geliang Tang To: "James E.J. Bottomley" Cc: Geliang Tang , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] scsi: drop unlikely behind BUG_ON() Date: Sun, 4 Oct 2015 14:18:01 +0800 Message-Id: X-Mailer: git-send-email 2.5.0 X-CM-TRANSID: DtGowED5uU6exBBWI_30AA--.23479S3 X-Coremail-Antispam: 1Uf129KBjvdXoW7JrWxZr1kuryDKF48Cry8Xwb_yoW3Cwc_CF 4vvr1xGF4jgrs2kw1jqrWxJr9093y8XFykCa4Sga43Zr1IvrZ0y34DZa43Ar4kWrW8Cw45 A3Z5Zr13Ar17JjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IUUd-PUUUUUU== X-Originating-IP: [116.77.141.25] X-CM-SenderInfo: 5jhoxtpqjwt0rj6rljoofrz/1tbivwCJmVWBNee2dQAAsq Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM,RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP BUG_ON() already contain an unlikely compiler flag. Drop it. Signed-off-by: Geliang Tang Reviewed-by: Bart Van Assche --- drivers/scsi/scsi_lib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index f570b48..3b5faab 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -1164,8 +1164,8 @@ int scsi_init_io(struct scsi_cmnd *cmd) count = blk_rq_map_integrity_sg(rq->q, rq->bio, prot_sdb->table.sgl); - BUG_ON(unlikely(count > ivecs)); - BUG_ON(unlikely(count > queue_max_integrity_segments(rq->q))); + BUG_ON(count > ivecs); + BUG_ON(count > queue_max_integrity_segments(rq->q)); cmd->prot_sdb = prot_sdb; cmd->prot_sdb->table.nents = count;