On Wednesday 05 July 2017 11:17 AM, Shreyansh Jain wrote:
> On Wednesday 05 July 2017 03:13 AM, Thomas Monjalon wrote:
>> The bus name was stored with embedded double quotes.
>> Indeed the bus name is given with a string in a macro,
>> which is not used elsewhere.
>> These macros are useless because the buses are drivers,
>> so they must not have any API for the application writer.
>> The registration can be done with a hardcoded value without quotes.
>>
>> There is another (small) benefit of not using macros for driver names:
>> it is to have a meaningful constructor function name.
>> For instance, it was businitfn_PCI_BUS_NAME instead of businitfn_pci.
>>
>> The bus registration macro is also changed to use
>> the new RTE_INIT_PRIO macro, similar to RTE_INIT used for other drivers.
>> The priority is the highest (101) in order to be sure that the bus driver
>> is registered before its device drivers.
>>
>> Fixes: 0fd1a0eaae19 ("pci: add bus driver")
>> Fixes: fea892e35f21 ("bus/vdev: use standard bus registration")
>> Fixes: 7e7df6d0a41d ("bus/fslmc: introduce fsl-mc bus driver")
>>
>> Signed-off-by: Thomas Monjalon <tho...@monjalon.net>
>> ---
>> This patch is a proposal to replace the patch
>> "bus: fix bus name registration" in the series "rte_bus parse API".
>> ---
>>  drivers/bus/fslmc/fslmc_bus.c            | 2 +-
>>  drivers/bus/fslmc/rte_fslmc.h            | 3 ---
>>  lib/librte_eal/common/eal_common_pci.c   | 2 +-
>>  lib/librte_eal/common/eal_common_vdev.c  | 2 +-
>>  lib/librte_eal/common/include/rte_bus.h  | 3 ++-
>>  lib/librte_eal/common/include/rte_eal.h  | 3 +++
>>  lib/librte_eal/common/include/rte_pci.h  | 3 ---
>>  lib/librte_eal/common/include/rte_vdev.h | 2 --
>>  8 files changed, 8 insertions(+), 12 deletions(-)
>>
> For DPAA2 as well as generic change:
> 
> Acked-by: Shreyansh Jain <shreyansh.j...@nxp.com>
> 

I just noticed that Bruce has already Acked the patch which is super-seeded by 
this. I didn't mean to conflict here.

I don't have a reservation to either of these - but, I like this patch as it 
does away with priority as well as need for drivers to define an internal name 
strings. Thus, my ACK to this.

Reply via email to