[PATCH 31/44] block: move the start_sect field to struct block_device
Jan Kara
jack at suse.cz
Thu Nov 26 11:56:41 EST 2020
On Thu 26-11-20 14:04:09, Christoph Hellwig wrote:
> Move the start_sect field to struct block_device in preparation
> of killing struct hd_struct.
>
> Signed-off-by: Christoph Hellwig <hch at lst.de>
Looks good, just one nit below. Feel free to add:
Reviewed-by: Jan Kara <jack at suse.cz>
> diff --git a/block/partitions/core.c b/block/partitions/core.c
> index 8924e1ea8b2ad6..485777cea26bfa 100644
> --- a/block/partitions/core.c
> +++ b/block/partitions/core.c
> @@ -192,7 +192,7 @@ static ssize_t part_start_show(struct device *dev,
> {
> struct hd_struct *p = dev_to_part(dev);
>
> - return sprintf(buf, "%llu\n",(unsigned long long)p->start_sect);
> + return sprintf(buf, "%llu\n",(unsigned long long)p->bdev->bd_start_sect);
The long long conversion is pointless here, right?
Honza
--
Jan Kara <jack at suse.com>
SUSE Labs, CR
More information about the linux-mtd
mailing list