lkml.org 
[lkml]   [2009]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v2]: New implementation of scsi_execute_async()
    Joe Eykholt, on 07/15/2009 09:48 PM wrote:
    >>> +int sg_copy(struct scatterlist *dst_sg,
    >>> + struct scatterlist *src_sg, size_t copy_len,
    >>> + enum km_type d_km_type, enum km_type s_km_type)
    >>> +{
    >>> + int res = 0;
    >>> + size_t dst_len, dst_offs;
    >>> +
    >>> + if (copy_len == 0)
    >>> + copy_len = 0x7FFFFFFF; /* copy all */
    >>> +
    >>> + dst_len = dst_sg->length;
    >>> + dst_offs = dst_sg->offset;
    >>> +
    >>> + do {
    >>> + copy_len -= __sg_copy_elem(&dst_sg, &dst_len, &dst_offs,
    >>> + src_sg, copy_len, d_km_type, s_km_type);
    >>> + if ((copy_len == 0) || (dst_sg == NULL))
    >>> + goto out;
    >>> +
    >>> + src_sg = sg_next(src_sg);
    >>> + } while (src_sg != NULL);
    >>> +
    >>> +out:
    >>> + return res;
    >>> +}
    >
    > The return value res is always 0 here, contrary to the description.
    > Maybe it should be void.

    Will be fixed, thanks

    >>> +EXPORT_SYMBOL(sg_copy);
    >>>
    >> Boaz
    >
    > --
    > To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
    > the body of a message to majordomo@vger.kernel.org
    > More majordomo info at http://vger.kernel.org/majordomo-info.html
    >



    \
     
     \ /
      Last update: 2009-07-16 20:19    [W:0.034 / U:123.184 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site