linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] infiniband: scsi: remove unnecessary unlikely()
@ 2018-08-31 20:16 Igor Stoppa
  2018-09-05 21:52 ` Jason Gunthorpe
  0 siblings, 1 reply; 2+ messages in thread
From: Igor Stoppa @ 2018-08-31 20:16 UTC (permalink / raw)
  To: Bart Van Assche; +Cc: igor.stoppa, Igor Stoppa, linux-rdma, linux-kernel

WARN_ON() already contains an unlikely(), so it's not necessary to
wrap it into another.

Signed-off-by: Igor Stoppa <igor.stoppa@huawei.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Cc: linux-rdma@vger.kernel.org (open list:SCSI RDMA PROTOCOL (SRP) TARGET)
Cc: linux-kernel@vger.kernel.org (open list)
---
 drivers/infiniband/ulp/srpt/ib_srpt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c
index f37cbad022a2..447d21ea479a 100644
--- a/drivers/infiniband/ulp/srpt/ib_srpt.c
+++ b/drivers/infiniband/ulp/srpt/ib_srpt.c
@@ -2708,7 +2708,7 @@ static void srpt_queue_response(struct se_cmd *cmd)
 		break;
 	}
 
-	if (unlikely(WARN_ON_ONCE(state == SRPT_STATE_CMD_RSP_SENT)))
+	if (WARN_ON_ONCE(state == SRPT_STATE_CMD_RSP_SENT))
 		return;
 
 	/* For read commands, transfer the data to the initiator. */
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] infiniband: scsi: remove unnecessary unlikely()
  2018-08-31 20:16 [PATCH] infiniband: scsi: remove unnecessary unlikely() Igor Stoppa
@ 2018-09-05 21:52 ` Jason Gunthorpe
  0 siblings, 0 replies; 2+ messages in thread
From: Jason Gunthorpe @ 2018-09-05 21:52 UTC (permalink / raw)
  To: Igor Stoppa; +Cc: Bart Van Assche, Igor Stoppa, linux-rdma, linux-kernel

On Fri, Aug 31, 2018 at 11:16:45PM +0300, Igor Stoppa wrote:
> WARN_ON() already contains an unlikely(), so it's not necessary to
> wrap it into another.
> 
> Signed-off-by: Igor Stoppa <igor.stoppa@huawei.com>
> Reviewed-by: Bart Van Assche <bvanassche@acm.org>
> Cc: linux-rdma@vger.kernel.org (open list:SCSI RDMA PROTOCOL (SRP) TARGET)
> Cc: linux-kernel@vger.kernel.org (open list)
> ---
>  drivers/infiniband/ulp/srpt/ib_srpt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to for-next, thanks

Jason

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-09-05 21:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-31 20:16 [PATCH] infiniband: scsi: remove unnecessary unlikely() Igor Stoppa
2018-09-05 21:52 ` Jason Gunthorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).