From: Boris Brezillon <boris.brezillon@free-electrons.com>
To: Artem Bityutskiy <dedekind1@gmail.com>,
Richard Weinberger <richard@nod.at>
Cc: David Woodhouse <dwmw2@infradead.org>,
Brian Norris <computersforpeace@gmail.com>,
linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/6] UBI: use vol->usable_leb_size instead of (ubi->leb_size - vol->data_pad)
Date: Mon, 5 Sep 2016 19:42:11 +0200 [thread overview]
Message-ID: <20160905194211.705d5162@bbrezillon> (raw)
In-Reply-To: <1473089487-29285-4-git-send-email-boris.brezillon@free-electrons.com>
On Mon, 5 Sep 2016 17:31:24 +0200
Boris Brezillon <boris.brezillon@free-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@free-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;
next prev parent reply other threads:[~2016-09-05 17:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-05 15:31 [PATCH 0/6] UBI: add support for 'SLC mode' volumes Boris Brezillon
2016-09-05 15:31 ` [PATCH 1/6] UBI: dissociate the on-flash format version and the userspace ABI version Boris Brezillon
2016-09-05 15:31 ` [PATCH 2/6] UBI: rework the on-flash format versioning logic Boris Brezillon
2016-09-05 15:31 ` [PATCH 3/6] UBI: use vol->usable_leb_size instead of (ubi->leb_size - vol->data_pad) Boris Brezillon
2016-09-05 17:42 ` Boris Brezillon [this message]
2016-09-05 15:31 ` [PATCH 4/6] UBI: introduce per-volume leb_size Boris Brezillon
2016-09-05 15:31 ` [PATCH 5/6] UBI: io: support SLC mode accesses Boris Brezillon
2016-09-05 15:31 ` [PATCH 6/6] UBI: add SLC mode support Boris Brezillon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160905194211.705d5162@bbrezillon \
--to=boris.brezillon@free-electrons.com \
--cc=computersforpeace@gmail.com \
--cc=dedekind1@gmail.com \
--cc=dwmw2@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=richard@nod.at \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox