Re: [PATCH v1 15/20] node_device_udev: Pass the driver state as parameter in preparation for the next commit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 23, 2024 at 09:10 AM +0100, Daniel P. Berrangé <berrange@xxxxxxxxxx> wrote:
> On Tue, Apr 23, 2024 at 10:03:35AM +0200, Marc Hartmayer wrote:
>> On Fri, Apr 19, 2024 at 02:23 PM -0500, Jonathon Jongsma <jjongsma@xxxxxxxxxx> wrote:
>> > On 4/19/24 9:49 AM, Marc Hartmayer wrote:
>> >> It's better practice for all functions called by the threads to pass the driver
>> >> via parameter and not global variables. Easier to test and cleaner.
>> >>
>> 
>> […snip…]
>> 
>> >>   
>> >>   
>> >>   static int
>> >> -udevProcessPCI(struct udev_device *device,
>> >> +udevProcessPCI(virNodeDeviceDriverState *driver_state, struct udev_device *device,
>> >>                  virNodeDeviceDef *def)
>> >
>> > While there are exceptions, the general coding style is to have a single 
>> > argument per line for function definitions.
>> 
>> Okay. BTW, why is there no .clangformat configuration available for
>> Libvirt? :/
>
> There is no combination of clangformat settings that can match
> libvirt code style. If we were startnig again from scratch we
> would of course want to match a defined clangformat style,
> but unless we're willing to bulk reformat the codebase we are
> stuck with what we have.

Hmm, is the downside of doing a full codebase reformat greater than
always doing the code formatting manually? Probably it is, otherwise it
would have already be done :)

If we would have such a big commit we could list it in a
`.git-blame-ignore-revs` file so it will ignored by git blames.

>
>
> With regards,
> Daniel
> -- 
> |: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
> |: https://libvirt.org         -o-            https://fstop138.berrange.com :|
> |: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
>
-- 
Kind regards / Beste Grüße
   Marc Hartmayer

IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Wolfgang Wendt
Geschäftsführung: David Faller
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294
_______________________________________________
Devel mailing list -- devel@xxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux