Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp66imm; Wed, 5 Sep 2018 13:49:43 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZaYu5UMqB2iwqF/J8VTMA4/9811abdNKaZS6QqSfv1Yg4SUplCTRQN6Dh7D5aOAQMRY02H X-Received: by 2002:a63:6604:: with SMTP id a4-v6mr38112029pgc.404.1536180583682; Wed, 05 Sep 2018 13:49:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536180583; cv=none; d=google.com; s=arc-20160816; b=i+l0kpKjXZOBGFsbVgJMWqQGYDq0QW29WYmYvgsNoZ9RBM7pyzIDTFS7OJpN9EV0Yg s5QGRKi5HjOYxmklrjHKVK+GkesrL4E6PhX+eKSFkyhKimZxKstl60Osb3for2hmq3Jc 3xWY6xmsZSC48pj6oCwUybPoYfxNcOq2RLboUWmOPLoRqgfyj5rxaMProhIR866LUjk2 Up3iXhawFrt2mObDsubSWwbPsrNk4ez8+cMpfbRTf2aLaJ7kxWILRqysIx/hIst04WDW bSE4FVIWaLrVxi8wVI0ypq/N11ecwd0lATsiJahbtw9JvWpkjlmmTub9MrmGKg8XGV6L BujQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=D+xYC5Sko/yQRwd8YhDHzcuQLJgQw1NUi54D0OxmERM=; b=ufshQpnfvejdcZUMCEHP+TfkG5WrPgxwx18+HN0R8nn7Fkyi3IA+qTYL4qa7ZR0/MS SCuNcCPufmDfSHlba8s1nsxAEDX8DR633/plhxjrafz/oNdiyMjMgQwn3i6CdiCBKrCd GjTQJ3+ww6lUTtmg7EIGIPXQWxiZZ2LUmpqqrlBVEDSEB+PWuockqYOXXWIBBp5GAOkB RiozRKpPUU2ReWUWiK1LEI8gKPTHzJ8PsKiEUzoM2evuf22GnD3tDtdPby6SfHN2xp6n TpEr4wSXNAvL7yc94aESIXyBb7+w63yxAdMUZ9huEAs4yXecCEaQY5pOcjBSiDU0S69h 2dxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=UNYRgvCp; 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 p20-v6si2655867pgk.393.2018.09.05.13.49.27; Wed, 05 Sep 2018 13:49:43 -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=UNYRgvCp; 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 S1727882AbeIFBTZ (ORCPT + 99 others); Wed, 5 Sep 2018 21:19:25 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:41781 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727477AbeIFBTZ (ORCPT ); Wed, 5 Sep 2018 21:19:25 -0400 Received: by mail-lf1-f68.google.com with SMTP id l26-v6so7159390lfc.8; Wed, 05 Sep 2018 13:47:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=D+xYC5Sko/yQRwd8YhDHzcuQLJgQw1NUi54D0OxmERM=; b=UNYRgvCpM2bQW/zAoGCutPcxdYr86H8QdtIjc0YTM3g9IYtgKVaNg+O89zkKlqQ68g 16K9lNGgFOhSwy45bhIbTSGpOvui8nwzVLn2PFofalYKpybyFgDQnBhMprwIQdQ7oaVT gMYdxNLqjO7ed2OrhGwV+MlAEFjy8NvyzT8HfIcCuLKpJwLwo2PucJCWhrGnm5YKBIW8 ptCH2MuSSSl5WTg6jYSZzcDk8C5guUM9Lo4TYGDW57xkG+bO9LnrvNk0vSkz+Ewjc4NM 0yT4JFSgBXHH4+1bmHXTJdPyiAe6D7VFesaaXc3eFpSlY8O9S3gLjvQD4P1GuVn/OYKr g0aA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=D+xYC5Sko/yQRwd8YhDHzcuQLJgQw1NUi54D0OxmERM=; b=q/MFi8QPdixKq99LP+R3AWTVz4+eXw/R+Xuo+NAgxrc9rKT96EmhjP9O+d7y5psu3S fIOj3iOFg53EYd2iomYiO6gvrUxqN/pmTuJRQahD8jV2scIzl64elgCTASWl++oHWa3Z BiIvY4ke4RMmDzlTTL3JaT0vD1C68eDB4PapFGjfQJvn5BCJ0M9B7buQicnohr5E1KVN gI/AisVpav1KclIXwfIo774o8HM0VS7E+ZEv/2uoxCTwaEiGEjs8tj4ibe5a9Ug4/Gw7 zc9Jwv/Go0nyaMef9YmrEh3/sD4z+Y2l6HaPbq2xq0Fyx5S8RytD325bwfks73c0Zn2x m/QA== X-Gm-Message-State: APzg51BLxZGclHTLUGg+2wL7b+J4URCfFmeUIZipSyhDdBedEC8EpuKu K6qWlsfFGPdJ5pq0S2gNgriVvjS8EAU= X-Received: by 2002:a19:115b:: with SMTP id g88-v6mr24738430lfi.57.1536180449894; Wed, 05 Sep 2018 13:47:29 -0700 (PDT) Received: from Mort.jumbo.freeair (91-159-62-202.elisa-laajakaista.fi. [91.159.62.202]) by smtp.gmail.com with ESMTPSA id 103-v6sm477468lfs.28.2018.09.05.13.47.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Sep 2018 13:47:29 -0700 (PDT) From: Igor Stoppa X-Google-Original-From: Igor Stoppa To: "Martin K . Petersen" Cc: igor.stoppa@gmail.com, Igor Stoppa , "James E.J. Bottomley" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] scsi: remove unnecessary unlikely() Date: Wed, 5 Sep 2018 23:47:20 +0300 Message-Id: <20180905204720.992-1-igor.stoppa@huawei.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org BUG_ON() already contains an unlikely(), there is no need for another one. Signed-off-by: Igor Stoppa Cc: "Martin K. Petersen" Cc: "James E.J. Bottomley" Cc: linux-scsi@vger.kernel.org CC: linux-kernel@vger.kernel.org --- 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 0adfb3bce0fd..aaa1819b0a69 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -1207,8 +1207,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; -- 2.17.1