diff mbox series

nvdimm-utils: clean up headers and add license comment

Message ID 20200403140018.13531-1-imammedo@redhat.com
State New
Headers show
Series nvdimm-utils: clean up headers and add license comment | expand

Commit Message

Igor Mammedov April 3, 2020, 2 p.m. UTC
Fixes: 3f350f6bb36233be50fc2bc18dc78b6a948a5dbe
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
---
 include/qemu/nvdimm-utils.h |  2 --
 util/nvdimm-utils.c         | 29 +++++++++++++++++++++++++++++
 2 files changed, 29 insertions(+), 2 deletions(-)

Comments

Peter Maydell April 3, 2020, 2:06 p.m. UTC | #1
On Fri, 3 Apr 2020 at 15:00, Igor Mammedov <imammedo@redhat.com> wrote:
>
> Fixes: 3f350f6bb36233be50fc2bc18dc78b6a948a5dbe
> Reported-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> ---
>  include/qemu/nvdimm-utils.h |  2 --
>  util/nvdimm-utils.c         | 29 +++++++++++++++++++++++++++++
>  2 files changed, 29 insertions(+), 2 deletions(-)
>
> diff --git a/include/qemu/nvdimm-utils.h b/include/qemu/nvdimm-utils.h
> index 4b8b198ba7..1f1dae477f 100644
> --- a/include/qemu/nvdimm-utils.h
> +++ b/include/qemu/nvdimm-utils.h
> @@ -1,7 +1,5 @@
>  #ifndef NVDIMM_UTILS_H
>  #define NVDIMM_UTILS_H
>

.h file still missing the copyright-n-license comment ?

> -#include "qemu/osdep.h"
> -
>  GSList *nvdimm_get_device_list(void);
>  #endif
> diff --git a/util/nvdimm-utils.c b/util/nvdimm-utils.c
> index 5cc768ca47..ca41d39af5 100644
> --- a/util/nvdimm-utils.c
> +++ b/util/nvdimm-utils.c
> @@ -1,3 +1,32 @@
> +/*
> + * NVDIMM utilities
> + *
> + * Copyright(C) 2015 Intel Corporation.
> + *
> + * Author:
> + *  Xiao Guangrong <guangrong.xiao@linux.intel.com>
> + *
> + * NFIT is defined in ACPI 6.0: 5.2.25 NVDIMM Firmware Interface Table (NFIT)
> + * and the DSM specification can be found at:
> + *       http://pmem.io/documents/NVDIMM_DSM_Interface_Example.pdf
> + *
> + * Currently, it only supports PMEM Virtualization.
> + *
> + * This library is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU Lesser General Public
> + * License as published by the Free Software Foundation; either
> + * version 2 of the License, or (at your option) any later version.

I guess you copied this from somewhere else, but commit b7cbb8741b40b7c
suggests that "Lesser General Public License version 2" is
wrong and it should either be "Library General Public License
version 2" or "Lesser General Public License version 2.1"...we
might as well get it right when we're adding a new file, so
I would suggest you want 2.1 here.

> + *
> + * This library is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with this library; if not, see <http://www.gnu.org/licenses/>
> + */
> +
> +#include "qemu/osdep.h"
>  #include "qemu/nvdimm-utils.h"
>  #include "hw/mem/nvdimm.h"
>
> --
> 2.18.1
>


thanks
-- PMM
Igor Mammedov April 3, 2020, 2:12 p.m. UTC | #2
On Fri, 3 Apr 2020 15:06:14 +0100
Peter Maydell <peter.maydell@linaro.org> wrote:

> On Fri, 3 Apr 2020 at 15:00, Igor Mammedov <imammedo@redhat.com> wrote:
> >
> > Fixes: 3f350f6bb36233be50fc2bc18dc78b6a948a5dbe
> > Reported-by: Peter Maydell <peter.maydell@linaro.org>
> > Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> > ---
> >  include/qemu/nvdimm-utils.h |  2 --
> >  util/nvdimm-utils.c         | 29 +++++++++++++++++++++++++++++
> >  2 files changed, 29 insertions(+), 2 deletions(-)
> >
> > diff --git a/include/qemu/nvdimm-utils.h b/include/qemu/nvdimm-utils.h
> > index 4b8b198ba7..1f1dae477f 100644
> > --- a/include/qemu/nvdimm-utils.h
> > +++ b/include/qemu/nvdimm-utils.h
> > @@ -1,7 +1,5 @@
> >  #ifndef NVDIMM_UTILS_H
> >  #define NVDIMM_UTILS_H
> >  
> 
> .h file still missing the copyright-n-license comment ?
do we have to add that for headers as well?

