From 88a2a4ac6b671a4b0dd5d2d762418904c05f4104 Mon Sep 17 00:00:00 2001 From: Eric Dumazet Date: Sat, 4 Feb 2006 23:27:36 -0800 Subject: [PATCH] percpu data: only iterate over possible CPUs percpu_data blindly allocates bootmem memory to store NR_CPUS instances of cpudata, instead of allocating memory only for possible cpus. As a preparation for changing that, we need to convert various 0 -> NR_CPUS loops to use for_each_cpu(). (The above only applies to users of asm-generic/percpu.h. powerpc has gone it alone and is presently only allocating memory for present CPUs, so it's currently corrupting memory). Signed-off-by: Eric Dumazet Cc: "David S. Miller" Cc: James Bottomley Acked-by: Ingo Molnar Cc: Jens Axboe Cc: Anton Blanchard Acked-by: William Irwin Cc: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/scsi/scsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c index 245ca99a641..c551bb84dbf 100644 --- a/drivers/scsi/scsi.c +++ b/drivers/scsi/scsi.c @@ -1245,7 +1245,7 @@ static int __init init_scsi(void) if (error) goto cleanup_sysctl; - for (i = 0; i < NR_CPUS; i++) + for_each_cpu(i) INIT_LIST_HEAD(&per_cpu(scsi_done_q, i)); devfs_mk_dir("scsi"); -- cgit v1.2.3 From 164006da316a22eaaa9fbe36f835a01606436c66 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Wed, 30 Nov 2005 23:47:05 -0500 Subject: [PATCH] bogus asm/delay.h includes asm/delay.h is non-portable; linux/delay.h should be used in generic code. Signed-off-by: Al Viro --- drivers/scsi/aacraid/commsup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c index 38d6d00fb0f..014cc8d54a9 100644 --- a/drivers/scsi/aacraid/commsup.c +++ b/drivers/scsi/aacraid/commsup.c @@ -38,10 +38,10 @@ #include #include #include +#include #include #include #include -#include #include "aacraid.h" -- cgit v1.2.3 From 7be7cbf684b372abaa8d6723eabedfa6ad79ee43 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 6 Dec 2005 06:01:14 -0500 Subject: [PATCH] drivers/scsi/mac53c94.c __iomem annotations Signed-off-by: Al Viro --- drivers/scsi/mac53c94.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/mac53c94.c b/drivers/scsi/mac53c94.c index 311a4122bd7..93edaa8696c 100644 --- a/drivers/scsi/mac53c94.c +++ b/drivers/scsi/mac53c94.c @@ -537,9 +537,9 @@ static int mac53c94_remove(struct macio_dev *mdev) free_irq(fp->intr, fp); if (fp->regs) - iounmap((void *) fp->regs); + iounmap(fp->regs); if (fp->dma) - iounmap((void *) fp->dma); + iounmap(fp->dma); kfree(fp->dma_cmd_space); scsi_host_put(host); -- cgit v1.2.3 From e5fb81bd895041230dfaeb8f8f498b85b4705988 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Wed, 1 Feb 2006 06:30:45 -0500 Subject: [PATCH] scsi_transport_iscsi gfp_t annotations Signed-off-by: Al Viro --- drivers/scsi/scsi_transport_iscsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c index 59a1c9d9d3b..723f7acbeb1 100644 --- a/drivers/scsi/scsi_transport_iscsi.c +++ b/drivers/scsi/scsi_transport_iscsi.c @@ -463,7 +463,7 @@ static inline struct list_head *skb_to_lh(struct sk_buff *skb) } static void* -mempool_zone_alloc_skb(unsigned int gfp_mask, void *pool_data) +mempool_zone_alloc_skb(gfp_t gfp_mask, void *pool_data) { struct mempool_zone *zone = pool_data; -- cgit v1.2.3 From 2d20eaf9426598ef156b941bcfa44e867452b770 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Wed, 1 Feb 2006 06:31:40 -0500 Subject: [PATCH] sg gfp_t annotations Signed-off-by: Al Viro --- drivers/scsi/sg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index 7d0700091f3..2a547538d44 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c @@ -1679,7 +1679,7 @@ static int sg_build_sgat(Sg_scatter_hold * schp, const Sg_fd * sfp, int tablesize) { int sg_bufflen = tablesize * sizeof(struct scatterlist); - unsigned int gfp_flags = GFP_ATOMIC | __GFP_NOWARN; + gfp_t gfp_flags = GFP_ATOMIC | __GFP_NOWARN; /* * TODO: test without low_dma, we should not need it since -- cgit v1.2.3