qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: "Laurent Vivier" <lvivier@redhat.com>,
	"Shivaprasad G Bhat" <sbhat@linux.ibm.com>,
	"Alexey Kardashevskiy" <aik@ozlabs.ru>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	"Greg Kurz" <groug@kaod.org>, qemu-ppc <qemu-ppc@nongnu.org>,
	"Cédric Le Goater" <clg@kaod.org>,
	"Igor Mammedov" <imammedo@redhat.com>
Subject: Re: [PULL 05/20] mem: move nvdimm_device_list to utilities
Date: Fri, 3 Apr 2020 13:34:01 +0100	[thread overview]
Message-ID: <CAFEAcA_oqU7_NKTnZ+wNa-DAfMhmpgFrPmWx4gdZaiJJiXj23w@mail.gmail.com> (raw)
In-Reply-To: <20200221033650.444386-6-david@gibson.dropbear.id.au>

On Fri, 21 Feb 2020 at 03:37, David Gibson <david@gibson.dropbear.id.au> wrote:
>
> From: Shivaprasad G Bhat <sbhat@linux.ibm.com>
>
> nvdimm_device_list is required for parsing the list for devices
> in subsequent patches. Move it to common utility area.
>
> Signed-off-by: Shivaprasad G Bhat <sbhat@linux.ibm.com>
> Reviewed-by: Igor Mammedov <imammedo@redhat.com>
> Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
> Message-Id: <158131055857.2897.15658377276504711773.stgit@lep8c.aus.stglabs.ibm.com>
> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
> ---
>  hw/acpi/nvdimm.c            | 28 +---------------------------
>  include/qemu/nvdimm-utils.h |  7 +++++++
>  util/Makefile.objs          |  1 +
>  util/nvdimm-utils.c         | 29 +++++++++++++++++++++++++++++
>  4 files changed, 38 insertions(+), 27 deletions(-)
>  create mode 100644 include/qemu/nvdimm-utils.h
>  create mode 100644 util/nvdimm-utils.c

Hi; I just found this commit as a result of running
a clean-includes pass on the tree...

> diff --git a/include/qemu/nvdimm-utils.h b/include/qemu/nvdimm-utils.h
> new file mode 100644
> index 0000000000..4b8b198ba7
> --- /dev/null
> +++ b/include/qemu/nvdimm-utils.h
> @@ -0,0 +1,7 @@
> +#ifndef NVDIMM_UTILS_H
> +#define NVDIMM_UTILS_H
> +
> +#include "qemu/osdep.h"

New files should have a comment block at the top giving
author/copyright/license info.

Header files should never include osdep.h.

> +
> +GSList *nvdimm_get_device_list(void);
> +#endif

> diff --git a/util/nvdimm-utils.c b/util/nvdimm-utils.c
> new file mode 100644
> index 0000000000..5cc768ca47
> --- /dev/null
> +++ b/util/nvdimm-utils.c
> @@ -0,0 +1,29 @@
> +#include "qemu/nvdimm-utils.h"
> +#include "hw/mem/nvdimm.h"

New .c files definitely need a license/copyright
comment block.

All .c files must include "qemu/osdep.h" as the
very first include.

Would somebody like to send a patch fixing this, please?

> +
> +static int nvdimm_device_list(Object *obj, void *opaque)
> +{
> +    GSList **list = opaque;
> +
> +    if (object_dynamic_cast(obj, TYPE_NVDIMM)) {
> +        *list = g_slist_append(*list, DEVICE(obj));
> +    }
> +
> +    object_child_foreach(obj, nvdimm_device_list, opaque);
> +    return 0;
> +}

thanks
-- PMM


  reply	other threads:[~2020-04-03 12:34 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-21  3:36 [PULL 00/20] ppc-for-5.0 queue 20200221 David Gibson
2020-02-21  3:36 ` [PULL 01/20] spapr/rtas: Print message from "ibm,os-term" David Gibson
2020-02-21  3:36 ` [PULL 02/20] qtest: Fix rtas dependencies David Gibson
2020-02-21  3:36 ` [PULL 03/20] ppc/pnv: Fix PCI_EXPRESS dependency David Gibson
2020-02-21  3:36 ` [PULL 04/20] ppc: function to setup latest class options David Gibson
2020-02-21  3:36 ` [PULL 05/20] mem: move nvdimm_device_list to utilities David Gibson
2020-04-03 12:34   ` Peter Maydell [this message]
2020-02-21  3:36 ` [PULL 06/20] nvdimm: add uuid property to nvdimm David Gibson
2020-02-21  3:36 ` [PULL 07/20] spapr: Add NVDIMM device support David Gibson
2020-02-25 10:00   ` Peter Maydell
2020-02-26 12:13     ` Shivaprasad G Bhat
2020-02-21  3:36 ` [PULL 08/20] spapr: Add Hcalls to support PAPR NVDIMM device David Gibson
2020-02-21  3:36 ` [PULL 09/20] target/ppc/cpu.h: Remove duplicate includes David Gibson
2020-02-21  3:36 ` [PULL 10/20] pnv/phb3: Convert 1u to 1ull David Gibson
2020-02-21  3:36 ` [PULL 11/20] pnv/phb4: Fix error path in pnv_pec_realize() David Gibson
2020-02-21  3:36 ` [PULL 12/20] pnv/phb3: Add missing break statement David Gibson
2020-02-21  3:36 ` [PULL 13/20] spapr: Allow changing offset for -kernel image David Gibson
2020-02-21  3:36 ` [PULL 14/20] target/ppc: Fix typo in comments David Gibson
2020-02-21  3:36 ` [PULL 15/20] target/ppc/cpu.h: Move fpu related members closer in cpu env David Gibson
2020-02-21  3:36 ` [PULL 16/20] target/ppc/cpu.h: Clean up comments in the struct CPUPPCState definition David Gibson
2020-02-21  3:36 ` [PULL 17/20] ppc: free 'fdt' after reset the machine David Gibson
2020-02-21  3:36 ` [PULL 18/20] spapr: Don't use spapr_drc_needed() in CAS code David Gibson
2020-02-21  3:36 ` [PULL 19/20] spapr: Fix handling of unplugged devices during CAS and migration David Gibson
2020-02-21  3:36 ` [PULL 20/20] hw/ppc/virtex_ml507:fix leak of fdevice tree blob David Gibson
2020-02-21 15:18 ` [PULL 00/20] ppc-for-5.0 queue 20200221 Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFEAcA_oqU7_NKTnZ+wNa-DAfMhmpgFrPmWx4gdZaiJJiXj23w@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=aik@ozlabs.ru \
    --cc=clg@kaod.org \
    --cc=david@gibson.dropbear.id.au \
    --cc=groug@kaod.org \
    --cc=imammedo@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=sbhat@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).