From: Sascha Hauer <s.hauer@pengutronix.de>
To: Michael Olbrich <m.olbrich@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] EFI: report correct block device size
Date: Thu, 23 Oct 2014 07:32:15 +0200 [thread overview]
Message-ID: <20141023053215.GC14443@pengutronix.de> (raw)
In-Reply-To: <1413974872-23330-1-git-send-email-m.olbrich@pengutronix.de>
On Wed, Oct 22, 2014 at 12:47:52PM +0200, Michael Olbrich wrote:
> last_block is a zero-based block number, so the total number of blocks is
> last_block + 1
>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Applied, thanks
Sascha
> ---
> arch/efi/efi/efi-block-io.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/efi/efi/efi-block-io.c b/arch/efi/efi/efi-block-io.c
> index 00115317fc9b..85603d913d5b 100644
> --- a/arch/efi/efi/efi-block-io.c
> +++ b/arch/efi/efi/efi-block-io.c
> @@ -149,7 +149,7 @@ int efi_bio_probe(struct efi_device *efidev)
>
> priv->blk.cdev.name = asprintf("disk%d", cdev_find_free_index("disk"));
> priv->blk.blockbits = ffs(media->block_size) - 1;
> - priv->blk.num_blocks = media->last_block;
> + priv->blk.num_blocks = media->last_block + 1;
> priv->blk.ops = &efi_bio_ops;
> priv->blk.dev = &efidev->dev;
>
> --
> 2.1.1
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2014-10-23 5:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-22 10:47 Michael Olbrich
2014-10-23 5:32 ` Sascha Hauer [this message]
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=20141023053215.GC14443@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=m.olbrich@pengutronix.de \
/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