[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [Qemu-ppc] [PATCH v1] spapr_pci: fix the path while fet
From: |
Greg Kurz |
Subject: |
Re: [Qemu-devel] [Qemu-ppc] [PATCH v1] spapr_pci: fix the path while fetching loc-code from host DT |
Date: |
Wed, 8 Nov 2017 12:29:24 +0100 |
On Tue, 7 Nov 2017 18:48:58 +0530
Seeteena Thoufeek <address@hidden> wrote:
> The function spapr_phb_vfio_get_loc_code uses wrong path for
> fetching loc-code from host DT
>
Why is it wrong ? Are you experiencing actual issues ?
> this is the call that needs to be fixed:
> /* Construct and read from host device tree the loc-code */
> path = g_strdup_printf("/proc/device-tree%s/ibm,loc-code", buf);
>
This statement is useless, especially with such a trivial patch.
Have a look at the following page:
https://robots.thoughtbot.com/5-useful-tips-for-a-better-commit-message
Cheers,
--
Greg
> Signed-off-by: Seeteena Thoufeek <address@hidden>
> ---
> hw/ppc/spapr_pci.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
> index 5a3122a..ae86322 100644
> --- a/hw/ppc/spapr_pci.c
> +++ b/hw/ppc/spapr_pci.c
> @@ -762,7 +762,7 @@ static char *spapr_phb_vfio_get_loc_code(sPAPRPHBState
> *sphb, PCIDevice *pdev)
> g_free(path);
>
> /* Construct and read from host device tree the loc-code */
> - path = g_strdup_printf("/proc/device-tree%s/ibm,loc-code", buf);
> + path = g_strdup_printf("/proc/device-tree/%s/ibm,loc-code", buf);
> g_free(buf);
> if (!g_file_get_contents(path, &buf, NULL, NULL)) {
> goto err_out;