mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH master] efi: don't skip default efi devinfo for old EFI block revisions
@ 2023-05-22  5:37 Ahmad Fatoum
  2023-05-22  8:23 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2023-05-22  5:37 UTC (permalink / raw)
  To: barebox

From: Ahmad Fatoum <ahmad@a3f.at>

We early exit to skip info that doesn't apply to older EFI block
protocol revisions. This also means we skip the default efi devinfo
callback, which may not want. Fix this.

Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
---
 drivers/block/efi-block-io.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/block/efi-block-io.c b/drivers/block/efi-block-io.c
index a4365ac7c32b..eb4981e86298 100644
--- a/drivers/block/efi-block-io.c
+++ b/drivers/block/efi-block-io.c
@@ -121,7 +121,7 @@ static void efi_bio_print_info(struct device *dev)
 	printf("  last_block: 0x%016llx\n", media->last_block);
 
 	if (revision < EFI_BLOCK_IO_PROTOCOL_REVISION2)
-		return;
+		goto out;
 
 	printf("  lowest_aligned_lba: 0x%08llx\n",
 			media->lowest_aligned_lba);
@@ -129,11 +129,12 @@ static void efi_bio_print_info(struct device *dev)
 			media->logical_blocks_per_physical_block);
 
 	if (revision < EFI_BLOCK_IO_PROTOCOL_REVISION3)
-		return;
+		goto out;
 
 	printf("  optimal_transfer_length_granularity: 0x%08x\n",
 			media->optimal_transfer_length_granularity);
 
+out:
 	if (priv->efi_info)
 		priv->efi_info(dev);
 }
-- 
2.39.2




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH master] efi: don't skip default efi devinfo for old EFI block revisions
  2023-05-22  5:37 [PATCH master] efi: don't skip default efi devinfo for old EFI block revisions Ahmad Fatoum
@ 2023-05-22  8:23 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2023-05-22  8:23 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: barebox

On Mon, May 22, 2023 at 07:37:25AM +0200, Ahmad Fatoum wrote:
> From: Ahmad Fatoum <ahmad@a3f.at>
> 
> We early exit to skip info that doesn't apply to older EFI block
> protocol revisions. This also means we skip the default efi devinfo
> callback, which may not want. Fix this.
> 
> Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
> ---
>  drivers/block/efi-block-io.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)

Applied, thanks

Sascha

> 
> diff --git a/drivers/block/efi-block-io.c b/drivers/block/efi-block-io.c
> index a4365ac7c32b..eb4981e86298 100644
> --- a/drivers/block/efi-block-io.c
> +++ b/drivers/block/efi-block-io.c
> @@ -121,7 +121,7 @@ static void efi_bio_print_info(struct device *dev)
>  	printf("  last_block: 0x%016llx\n", media->last_block);
>  
>  	if (revision < EFI_BLOCK_IO_PROTOCOL_REVISION2)
> -		return;
> +		goto out;
>  
>  	printf("  lowest_aligned_lba: 0x%08llx\n",
>  			media->lowest_aligned_lba);
> @@ -129,11 +129,12 @@ static void efi_bio_print_info(struct device *dev)
>  			media->logical_blocks_per_physical_block);
>  
>  	if (revision < EFI_BLOCK_IO_PROTOCOL_REVISION3)
> -		return;
> +		goto out;
>  
>  	printf("  optimal_transfer_length_granularity: 0x%08x\n",
>  			media->optimal_transfer_length_granularity);
>  
> +out:
>  	if (priv->efi_info)
>  		priv->efi_info(dev);
>  }
> -- 
> 2.39.2
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-05-22  8:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-22  5:37 [PATCH master] efi: don't skip default efi devinfo for old EFI block revisions Ahmad Fatoum
2023-05-22  8:23 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox