On 5/7/2014 5:11 PM, Bart Van Assche wrote:
On 05/07/14 12:50, Sagi Grimberg wrote:
On 5/6/2014 3:54 PM, Bart Van Assche wrote:
-static void srp_free_req_data(struct srp_target_port *target)
+static void srp_free_req_data(struct srp_target_port *target,
+                  struct srp_request *req_ring)
   {
       struct ib_device *ibdev = target->srp_host->srp_dev->dev;
       struct srp_request *req;
       int i;
   -    if (!target->req_ring)
+    if (!req_ring)
           return;
         for (i = 0; i < target->req_ring_size; ++i) {
-        req = &target->req_ring[i];
+        req = &req_ring[i];
You loop for {ring A size} and operates on ring B elements. They will
probably be the same but the notion seems buggy.
Will it be better to untie this routine from srp_target_port at all?
Hello Sagi,

Had you noticed that target->req_ring_size is not modified during
resource allocation or reallocation ? That is why target->req_ring_size
has not been converted into a function argument in this patch.

Yes, I guess I'm fine with that.

Reviewed-by: Sagi Grimberg <sa...@mellanox.com>

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to