scsi: convert to using sg helpers

This converts the SCSI mid layer to using the sg helpers for looking up
sg elements, instead of doing it manually.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
This commit is contained in:
Jens Axboe
2007-10-16 11:08:49 +02:00
parent f565913ef8
commit c6132da170
2 changed files with 15 additions and 10 deletions
+2 -1
View File
@@ -5,6 +5,7 @@
#include <linux/list.h>
#include <linux/types.h>
#include <linux/timer.h>
#include <linux/scatterlist.h>
struct request;
struct scatterlist;
@@ -148,6 +149,6 @@ static inline int scsi_get_resid(struct scsi_cmnd *cmd)
}
#define scsi_for_each_sg(cmd, sg, nseg, __i) \
for (__i = 0, sg = scsi_sglist(cmd); __i < (nseg); __i++, (sg)++)
for_each_sg(scsi_sglist(cmd), sg, nseg, __i)
#endif /* _SCSI_SCSI_CMND_H */