[U-Boot] [PATCH 3/8] dm: blk: Add a function to find the next block device number

Simon Glass sjg at chromium.org
Sat May 20 02:28:59 UTC 2017


Hi Andy,

On 18 May 2017 at 10:01,  <sjg at google.com> wrote:
> On Wed, May 3, 2017 at 5:36 AM, Simon Glass <sjg at chromium.org> wrote:
>> Hi Andy,
>>
>> On 24 April 2017 at 02:04, Andy Shevchenko <andy.shevchenko at gmail.com> wrote:
>>> On Mon, Apr 24, 2017 at 5:02 AM, Simon Glass <sjg at chromium.org> wrote:
>>>> At present this code is inline. Move it into a function to allow it to
>>>> be used elsewhere.
>>>>
>>>> Signed-off-by: Simon Glass <sjg at chromium.org>
>>>
>>>> +static int blk_next_free_devnum(enum if_type if_type)
>>>> +{
>>>> +       int ret;
>>>> +
>>>> +       ret = blk_find_max_devnum(if_type);
>>>> +       if (ret == -ENODEV)
>>>> +               return 0;
>>>
>>>> +       else if (ret < 0)
>>>
>>> Useless 'else'.
>>>
>>>> +               return ret;
>>>> +       else
>>>
>>> Ditto.

I updated these when applying.

- Simon


More information about the U-Boot mailing list