Message ID | alpine.DEB.2.10.1704241640160.16723@sstabellini-ThinkPad-X260 (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Mon, 24 Apr 2017 16:44:53 -0700 (PDT) Stefano Stabellini <sstabellini@kernel.org> wrote: > On Mon, 24 Apr 2017, Peter Maydell wrote: > > On 24 April 2017 at 22:25, Stefano Stabellini <sstabellini@kernel.org> wrote: > > > diff --git a/hw/9pfs/xen-9pfs.h b/hw/9pfs/xen-9pfs.h > > > new file mode 100644 > > > index 0000000..18f0ec0 > > > --- /dev/null > > > +++ b/hw/9pfs/xen-9pfs.h > > > @@ -0,0 +1,14 @@ > > > +/* > > > + * Xen 9p backend > > > + * > > > + * Copyright Aporeto 2017 > > > + * > > > + * Authors: > > > + * Stefano Stabellini <stefano@aporeto.com> > > > + * > > > + */ > > > > Trivial file, but I prefer it if we have a brief license > > statement in every file, just to be clear (it might > > accumulate more code later). > > Sure > > > > + > > > +#include <xen/io/protocols.h> > > > +#include "hw/xen/io/ring.h" > > > + > > > +DEFINE_XEN_FLEX_RING_AND_INTF(xen_9pfs); > > > > Is it worth a comment to dissuade people from thinking they can > > inline the file back into xen-9p-backend.c ? > > Thanks for the quick review! Here you go: > > > diff --git a/hw/9pfs/xen-9p-backend.c b/hw/9pfs/xen-9p-backend.c > index 7e962aa..9c7f41a 100644 > --- a/hw/9pfs/xen-9p-backend.c > +++ b/hw/9pfs/xen-9p-backend.c > @@ -13,12 +13,9 @@ > #include "hw/hw.h" > #include "hw/9pfs/9p.h" > #include "hw/xen/xen_backend.h" > -#include "hw/xen/io/ring.h" > +#include "hw/9pfs/xen-9pfs.h" > #include "qemu/config-file.h" > #include "fsdev/qemu-fsdev.h" > -#include <xen/io/protocols.h> > - > -DEFINE_XEN_FLEX_RING_AND_INTF(xen_9pfs); > > #define VERSIONS "1" > #define MAX_RINGS 8 > diff --git a/hw/9pfs/xen-9pfs.h b/hw/9pfs/xen-9pfs.h > new file mode 100644 > index 0000000..6e33d77 > --- /dev/null > +++ b/hw/9pfs/xen-9pfs.h > @@ -0,0 +1,21 @@ > +/* > + * Xen 9p backend > + * > + * Copyright Aporeto 2017 > + * > + * Authors: > + * Stefano Stabellini <stefano@aporeto.com> > + * > + * This work is licensed under the terms of the GNU GPL version 2. "version 2 or later" maybe ? > + * See the COPYING file in the top-level directory. > + * > + */ > + > +#include <xen/io/protocols.h> > +#include "hw/xen/io/ring.h" > + > +/* > + * Do not merge into xen-9p-backend.c: clang doesn't allow unused static > + * inline functions in c files. > + */ > +DEFINE_XEN_FLEX_RING_AND_INTF(xen_9pfs);
Stefano Stabellini <sstabellini@kernel.org> writes: > On Mon, 24 Apr 2017, Peter Maydell wrote: >> On 24 April 2017 at 22:25, Stefano Stabellini <sstabellini@kernel.org> wrote: >> > diff --git a/hw/9pfs/xen-9pfs.h b/hw/9pfs/xen-9pfs.h >> > new file mode 100644 >> > index 0000000..18f0ec0 >> > --- /dev/null >> > +++ b/hw/9pfs/xen-9pfs.h >> > @@ -0,0 +1,14 @@ >> > +/* >> > + * Xen 9p backend >> > + * >> > + * Copyright Aporeto 2017 >> > + * >> > + * Authors: >> > + * Stefano Stabellini <stefano@aporeto.com> >> > + * >> > + */ >> >> Trivial file, but I prefer it if we have a brief license >> statement in every file, just to be clear (it might >> accumulate more code later). > > Sure > >> > + >> > +#include <xen/io/protocols.h> >> > +#include "hw/xen/io/ring.h" >> > + >> > +DEFINE_XEN_FLEX_RING_AND_INTF(xen_9pfs); >> >> Is it worth a comment to dissuade people from thinking they can >> inline the file back into xen-9p-backend.c ? > > Thanks for the quick review! Here you go: > > > diff --git a/hw/9pfs/xen-9p-backend.c b/hw/9pfs/xen-9p-backend.c > index 7e962aa..9c7f41a 100644 > --- a/hw/9pfs/xen-9p-backend.c > +++ b/hw/9pfs/xen-9p-backend.c > @@ -13,12 +13,9 @@ > #include "hw/hw.h" > #include "hw/9pfs/9p.h" > #include "hw/xen/xen_backend.h" > -#include "hw/xen/io/ring.h" > +#include "hw/9pfs/xen-9pfs.h" > #include "qemu/config-file.h" > #include "fsdev/qemu-fsdev.h" > -#include <xen/io/protocols.h> > - > -DEFINE_XEN_FLEX_RING_AND_INTF(xen_9pfs); > > #define VERSIONS "1" > #define MAX_RINGS 8 > diff --git a/hw/9pfs/xen-9pfs.h b/hw/9pfs/xen-9pfs.h > new file mode 100644 > index 0000000..6e33d77 > --- /dev/null > +++ b/hw/9pfs/xen-9pfs.h > @@ -0,0 +1,21 @@ > +/* > + * Xen 9p backend > + * > + * Copyright Aporeto 2017 > + * > + * Authors: > + * Stefano Stabellini <stefano@aporeto.com> > + * > + * This work is licensed under the terms of the GNU GPL version 2. Any particular reason for "version 2" instead of "version 2 or later"? > + * See the COPYING file in the top-level directory. > + * > + */ > + > +#include <xen/io/protocols.h> > +#include "hw/xen/io/ring.h" > + > +/* > + * Do not merge into xen-9p-backend.c: clang doesn't allow unused static > + * inline functions in c files. > + */ > +DEFINE_XEN_FLEX_RING_AND_INTF(xen_9pfs);
On Tue, 25 Apr 2017, Markus Armbruster wrote: > Stefano Stabellini <sstabellini@kernel.org> writes: > > > On Mon, 24 Apr 2017, Peter Maydell wrote: > >> On 24 April 2017 at 22:25, Stefano Stabellini <sstabellini@kernel.org> wrote: > >> > diff --git a/hw/9pfs/xen-9pfs.h b/hw/9pfs/xen-9pfs.h > >> > new file mode 100644 > >> > index 0000000..18f0ec0 > >> > --- /dev/null > >> > +++ b/hw/9pfs/xen-9pfs.h > >> > @@ -0,0 +1,14 @@ > >> > +/* > >> > + * Xen 9p backend > >> > + * > >> > + * Copyright Aporeto 2017 > >> > + * > >> > + * Authors: > >> > + * Stefano Stabellini <stefano@aporeto.com> > >> > + * > >> > + */ > >> > >> Trivial file, but I prefer it if we have a brief license > >> statement in every file, just to be clear (it might > >> accumulate more code later). > > > > Sure > > > >> > + > >> > +#include <xen/io/protocols.h> > >> > +#include "hw/xen/io/ring.h" > >> > + > >> > +DEFINE_XEN_FLEX_RING_AND_INTF(xen_9pfs); > >> > >> Is it worth a comment to dissuade people from thinking they can > >> inline the file back into xen-9p-backend.c ? > > > > Thanks for the quick review! Here you go: > > > > > > diff --git a/hw/9pfs/xen-9p-backend.c b/hw/9pfs/xen-9p-backend.c > > index 7e962aa..9c7f41a 100644 > > --- a/hw/9pfs/xen-9p-backend.c > > +++ b/hw/9pfs/xen-9p-backend.c > > @@ -13,12 +13,9 @@ > > #include "hw/hw.h" > > #include "hw/9pfs/9p.h" > > #include "hw/xen/xen_backend.h" > > -#include "hw/xen/io/ring.h" > > +#include "hw/9pfs/xen-9pfs.h" > > #include "qemu/config-file.h" > > #include "fsdev/qemu-fsdev.h" > > -#include <xen/io/protocols.h> > > - > > -DEFINE_XEN_FLEX_RING_AND_INTF(xen_9pfs); > > > > #define VERSIONS "1" > > #define MAX_RINGS 8 > > diff --git a/hw/9pfs/xen-9pfs.h b/hw/9pfs/xen-9pfs.h > > new file mode 100644 > > index 0000000..6e33d77 > > --- /dev/null > > +++ b/hw/9pfs/xen-9pfs.h > > @@ -0,0 +1,21 @@ > > +/* > > + * Xen 9p backend > > + * > > + * Copyright Aporeto 2017 > > + * > > + * Authors: > > + * Stefano Stabellini <stefano@aporeto.com> > > + * > > + * This work is licensed under the terms of the GNU GPL version 2. > > Any particular reason for "version 2" instead of "version 2 or later"? Habit: both Linux and Xen are v2 only. I didn't realize that QEMU is "or later". Also, personally I don't like the "or later" clause for a number of reasons that is best not to discuss in this thread :-) But I'll go with whatever is easier for the project. I'll add "or later" and merge this change into patch #12. > > + * See the COPYING file in the top-level directory. > > + * > > + */ > > + > > +#include <xen/io/protocols.h> > > +#include "hw/xen/io/ring.h" > > + > > +/* > > + * Do not merge into xen-9p-backend.c: clang doesn't allow unused static > > + * inline functions in c files. > > + */ > > +DEFINE_XEN_FLEX_RING_AND_INTF(xen_9pfs); >
Stefano Stabellini <sstabellini@kernel.org> writes: > On Tue, 25 Apr 2017, Markus Armbruster wrote: >> Stefano Stabellini <sstabellini@kernel.org> writes: [...] >> > diff --git a/hw/9pfs/xen-9pfs.h b/hw/9pfs/xen-9pfs.h >> > new file mode 100644 >> > index 0000000..6e33d77 >> > --- /dev/null >> > +++ b/hw/9pfs/xen-9pfs.h >> > @@ -0,0 +1,21 @@ >> > +/* >> > + * Xen 9p backend >> > + * >> > + * Copyright Aporeto 2017 >> > + * >> > + * Authors: >> > + * Stefano Stabellini <stefano@aporeto.com> >> > + * >> > + * This work is licensed under the terms of the GNU GPL version 2. >> >> Any particular reason for "version 2" instead of "version 2 or later"? > > Habit: both Linux and Xen are v2 only. I didn't realize that QEMU is "or > later". Also, personally I don't like the "or later" clause for a number > of reasons that is best not to discuss in this thread :-) > > But I'll go with whatever is easier for the project. I'll add "or later" > and merge this change into patch #12. Yes, please. Quoting LICENSE: The following points clarify the QEMU license: 1) QEMU as a whole is released under the GNU General Public License, version 2. 2) Parts of QEMU have specific licenses which are compatible with the GNU General Public License, version 2. Hence each source file contains its own licensing information. Source files with no licensing information are released under the GNU General Public License, version 2 or (at your option) any later version. --> As of July 2013, contributions under version 2 of the GNU General Public --> License (and no later version) are only accepted for the following files --> or directories: bsd-user/, linux-user/, hw/vfio/, hw/xen/xen_pt*. 3) The Tiny Code Generator (TCG) is released under the BSD license (see license headers in files). 4) QEMU is a trademark of Fabrice Bellard. Fabrice Bellard and the QEMU team
diff --git a/hw/9pfs/xen-9p-backend.c b/hw/9pfs/xen-9p-backend.c index 7e962aa..9c7f41a 100644 --- a/hw/9pfs/xen-9p-backend.c +++ b/hw/9pfs/xen-9p-backend.c @@ -13,12 +13,9 @@ #include "hw/hw.h" #include "hw/9pfs/9p.h" #include "hw/xen/xen_backend.h" -#include "hw/xen/io/ring.h" +#include "hw/9pfs/xen-9pfs.h" #include "qemu/config-file.h" #include "fsdev/qemu-fsdev.h" -#include <xen/io/protocols.h> - -DEFINE_XEN_FLEX_RING_AND_INTF(xen_9pfs); #define VERSIONS "1" #define MAX_RINGS 8 diff --git a/hw/9pfs/xen-9pfs.h b/hw/9pfs/xen-9pfs.h new file mode 100644 index 0000000..6e33d77 --- /dev/null +++ b/hw/9pfs/xen-9pfs.h @@ -0,0 +1,21 @@ +/* + * Xen 9p backend + * + * Copyright Aporeto 2017 + * + * Authors: + * Stefano Stabellini <stefano@aporeto.com> + * + * This work is licensed under the terms of the GNU GPL version 2. + * See the COPYING file in the top-level directory. + * + */ + +#include <xen/io/protocols.h> +#include "hw/xen/io/ring.h" + +/* + * Do not merge into xen-9p-backend.c: clang doesn't allow unused static + * inline functions in c files. + */ +DEFINE_XEN_FLEX_RING_AND_INTF(xen_9pfs);