[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20160905194211.705d5162@bbrezillon>
Date:   Mon, 5 Sep 2016 19:42:11 +0200
From:   Boris Brezillon <boris.brezillon@...e-electrons.com>
To:     Artem Bityutskiy <dedekind1@...il.com>,
        Richard Weinberger <richard@....at>
Cc:     David Woodhouse <dwmw2@...radead.org>,
        Brian Norris <computersforpeace@...il.com>,
        linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/6] UBI: use vol->usable_leb_size instead of
 (ubi->leb_size - vol->data_pad)
On Mon,  5 Sep 2016 17:31:24 +0200
Boris Brezillon <boris.brezillon@...e-electrons.com> wrote:
> vol->usable_size is already set to ubi->leb_size - vol->data_pad. Use
> vol->usable_size instead of recalculating it.
This one should be part of the cleanup series.
> 
> Signed-off-by: Boris Brezillon <boris.brezillon@...e-electrons.com>
> ---
>  drivers/mtd/ubi/cdev.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/ubi/cdev.c b/drivers/mtd/ubi/cdev.c
> index 72ba84af6698..45c329694a5e 100644
> --- a/drivers/mtd/ubi/cdev.c
> +++ b/drivers/mtd/ubi/cdev.c
> @@ -416,7 +416,7 @@ static long vol_cdev_ioctl(struct file *file, unsigned int cmd,
>  		}
>  
>  		rsvd_bytes = (long long)vol->reserved_pebs *
> -					ubi->leb_size-vol->data_pad;
> +					vol->usable_leb_size;
>  		if (bytes < 0 || bytes > rsvd_bytes) {
>  			err = -EINVAL;
>  			break;
Powered by blists - more mailing lists
 