> 
> > -#include "qemu/osdep.h"
> > -
> >  GSList *nvdimm_get_device_list(void);
> >  #endif
> > diff --git a/util/nvdimm-utils.c b/util/nvdimm-utils.c
> > index 5cc768ca47..ca41d39af5 100644
> > --- a/util/nvdimm-utils.c
> > +++ b/util/nvdimm-utils.c
> > @@ -1,3 +1,32 @@
> > +/*
> > + * NVDIMM utilities
> > + *
> > + * Copyright(C) 2015 Intel Corporation.
> > + *
> > + * Author:
> > + *  Xiao Guangrong <guangrong.xiao@linux.intel.com>
> > + *
> > + * NFIT is defined in ACPI 6.0: 5.2.25 NVDIMM Firmware Interface Table (NFIT)
> > + * and the DSM specification can be found at:
> > + *       http://pmem.io/documents/NVDIMM_DSM_Interface_Example.pdf
> > + *
> > + * Currently, it only supports PMEM Virtualization.
> > + *
> > + * This library is free software; you can redistribute it and/or
> > + * modify it under the terms of the GNU Lesser General Public
> > + * License as published by the Free Software Foundation; either
> > + * version 2 of the License, or (at your option) any later version.  
> 
> I guess you copied this from somewhere else, but commit b7cbb8741b40b7c
> suggests that "Lesser General Public License version 2" is
> wrong and it should either be "Library General Public License
> version 2" or "Lesser General Public License version 2.1"...we
> might as well get it right when we're adding a new file, so
> I would suggest you want 2.1 here.

it's copied from the source file this code was moved from.

> 
> > + *
> > + * This library is distributed in the hope that it will be useful,
> > + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> > + * Lesser General Public License for more details.
> > + *
> > + * You should have received a copy of the GNU Lesser General Public
> > + * License along with this library; if not, see <http://www.gnu.org/licenses/>
> > + */
> > +
> > +#include "qemu/osdep.h"
> >  #include "qemu/nvdimm-utils.h"
> >  #include "hw/mem/nvdimm.h"
> >
> > --
> > 2.18.1
> >  
> 
> 
> thanks
> -- PMM
>
Peter Maydell April 3, 2020, 2:14 p.m. UTC | #3
On Fri, 3 Apr 2020 at 15:13, Igor Mammedov <imammedo@redhat.com> wrote:
>
> On Fri, 3 Apr 2020 15:06:14 +0100
> Peter Maydell <peter.maydell@linaro.org> wrote:
>
> > On Fri, 3 Apr 2020 at 15:00, Igor Mammedov <imammedo@redhat.com> wrote:
> > >
> > > Fixes: 3f350f6bb36233be50fc2bc18dc78b6a948a5dbe
> > > Reported-by: Peter Maydell <peter.maydell@linaro.org>
> > > Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> > > ---
> > >  include/qemu/nvdimm-utils.h |  2 --
> > >  util/nvdimm-utils.c         | 29 +++++++++++++++++++++++++++++
> > >  2 files changed, 29 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/include/qemu/nvdimm-utils.h b/include/qemu/nvdimm-utils.h
> > > index 4b8b198ba7..1f1dae477f 100644
> > > --- a/include/qemu/nvdimm-utils.h
> > > +++ b/include/qemu/nvdimm-utils.h
> > > @@ -1,7 +1,5 @@
> > >  #ifndef NVDIMM_UTILS_H
> > >  #define NVDIMM_UTILS_H
> > >
> >
> > .h file still missing the copyright-n-license comment ?
> do we have to add that for headers as well?

Yes; ideally every source file should state its license.

thanks
-- PMM
no-reply@patchew.org April 3, 2020, 10:05 p.m. UTC | #4
Patchew URL: https://patchew.org/QEMU/20200403140018.13531-1-imammedo@redhat.com/



Hi,

This series failed the docker-quick@centos7 build test. Please find the testing commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.

=== TEST SCRIPT BEGIN ===
#!/bin/bash
make docker-image-centos7 V=1 NETWORK=1
time make docker-test-quick@centos7 SHOW_ENV=1 J=14 NETWORK=1
=== TEST SCRIPT END ===

