From: Joel Johnson Date: Tue, 24 Mar 2020 07:59:10 -0600 Subject: [PATCH v3 5/5] cmd: mvebu: bubt: show image boot device In-Reply-To: References: <20200323174307.209645-1-mrjoel@lixil.net> <20200323174307.209645-5-mrjoel@lixil.net> Message-ID: <15cda943da55bfbb8ff313709d96590f@lixil.net> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 2020-03-24 01:28, Stefan Roese wrote: > On 23.03.20 18:43, Joel Johnson wrote: >> When a mismatch is found trying to write an image for one boot method >> to a different boot device, print an error message including the image >> header marked target boot device type. >> >> Signed-off-by: Joel Johnson >> Reviewed-by: Stefan Roese >> >> --- >> >> v2 changes: >> - newly added in v2 series >> v3 changes: >> - none >> >> --- >> cmd/mvebu/bubt.c | 15 ++++++++++++--- >> 1 file changed, 12 insertions(+), 3 deletions(-) >> >> diff --git a/cmd/mvebu/bubt.c b/cmd/mvebu/bubt.c >> index fbcad37c40..f992507041 100644 >> --- a/cmd/mvebu/bubt.c >> +++ b/cmd/mvebu/bubt.c >> @@ -676,6 +676,17 @@ static int a38x_check_boot_mode(const struct >> bubt_dev *dst) >> if (a38x_boot_modes[mode].id == hdr->blockid) >> return 0; >> + for (int i = 0; i < A38X_BOOT_MODE_MAX; i++) { > > This will fail, as A38X_BOOT_MODE_MAX is not defined any more. Please > use ARRAY_SIZE() here as well. > > Thanks, > Stefan Yeah, I caught that but missed committing it for this series - I'd sent out a v4 with this fixed. A v5 with your other ifdef change will include it. Joel