Re: [RFC PATCH 4/5] mtd_blkdevs: scan partitions on mtdblock if FIT_PARTITION is set

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Daniel,

daniel@xxxxxxxxxxxxxx wrote on Mon, 25 Apr 2022 16:00:02 +0100:

> Enable partition parsers on plain mtdblock devices in case of
> CONFIG_FIT_PARTITION being selected.
> 
> Signed-off-by: Daniel Golle <daniel@xxxxxxxxxxxxxx>
> ---
>  drivers/mtd/mtd_blkdevs.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/mtd/mtd_blkdevs.c b/drivers/mtd/mtd_blkdevs.c
> index f7317211146550..e9759c4182f8d5 100644
> --- a/drivers/mtd/mtd_blkdevs.c
> +++ b/drivers/mtd/mtd_blkdevs.c
> @@ -359,7 +359,9 @@ int add_mtd_blktrans_dev(struct mtd_blktrans_dev *new)
>  	} else {
>  		snprintf(gd->disk_name, sizeof(gd->disk_name),
>  			 "%s%d", tr->name, new->devnum);
> +#ifndef CONFIG_FIT_PARTITION

Can we use a regular 'if' here?

>  		gd->flags |= GENHD_FL_NO_PART;
> +#endif
>  	}
>  
>  	set_capacity(gd, ((u64)new->size * tr->blksize) >> 9);

Thanks,
Miquèl




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux