aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/genhd.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2008-09-03 03:01:09 -0400
committerJens Axboe <jens.axboe@oracle.com>2008-10-09 02:56:05 -0400
commitcf771cb5a7b716f3f9e532fd42a1e3a0a75adec5 (patch)
treec16cf6adc4d2e51eaee77088ecf126b721f8f3c7 /include/linux/genhd.h
parent310a2c1012934f590192377f65940cad4aa72b15 (diff)
block: make variable and argument names more consistent
In hd_struct, @partno is used to denote partition number and a number of other places use @part to denote hd_struct. Functions use @part and @index instead. This causes confusion and makes it difficult to use consistent variable names for hd_struct. Always use @partno if a variable represents partition number. Also, print out functions use @f or @part for seq_file argument. Use @seqf uniformly instead. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'include/linux/genhd.h')
-rw-r--r--include/linux/genhd.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index c64e659c9843..d1723c0a8600 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -365,7 +365,7 @@ extern int get_blkdev_list(char *, int);
365extern void add_disk(struct gendisk *disk); 365extern void add_disk(struct gendisk *disk);
366extern void del_gendisk(struct gendisk *gp); 366extern void del_gendisk(struct gendisk *gp);
367extern void unlink_gendisk(struct gendisk *gp); 367extern void unlink_gendisk(struct gendisk *gp);
368extern struct gendisk *get_gendisk(dev_t dev, int *part); 368extern struct gendisk *get_gendisk(dev_t dev, int *partno);
369 369
370extern void set_device_ro(struct block_device *bdev, int flag); 370extern void set_device_ro(struct block_device *bdev, int flag);
371extern void set_disk_ro(struct gendisk *disk, int flag); 371extern void set_disk_ro(struct gendisk *disk, int flag);
@@ -534,8 +534,8 @@ struct unixware_disklabel {
534#define ADDPART_FLAG_RAID 1 534#define ADDPART_FLAG_RAID 1
535#define ADDPART_FLAG_WHOLEDISK 2 535#define ADDPART_FLAG_WHOLEDISK 2
536 536
537extern dev_t blk_lookup_devt(const char *name, int part); 537extern dev_t blk_lookup_devt(const char *name, int partno);
538extern char *disk_name (struct gendisk *hd, int part, char *buf); 538extern char *disk_name (struct gendisk *hd, int partno, char *buf);
539 539
540extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev); 540extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev);
541extern int __must_check add_partition(struct gendisk *, int, sector_t, sector_t, int); 541extern int __must_check add_partition(struct gendisk *, int, sector_t, sector_t, int);
@@ -553,16 +553,16 @@ extern void blk_register_region(dev_t devt, unsigned long range,
553 void *data); 553 void *data);
554extern void blk_unregister_region(dev_t devt, unsigned long range); 554extern void blk_unregister_region(dev_t devt, unsigned long range);
555 555
556static inline struct block_device *bdget_disk(struct gendisk *disk, int index) 556static inline struct block_device *bdget_disk(struct gendisk *disk, int partno)
557{ 557{
558 return bdget(MKDEV(disk->major, disk->first_minor) + index); 558 return bdget(MKDEV(disk->major, disk->first_minor) + partno);
559} 559}
560 560
561#else /* CONFIG_BLOCK */ 561#else /* CONFIG_BLOCK */
562 562
563static inline void printk_all_partitions(void) { } 563static inline void printk_all_partitions(void) { }
564 564
565static inline dev_t blk_lookup_devt(const char *name, int part) 565static inline dev_t blk_lookup_devt(const char *name, int partno)
566{ 566{
567 dev_t devt = MKDEV(0, 0); 567 dev_t devt = MKDEV(0, 0);
568 return devt; 568 return devt;