aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2008-09-03 09:01:09 +0200
committerJens Axboe <jens.axboe@oracle.com>2008-10-09 08:56:05 +0200
commitcf771cb5a7b716f3f9e532fd42a1e3a0a75adec5 (patch)
treec16cf6adc4d2e51eaee77088ecf126b721f8f3c7 /include
parent310a2c1012934f590192377f65940cad4aa72b15 (diff)
downloadkernel_goldelico_gta04-cf771cb5a7b716f3f9e532fd42a1e3a0a75adec5.zip
kernel_goldelico_gta04-cf771cb5a7b716f3f9e532fd42a1e3a0a75adec5.tar.gz
kernel_goldelico_gta04-cf771cb5a7b716f3f9e532fd42a1e3a0a75adec5.tar.bz2
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')
-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 c64e659..d1723c0 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -365,7 +365,7 @@ extern int get_blkdev_list(char *, int);
extern void add_disk(struct gendisk *disk);
extern void del_gendisk(struct gendisk *gp);
extern void unlink_gendisk(struct gendisk *gp);
-extern struct gendisk *get_gendisk(dev_t dev, int *part);
+extern struct gendisk *get_gendisk(dev_t dev, int *partno);
extern void set_device_ro(struct block_device *bdev, int flag);
extern void set_disk_ro(struct gendisk *disk, int flag);
@@ -534,8 +534,8 @@ struct unixware_disklabel {
#define ADDPART_FLAG_RAID 1
#define ADDPART_FLAG_WHOLEDISK 2
-extern dev_t blk_lookup_devt(const char *name, int part);
-extern char *disk_name (struct gendisk *hd, int part, char *buf);
+extern dev_t blk_lookup_devt(const char *name, int partno);
+extern char *disk_name (struct gendisk *hd, int partno, char *buf);
extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev);
extern 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,
void *data);
extern void blk_unregister_region(dev_t devt, unsigned long range);
-static inline struct block_device *bdget_disk(struct gendisk *disk, int index)
+static inline struct block_device *bdget_disk(struct gendisk *disk, int partno)
{
- return bdget(MKDEV(disk->major, disk->first_minor) + index);
+ return bdget(MKDEV(disk->major, disk->first_minor) + partno);
}
#else /* CONFIG_BLOCK */
static inline void printk_all_partitions(void) { }
-static inline dev_t blk_lookup_devt(const char *name, int part)
+static inline dev_t blk_lookup_devt(const char *name, int partno)
{
dev_t devt = MKDEV(0, 0);
return devt;