From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sagi Grimberg Subject: Re: [PATCH 09/12] IB/srp: Remove a superfluous check from srp_free_req_data() Date: Thu, 30 Apr 2015 13:18:48 +0300 Message-ID: <55420188.2020409@dev.mellanox.co.il> References: <5541EE21.3050809@sandisk.com> <5541EF4F.6050200@sandisk.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5541EF4F.6050200-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org> Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Bart Van Assche , Doug Ledford Cc: James Bottomley , Sagi Grimberg , Sebastian Parschauer , linux-rdma , "linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" List-Id: linux-rdma@vger.kernel.org On 4/30/2015 12:01 PM, Bart Van Assche wrote: > All srp_free_req_data() callers guarantee that ch->target != NULL > hence remove the ch->target test from srp_free_req_data(). ch->target is not referenced anywhere in this routine. So why does this guarantee matter? > > Signed-off-by: Bart Van Assche > Cc: Sagi Grimberg > Cc: Sebastian Parschauer > --- > drivers/infiniband/ulp/srp/ib_srp.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c > index 3727b90..a73eb1e5 100644 > --- a/drivers/infiniband/ulp/srp/ib_srp.c > +++ b/drivers/infiniband/ulp/srp/ib_srp.c > @@ -853,7 +853,7 @@ static void srp_free_req_data(struct srp_target_port *target, > struct srp_request *req; > int i; > > - if (!ch->target || !ch->req_ring) > + if (!ch->req_ring) > return; > > for (i = 0; i < target->req_ring_size; ++i) { > -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html