Re: [lng-odp] [API-NEXT PATCH 16/21] drv: complement parameters to the driver probe() function

2017-02-27 Thread Christophe Milard
On 23 February 2017 at 00:00, Bill Fischofer  wrote:
>
>
> On Wed, Feb 22, 2017 at 6:55 AM, Christophe Milard
>  wrote:
>>
>> Of course, when probing a driver, the latter should be given the devio
>> handle to be used. This is what this patch adds. It also adds the index
>> of the devio, hence telling the driver which of the possible
>> ODPDRV_MAX_DEVIOS devios was selected, as this is going to be the first
>> thing the driver needs to know.
>>
>> Signed-off-by: Christophe Milard 
>> ---
>>  include/odp/drv/spec/driver.h | 7 +--
>>  1 file changed, 5 insertions(+), 2 deletions(-)
>>
>> diff --git a/include/odp/drv/spec/driver.h b/include/odp/drv/spec/driver.h
>> index 221a6ce..b3c9b76 100644
>> --- a/include/odp/drv/spec/driver.h
>> +++ b/include/odp/drv/spec/driver.h
>> @@ -314,9 +314,12 @@ struct odpdrv_driver_param_t {
>>
>> /** Probe function:
>>  * Called by ODP to see if the driver can drive a given device
>> -*
>> +* -dev is obviously the device we try to handle.
>
>
> I'd delete "obviously" here. Sounds a bit condescending in a spec. Perhaps
> just "-dev the device to be probed"

OK: => V2

Christophe

>
>>
>> +* -devio is the devio to be used.
>> +* -devio_idx actually tells which devio was selected: it is the
>> +* index in the devios array above.
>>  */
>> -   int (*probe)(odpdrv_device_t *dev);
>> +   int (*probe)(odpdrv_device_t dev, odpdrv_devio_t devio, int
>> devio_idx);
>>
>> /** unbind function:
>>  * Only called with devices whose probe() returned true
>> --
>> 2.7.4
>>
>


Re: [lng-odp] [API-NEXT PATCH 16/21] drv: complement parameters to the driver probe() function

2017-02-22 Thread Bill Fischofer
On Wed, Feb 22, 2017 at 6:55 AM, Christophe Milard <
christophe.mil...@linaro.org> wrote:

> Of course, when probing a driver, the latter should be given the devio
> handle to be used. This is what this patch adds. It also adds the index
> of the devio, hence telling the driver which of the possible
> ODPDRV_MAX_DEVIOS devios was selected, as this is going to be the first
> thing the driver needs to know.
>
> Signed-off-by: Christophe Milard 
> ---
>  include/odp/drv/spec/driver.h | 7 +--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/include/odp/drv/spec/driver.h b/include/odp/drv/spec/driver.h
> index 221a6ce..b3c9b76 100644
> --- a/include/odp/drv/spec/driver.h
> +++ b/include/odp/drv/spec/driver.h
> @@ -314,9 +314,12 @@ struct odpdrv_driver_param_t {
>
> /** Probe function:
>  * Called by ODP to see if the driver can drive a given device
> -*
> +* -dev is obviously the device we try to handle.
>

I'd delete "obviously" here. Sounds a bit condescending in a spec. Perhaps
just "-dev the device to be probed"


> +* -devio is the devio to be used.
> +* -devio_idx actually tells which devio was selected: it is the
> +* index in the devios array above.
>  */
> -   int (*probe)(odpdrv_device_t *dev);
> +   int (*probe)(odpdrv_device_t dev, odpdrv_devio_t devio, int
> devio_idx);
>
> /** unbind function:
>  * Only called with devices whose probe() returned true
> --
> 2.7.4
>
>