From 87ae9afdcada236d0a1b38ce2c465a65916961dc Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Tue, 30 Oct 2007 10:35:04 +0100 Subject: cleanup asm/scatterlist.h includes Not architecture specific code should not #include . This patch therefore either replaces them with #include or simply removes them if they were unused. Signed-off-by: Adrian Bunk Signed-off-by: Jens Axboe --- drivers/base/dmapool.c | 1 - drivers/ieee1394/sbp2.c | 2 +- drivers/media/video/bt8xx/bttvp.h | 2 +- drivers/mmc/core/core.c | 1 - drivers/mmc/core/mmc_ops.c | 1 - drivers/mmc/core/sd_ops.c | 1 - drivers/mmc/core/sdio_ops.c | 1 - drivers/net/meth.c | 1 - drivers/usb/core/buffer.c | 1 - drivers/usb/core/hcd.c | 1 - drivers/usb/core/usb.c | 2 +- 11 files changed, 3 insertions(+), 11 deletions(-) (limited to 'drivers') diff --git a/drivers/base/dmapool.c b/drivers/base/dmapool.c index 5beddc322e6..b5034dc72a0 100644 --- a/drivers/base/dmapool.c +++ b/drivers/base/dmapool.c @@ -2,7 +2,6 @@ #include #include #include /* Needed for i386 to build */ -#include /* Needed for i386 to build */ #include #include #include diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c index d5dfe11aa5c..b83d254bc86 100644 --- a/drivers/ieee1394/sbp2.c +++ b/drivers/ieee1394/sbp2.c @@ -71,11 +71,11 @@ #include #include #include +#include #include #include #include -#include #include #include diff --git a/drivers/media/video/bt8xx/bttvp.h b/drivers/media/video/bt8xx/bttvp.h index 0b92c35a843..d4ac4c4b49b 100644 --- a/drivers/media/video/bt8xx/bttvp.h +++ b/drivers/media/video/bt8xx/bttvp.h @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include #include diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 09435e0ec68..b96667448eb 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c index 7471d49909b..64b05c6270f 100644 --- a/drivers/mmc/core/mmc_ops.c +++ b/drivers/mmc/core/mmc_ops.c @@ -10,7 +10,6 @@ */ #include -#include #include #include diff --git a/drivers/mmc/core/sd_ops.c b/drivers/mmc/core/sd_ops.c index a6dafe62b99..0d96080d44b 100644 --- a/drivers/mmc/core/sd_ops.c +++ b/drivers/mmc/core/sd_ops.c @@ -10,7 +10,6 @@ */ #include -#include #include #include diff --git a/drivers/mmc/core/sdio_ops.c b/drivers/mmc/core/sdio_ops.c index 4d289b27503..e1fca588e38 100644 --- a/drivers/mmc/core/sdio_ops.c +++ b/drivers/mmc/core/sdio_ops.c @@ -9,7 +9,6 @@ * your option) any later version. */ -#include #include #include diff --git a/drivers/net/meth.c b/drivers/net/meth.c index e25dbab6736..0c89b028a80 100644 --- a/drivers/net/meth.c +++ b/drivers/net/meth.c @@ -33,7 +33,6 @@ #include #include -#include #include "meth.h" diff --git a/drivers/usb/core/buffer.c b/drivers/usb/core/buffer.c index ead2475406b..28d4972f7ad 100644 --- a/drivers/usb/core/buffer.c +++ b/drivers/usb/core/buffer.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index 3dd997df850..fea8256a18d 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c index 69aa68287d3..c4a6f1095b8 100644 --- a/drivers/usb/core/usb.c +++ b/drivers/usb/core/usb.c @@ -36,7 +36,7 @@ #include #include -#include +#include #include #include -- cgit v1.2.3 From c46f2334c84c2b26baa64d42d75ddc5fab38c3dc Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Wed, 31 Oct 2007 12:06:37 +0100 Subject: [SG] Get rid of __sg_mark_end() sg_mark_end() overwrites the page_link information, but all users want __sg_mark_end() behaviour where we just set the end bit. That is the most natural way to use the sg list, since you'll fill it in and then mark the end point. So change sg_mark_end() to only set the termination bit. Add a sg_magic debug check as well, and clear a chain pointer if it is set. Signed-off-by: Jens Axboe --- drivers/scsi/scsi_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 61fdaf02f25..88de771d356 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -785,7 +785,7 @@ struct scatterlist *scsi_alloc_sgtable(struct scsi_cmnd *cmd, gfp_t gfp_mask) * end-of-list */ if (!left) - sg_mark_end(sgl, this); + sg_mark_end(&sgl[this - 1]); /* * don't allow subsequent mempool allocs to sleep, it would -- cgit v1.2.3