--- /tmp/qemu-test/src/tests/qemu-iotests/040.out       2020-04-03 13:54:30.000000000 +0000
+++ /tmp/qemu-test/build/tests/qemu-iotests/040.out.bad 2020-04-03 21:58:02.494078702 +0000
@@ -1,3 +1,5 @@
+WARNING:qemu.machine:qemu received signal 9: /tmp/qemu-test/build/tests/qemu-iotests/../../x86_64-softmmu/qemu-system-x86_64 -display none -vga none -chardev socket,id=mon,path=/tmp/tmp.ZVJAkdsYy9/qemu-20624-monitor.sock -mon chardev=mon,mode=control -qtest unix:path=/tmp/tmp.ZVJAkdsYy9/qemu-20624-qtest.sock -accel qtest -nodefaults -display none -accel qtest -drive if=none,id=drive0,file=/tmp/qemu-test/test.img,format=qcow2,cache=writeback,aio=threads,node-name=top,backing.node-name=mid,backing.backing.node-name=base -device virtio-scsi-pci -device scsi-hd,id=scsi0,drive=drive0
+WARNING:qemu.machine:qemu received signal 9: /tmp/qemu-test/build/tests/qemu-iotests/../../x86_64-softmmu/qemu-system-x86_64 -display none -vga none -chardev socket,id=mon,path=/tmp/tmp.ZVJAkdsYy9/qemu-20624-monitor.sock -mon chardev=mon,mode=control -qtest unix:path=/tmp/tmp.ZVJAkdsYy9/qemu-20624-qtest.sock -accel qtest -nodefaults -display none -accel qtest -drive if=none,id=drive0,file=/tmp/qemu-test/test.img,format=qcow2,cache=writeback,aio=threads,node-name=top,backing.node-name=mid,backing.backing.node-name=base -device virtio-scsi-pci -device scsi-hd,id=scsi0,drive=drive0
 ...........................................................
 ----------------------------------------------------------------------
 Ran 59 tests
---
Not run: 259
Failures: 040
Failed 1 of 116 iotests
make: *** [check-tests/check-block.sh] Error 1
Traceback (most recent call last):
  File "./tests/docker/docker.py", line 664, in <module>
    sys.exit(main())
---
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sudo', '-n', 'docker', 'run', '--label', 'com.qemu.instance.uuid=f83247c63c6242558aed52ecb1ff0bfd', '-u', '1003', '--security-opt', 'seccomp=unconfined', '--rm', '-e', 'TARGET_LIST=', '-e', 'EXTRA_CONFIGURE_OPTS=', '-e', 'V=', '-e', 'J=14', '-e', 'DEBUG=', '-e', 'SHOW_ENV=1', '-e', 'CCACHE_DIR=/var/tmp/ccache', '-v', '/home/patchew2/.cache/qemu-docker-ccache:/var/tmp/ccache:z', '-v', '/var/tmp/patchew-tester-tmp-8t1gmbs5/src/docker-src.2020-04-03-17.51.47.11538:/var/tmp/qemu:z,ro', 'qemu:centos7', '/var/tmp/qemu/run', 'test-quick']' returned non-zero exit status 2.
filter=--filter=label=com.qemu.instance.uuid=f83247c63c6242558aed52ecb1ff0bfd
make[1]: *** [docker-run] Error 1
make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-8t1gmbs5/src'
make: *** [docker-run-test-quick@centos7] Error 2

real    14m7.306s
user    0m9.304s


The full log is available at
http://patchew.org/logs/20200403140018.13531-1-imammedo@redhat.com/testing.docker-quick@centos7/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
diff mbox series

Patch

diff --git a/include/qemu/nvdimm-utils.h b/include/qemu/nvdimm-utils.h
index 4b8b198ba7..1f1dae477f 100644
--- a/include/qemu/nvdimm-utils.h
+++ b/include/qemu/nvdimm-utils.h
@@ -1,7 +1,5 @@ 
 #ifndef NVDIMM_UTILS_H
 #define NVDIMM_UTILS_H
 
-#include "qemu/osdep.h"
-
 GSList *nvdimm_get_device_list(void);
 #endif
diff --git a/util/nvdimm-utils.c b/util/nvdimm-utils.c
index 5cc768ca47..ca41d39af5 100644
--- a/util/nvdimm-utils.c
+++ b/util/nvdimm-utils.c
@@ -1,3 +1,32 @@ 
+/*
+ * NVDIMM utilities
+ *
+ * Copyright(C) 2015 Intel Corporation.
+ *
+ * Author:
+ *  Xiao Guangrong <guangrong.xiao@linux.intel.com>
+ *
+ * NFIT is defined in ACPI 6.0: 5.2.25 NVDIMM Firmware Interface Table (NFIT)
+ * and the DSM specification can be found at:
+ *       http://pmem.io/documents/NVDIMM_DSM_Interface_Example.pdf
+ *
+ * Currently, it only supports PMEM Virtualization.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>
+ */
+
+#include "qemu/osdep.h"
 #include "qemu/nvdimm-utils.h"
 #include "hw/mem/nvdimm.h"