Hi Pali,

On Fri, Apr 21, 2023 at 3:11 PM Pali Rohár <p...@kernel.org> wrote:

> This does not look to be correct. Return type of the function is uint
> but here you are trying to return negative number.
>
> I think that there is some layering or API issue. Caller of this
> function probably does not expect any failure and use returned value as
> partition number. But you are reading partition number from the source
> which may return failure (as the source does not have to contain it).
>
> I'm not sure what is the correct way how to handle these kind of error.
> I hope that this is something which you would know.

Thanks for your feedback.

Talked to Eduard and we prefer to go with a simpler implementation of
board_mmc_get_env_part(),
just like the one from board/purism/librem5/librem5.c.

The librem5 board is based on the imx8mq, which has the same esdhc
controller as the imx7d and
it works well in our case. Will send a v3.

Reply via email to