mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
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>
This commit is contained in:
parent
01cfcddd98
commit
aeb3d3a81e
2 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue