[libvirt] [RFC PATCH 01/11] nodedev: Fix guideline violations in nodedev modules

Peter Krempa pkrempa at redhat.com
Wed Mar 29 13:50:28 UTC 2017


On Wed, Mar 29, 2017 at 14:51:11 +0200, Erik Skultety wrote:
> We recently started to enforce certain guideline rule a bit more, e.g.
> functions delimited by 2 newlines in *.c, by 1 newline in *.h, return
> types on a separate line, etc. This patch adjusts these issues in all
> nodedev modules.
> 
> Signed-off-by: Erik Skultety <eskultet at redhat.com>
> ---
>  src/node_device/node_device_driver.c      |  29 +++-
>  src/node_device/node_device_driver.h      |  82 +++++++----
>  src/node_device/node_device_hal.c         |   9 ++
>  src/node_device/node_device_linux_sysfs.c |   1 +
>  src/node_device/node_device_linux_sysfs.h |   9 +-
>  src/node_device/node_device_udev.c        | 233 ++++++++++++++++++------------
>  6 files changed, 238 insertions(+), 125 deletions(-)
> 
> diff --git a/src/node_device/node_device_driver.c b/src/node_device/node_device_driver.c
> index 99f7bc5476..9b1c5bb5e9 100644
> --- a/src/node_device/node_device_driver.c
> +++ b/src/node_device/node_device_driver.c
> @@ -47,7 +47,8 @@
>  
>  virNodeDeviceDriverStatePtr driver;
>  
> -static int update_caps(virNodeDeviceObjPtr dev)
> +static int
> +update_caps(virNodeDeviceObjPtr dev)

This does not really adhere to the guidelines. Guidelines say that
functions have to start with 'vir' prefix and use camel case. Also they
have to contain the name of the module.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170329/bb1b3296/attachment-0001.sig>


More information about the libvir-list mailing list