[libvirt] [PATCH 02/15] conf: nodedev: Rename virNodeDeviceCapMatch to virNodeDevObjHasCap
mprivozn at redhat.com
Mon Jan 29 09:07:57 UTC 2018
On 01/29/2018 09:47 AM, Erik Skultety wrote:
> On Fri, Jan 26, 2018 at 12:40:46PM +0100, Michal Privoznik wrote:
>> On 01/25/2018 10:23 AM, Erik Skultety wrote:
>>> We currently have 2 methods that do the capability matching. This should
>>> be condensed to a single function and all the derivates should just call
>>> into that using a proper type conversion.
>>> Signed-off-by: Erik Skultety <eskultet at redhat.com>
>>> src/conf/virnodedeviceobj.c | 8 +++++---
>>> 1 file changed, 5 insertions(+), 3 deletions(-)
>>> diff --git a/src/conf/virnodedeviceobj.c b/src/conf/virnodedeviceobj.c
>>> index a4d38b3a1..ccad59a4b 100644
>>> --- a/src/conf/virnodedeviceobj.c
>>> +++ b/src/conf/virnodedeviceobj.c
>>> @@ -55,6 +55,8 @@ static void virNodeDeviceObjDispose(void *opaque);
>>> static void virNodeDeviceObjListDispose(void *opaque);
>>> static bool virNodeDeviceObjHasCapStr(const virNodeDeviceObj *obj,
>>> const char *cap);
>>> +static bool virNodeDeviceObjHasCap(const virNodeDeviceObj *obj,
>>> + int type);
>> Again, I'm failing to see why the forward declaration is needed. ACk to
>> the rest.
> I can drop the one from patch 1 that one is really not needed, but dropping this
> one would cause the compilation to fail on patch 3. Now, sure I could very
> easily solve this by moving the function up, but I originally decided to go this
> way rather than creating 2 large hunks just because of the function move. Let
> me know whether you'd prefer to see the function to be moved or you're fine
> with the forward decl. in this case.
Ah, okay keep them in then. I just failed to see this reasoning.
More information about the libvir-list