aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-08-28 09:27:42 +0200
committerJens Axboe <jens.axboe@oracle.com>2008-10-09 08:56:11 +0200
commitaeb3d3a81e81c6323a17fe914e91eb228b3f1aa1 (patch)
tree9cacfa989eaad1611f61e5707fd432e7f1fde685
parent01cfcddd98f09e05a2e36031654ed46643b76f23 (diff)
downloadmrst-s0i3-test-aeb3d3a81e81c6323a17fe914e91eb228b3f1aa1.tar.gz
mrst-s0i3-test-aeb3d3a81e81c6323a17fe914e91eb228b3f1aa1.tar.xz
mrst-s0i3-test-aeb3d3a81e81c6323a17fe914e91eb228b3f1aa1.zip
block: kmalloc args reversed, small function definition fixes
Noticed by sparse: block/blk-softirq.c:156:12: warning: symbol 'blk_softirq_init' was not declared. Should it be static? block/genhd.c:583:28: warning: function 'bdget_disk' with external linkage has definition block/genhd.c:659:17: warning: incorrect type in argument 1 (different base types) block/genhd.c:659:17: expected unsigned int [unsigned] [usertype] size block/genhd.c:659:17: got restricted gfp_t block/genhd.c:659:29: warning: incorrect type in argument 2 (different base types) block/genhd.c:659:29: expected restricted gfp_t [usertype] flags block/genhd.c:659:29: got unsigned int block: kmalloc args reversed Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
-rw-r--r--block/blk-settings.c2
-rw-r--r--block/genhd.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/block/blk-settings.c b/block/blk-settings.c
index a60e959a12c..d70692badcd 100644
--- a/block/blk-settings.c
+++ b/block/blk-settings.c
@@ -443,7 +443,7 @@ void blk_queue_update_dma_alignment(struct request_queue *q, int mask)
}
EXPORT_SYMBOL(blk_queue_update_dma_alignment);
-int __init blk_settings_init(void)
+static int __init blk_settings_init(void)
{
blk_max_low_pfn = max_low_pfn - 1;
blk_max_pfn = max_pfn - 1;
diff --git a/block/genhd.c b/block/genhd.c
index d9de3e482d1..32ee73c6756 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -578,7 +578,7 @@ struct gendisk *get_gendisk(dev_t devt, int *partno)
* RETURNS:
* Resulting block_device on success, NULL on failure.
*/
-extern struct block_device *bdget_disk(struct gendisk *disk, int partno)
+struct block_device *bdget_disk(struct gendisk *disk, int partno)
{
struct hd_struct *part;
struct block_device *bdev = NULL;
@@ -654,7 +654,7 @@ static void *disk_seqf_start(struct seq_file *seqf, loff_t *pos)
struct class_dev_iter *iter;
struct device *dev;
- iter = kmalloc(GFP_KERNEL, sizeof(*iter));
+ iter = kmalloc(sizeof(*iter), GFP_KERNEL);
if (!iter)
return ERR_PTR(-ENOMEM);