[U-Boot] [RFC PATCH 02/13] net: Fix eth_get_dev_by_name() warning

Joe Hershberger joe.hershberger at gmail.com
Sun Mar 1 18:02:48 CET 2015


Hi Simon,

On Sun, Mar 1, 2015 at 10:33 AM, Simon Glass <sjg at chromium.org> wrote:
>
> This can return either udevice or eth_device, so deal with either.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>
>  net/eth.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/eth.c b/net/eth.c
> index 3b3cd84..4d7f9a2 100644
> --- a/net/eth.c
> +++ b/net/eth.c
> @@ -914,7 +914,7 @@ void eth_set_current(void)
>
>         if (act == NULL) {
>                 char *ethprime = getenv("ethprime");
> -               struct udevice *dev = NULL;
> +               void *dev = NULL;

Whoops, sorry about that.  I caught that shortly after I posted the last
version.  It is fixed in the next version.

>                 if (ethprime)
>                         dev = eth_get_dev_by_name(ethprime);
> --
> 2.2.0.rc0.207.ga3a616c
>


More information about the U-Boot mailing list