diff mbox series

[u-boot-marvell,v2,6/9] arm: mvebu: spl: Print srcaddr in error message

Message ID 20211126143738.23830-7-kabel@kernel.org
State Superseded
Delegated to: Stefan Roese
Headers show
Series More verifications for kwbimage in SPL | expand

Commit Message

Marek Behún Nov. 26, 2021, 2:37 p.m. UTC
From: Marek Behún <marek.behun@nic.cz>

Print the wrong srcaddr (spl_image->offset) in error message also for
SATA case.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
---
 arch/arm/mach-mvebu/spl.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Stefan Roese Nov. 30, 2021, 6:20 a.m. UTC | #1
On 11/26/21 15:37, Marek Behún wrote:
> From: Marek Behún <marek.behun@nic.cz>
> 
> Print the wrong srcaddr (spl_image->offset) in error message also for
> SATA case.
> 
> Signed-off-by: Marek Behún <marek.behun@nic.cz>

Reviewed-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan

> ---
>   arch/arm/mach-mvebu/spl.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/mach-mvebu/spl.c b/arch/arm/mach-mvebu/spl.c
> index af9e45ac7a..8c8cbc833f 100644
> --- a/arch/arm/mach-mvebu/spl.c
> +++ b/arch/arm/mach-mvebu/spl.c
> @@ -190,7 +190,8 @@ int spl_parse_board_header(struct spl_image_info *spl_image,
>   	 */
>   	if (mhdr->blockid == IBR_HDR_SATA_ID) {
>   		if (spl_image->offset < 1) {
> -			printf("ERROR: Wrong SATA srcaddr in kwbimage\n");
> +			printf("ERROR: Wrong SATA srcaddr (%u) in kwbimage\n",
> +			       spl_image->offset);
>   			return -EINVAL;
>   		}
>   		spl_image->offset -= 1;
> 

Viele Grüße,
Stefan Roese
Pali Rohár Dec. 14, 2021, 11:10 a.m. UTC | #2
On Friday 26 November 2021 15:37:35 Marek Behún wrote:
> From: Marek Behún <marek.behun@nic.cz>
> 
> Print the wrong srcaddr (spl_image->offset) in error message also for
> SATA case.
> 
> Signed-off-by: Marek Behún <marek.behun@nic.cz>
> ---
>  arch/arm/mach-mvebu/spl.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/mach-mvebu/spl.c b/arch/arm/mach-mvebu/spl.c
> index af9e45ac7a..8c8cbc833f 100644
> --- a/arch/arm/mach-mvebu/spl.c
> +++ b/arch/arm/mach-mvebu/spl.c
> @@ -190,7 +190,8 @@ int spl_parse_board_header(struct spl_image_info *spl_image,
>  	 */
>  	if (mhdr->blockid == IBR_HDR_SATA_ID) {
>  		if (spl_image->offset < 1) {
> -			printf("ERROR: Wrong SATA srcaddr in kwbimage\n");
> +			printf("ERROR: Wrong SATA srcaddr (%u) in kwbimage\n",

Maybe change message to "ERROR: Wrong srcaddr (%u) in SATA kwbimage" for
consistency with other newly added error messages in this patch series?

> +			       spl_image->offset);
>  			return -EINVAL;
>  		}
>  		spl_image->offset -= 1;
> -- 
> 2.32.0
>
Marek Behún Dec. 14, 2021, 1:11 p.m. UTC | #3
On Tue, 14 Dec 2021 12:10:30 +0100
Pali Rohár <pali@kernel.org> wrote:

> On Friday 26 November 2021 15:37:35 Marek Behún wrote:
> > From: Marek Behún <marek.behun@nic.cz>
> > 
> > Print the wrong srcaddr (spl_image->offset) in error message also for
> > SATA case.
> > 
> > Signed-off-by: Marek Behún <marek.behun@nic.cz>
> > ---
> >  arch/arm/mach-mvebu/spl.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/arch/arm/mach-mvebu/spl.c b/arch/arm/mach-mvebu/spl.c
> > index af9e45ac7a..8c8cbc833f 100644
> > --- a/arch/arm/mach-mvebu/spl.c
> > +++ b/arch/arm/mach-mvebu/spl.c
> > @@ -190,7 +190,8 @@ int spl_parse_board_header(struct spl_image_info *spl_image,
> >  	 */
> >  	if (mhdr->blockid == IBR_HDR_SATA_ID) {
> >  		if (spl_image->offset < 1) {
> > -			printf("ERROR: Wrong SATA srcaddr in kwbimage\n");
> > +			printf("ERROR: Wrong SATA srcaddr (%u) in kwbimage\n",  
> 
> Maybe change message to "ERROR: Wrong srcaddr (%u) in SATA kwbimage" for
> consistency with other newly added error messages in this patch series?

OK I'll send v3
diff mbox series

Patch

diff --git a/arch/arm/mach-mvebu/spl.c b/arch/arm/mach-mvebu/spl.c
index af9e45ac7a..8c8cbc833f 100644
--- a/arch/arm/mach-mvebu/spl.c
+++ b/arch/arm/mach-mvebu/spl.c
@@ -190,7 +190,8 @@  int spl_parse_board_header(struct spl_image_info *spl_image,
 	 */
 	if (mhdr->blockid == IBR_HDR_SATA_ID) {
 		if (spl_image->offset < 1) {
-			printf("ERROR: Wrong SATA srcaddr in kwbimage\n");
+			printf("ERROR: Wrong SATA srcaddr (%u) in kwbimage\n",
+			       spl_image->offset);
 			return -EINVAL;
 		}
 		spl_image->offset -= 1;