[openib-general] Re: [PATCH] SRP: don't use TX IU after freeing it

Vu Pham vuhuong at mellanox.com
Tue Oct 11 11:03:15 PDT 2005


Roland,
    Thanks or reviewing it.
    Responding to your feedback, I prepare new patch (attached)


> 
> Why put a pointer to struct list_head here instead of just a struct
> list_head?  If you just used the struct, then you wouldn't need this:
>

Done. Using struct list_head instead of pointer



>     > +	u16			in_use;
>     >  };
> 
> I can't find anywhere that the in_use flag is used.
>

Removed


>     > +static int srp_map_fmr(struct srp_target_port *target, struct scatterlist *scat,
>     > +		       int sg_cnt, struct srp_request *req)
> 
>     [...]
> 
>     > +	return -ENOMEM;
> 
>     > +			} else if (fmr_cnt <= 0) {
> 
> fmr_cnt is unsigned so I think this is going to get you in trouble.
> Might as well make fmr_cnt a plain int to make things simpler.
> 

In previous patch, fmr_cnt was already declared as int

> Also, it might be good to try and add some more comments explaining
> srp_map_fmr() -- it would definitely help me review.
> 

I added some comments - Hope they help your review (instead 
of confusing you more :))

Signed-off-by: Vu Pham <vu at mellanox.com>




-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: srp.patch.Oct112005
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20051011/4dab60bf/attachment.ksh>


More information about the general mailing list