On Thu, Oct 18 2007, Mark Lord wrote:> Jens wrote:>> OK, I think that covers every arch out there. I haven't been able to>> compile any of them, but it's mostly search'n replace operations. I hope>> nothing is missing linux/scatterlist.h includes...>> Patch fails on drivers/scsi/scsi_lib.c.>> I replaced that part of the patch with this updated portion instead:

Hmm, what are you applying against? Must be a clean tree, throw away anypatches that you already applied in this thread.

/** * sg_next - return the next scatterlist entry in a list@@ -37,14 +80,16 @@ static inline void sg_init_one(struct scatterlist *sg, const void *buf, * of a chained scatterlist, it could jump to the start of a new * scatterlist array. *- * Note that the caller must ensure that there are further entries after- * the current entry, this function will NOT return NULL for an end-of-list.- * */ static inline struct scatterlist *sg_next(struct scatterlist *sg) {- sg++;+#ifdef CONFIG_DEBUG_SG+ BUG_ON(sg->sg_magic != SG_MAGIC);+#endif+ if (sg_is_last(sg))+ return NULL;