Skip to contentSkip to conversation

nvdimm-utils: clean up headers and add license comment

PATCH Superseded Igor Mammedov 3 participants 5 messages Apr 3, 2020

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nvdimm-utils: clean up headers and add license comment

Fixes 3f350f6bb36233be50fc2bc18dc78b6a948a5dbe
---
 include/qemu/nvdimm-utils.h |  2 --
 util/nvdimm-utils.c         | 29 +++++++++++++++++++++++++++++
 2 files changed, 29 insertions(+), 2 deletions(-)
include/qemu/nvdimm-utils.h +0 -2
index 4b8b198ba7..1f1dae477f 100644
@@ -1,7 +1,5 @@
 #ifndef NVDIMM_UTILS_H
 #define NVDIMM_UTILS_H
 
-#include "qemu/osdep.h"
-
 GSList *nvdimm_get_device_list(void);
 #endif
util/nvdimm-utils.c +29 -0
index 5cc768ca47..ca41d39af5 100644
@@ -1,3 +1,32 @@
+/*
+ * NVDIMM utilities
+ *
+ * Copyright(C) 2015 Intel Corporation.
+ *
+ * Author:
+ *  Xiao Guangrong <[email protected]>
+ *
+ * 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"
 
Signature · 1 line
2.18.1
#1 lore raw
Quoted 14 lines · Igor Mammedov
Fixes 3f350f6bb36233be50fc2bc18dc78b6a948a5dbe
---
 include/qemu/nvdimm-utils.h |  2 --
 util/nvdimm-utils.c         | 29 +++++++++++++++++++++++++++++
 2 files changed, 29 insertions(+), 2 deletions(-)
include/qemu/nvdimm-utils.h +0 -0
index 4b8b198ba7..1f1dae477f 100644

include/qemu/nvdimm-utils.h line 3

Quoted 3 lines
include/qemu/nvdimm-utils.h +0 -0
@@ -1,7 +1,5 @@
 #ifndef NVDIMM_UTILS_H
 #define NVDIMM_UTILS_H
 

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

Quoted 17 lines
include/qemu/nvdimm-utils.h +0 -2
-#include "qemu/osdep.h"
-
 GSList *nvdimm_get_device_list(void);
 #endif
util/nvdimm-utils.c +8 -0
index 5cc768ca47..ca41d39af5 100644
@@ -1,3 +1,32 @@
+/*
+ * NVDIMM utilities
+ *
+ * Copyright(C) 2015 Intel Corporation.
+ *
+ * Author:
+ *  Xiao Guangrong <[email protected]>
+ *

util/nvdimm-utils.c line 18

Quoted 10 lines
util/nvdimm-utils.c +10 -0
+ * 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.

Quoted 15 lines
util/nvdimm-utils.c +11 -1
+ *
+ * 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"
 
--
Quoted 2 lines

2.18.1

thanks
-- PMM

#2 lore raw
Quoted 10 lines · On Fri, 3 Apr 2020 15:06:14 +0100 Peter Maydell <[email protected]>…
Quoted 9 lines · Igor Mammedov
Fixes 3f350f6bb36233be50fc2bc18dc78b6a948a5dbe
---
 include/qemu/nvdimm-utils.h |  2 --
 util/nvdimm-utils.c         | 29 +++++++++++++++++++++++++++++
 2 files changed, 29 insertions(+), 2 deletions(-)
Quoted 10 lines

include/qemu/nvdimm-utils.h line 3

Quoted 8 lines
include/qemu/nvdimm-utils.h +0 -0
index 4b8b198ba7..1f1dae477f 100644
@@ -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?

Quoted 27 lines
Quoted 27 lines
include/qemu/nvdimm-utils.h +0 -2
-#include "qemu/osdep.h"
-
 GSList *nvdimm_get_device_list(void);
 #endif
util/nvdimm-utils.c +17 -0
index 5cc768ca47..ca41d39af5 100644
@@ -1,3 +1,32 @@
+/*
+ * NVDIMM utilities
+ *
+ * Copyright(C) 2015 Intel Corporation.
+ *
+ * Author:
+ *  Xiao Guangrong <[email protected]>
+ *
+ * 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
Quoted 8 lines

util/nvdimm-utils.c line 18

Quoted 1 line
util/nvdimm-utils.c +1 -0
+ * 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.

Quoted 23 lines
Quoted 16 lines
util/nvdimm-utils.c +11 -1
+ *
+ * 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"
 
--
Quoted 2 lines

2.18.1

thanks
-- PMM

#3 lore raw
Quoted 24 lines · Igor Mammedov
Quoted 10 lines · On Fri, 3 Apr 2020 15:06:14 +0100 Peter Maydell <[email protected]>…
Quoted 9 lines · Igor Mammedov
Fixes 3f350f6bb36233be50fc2bc18dc78b6a948a5dbe
---
 include/qemu/nvdimm-utils.h |  2 --
 util/nvdimm-utils.c         | 29 +++++++++++++++++++++++++++++
 2 files changed, 29 insertions(+), 2 deletions(-)
Quoted 10 lines

include/qemu/nvdimm-utils.h line 3

Quoted 8 lines
include/qemu/nvdimm-utils.h +0 -0
index 4b8b198ba7..1f1dae477f 100644
@@ -1,7 +1,5 @@
 #ifndef NVDIMM_UTILS_H
 #define NVDIMM_UTILS_H
 

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

Quoted 1 line

do we have to add that for headers as well?

Yes; ideally every source file should state its license.

thanks
-- PMM

#4 lore raw
In reply to Igor Mammedov
Patchew URL: https://patchew.org/QEMU/[email protected]/

Patchew URL: https://patchew.org/QEMU/[email protected]/

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/build/tests/qemu-iotests/040.out.bad 2020-04-03 21:58:02.494078702 +0000 renamed from tmp/qemu-test/src/tests/qemu-iotests/040.out 2020-04-03 13:54:30.000000000 +0000 +2 -0
@@ -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/[email protected]/testing.docker-quick@centos7/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to [email protected]