diff for duplicates of <20140922093228.GA20256@rric.localhost> diff --git a/a/1.txt b/N1/1.txt index f8c4aae..71f38e7 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -22,48 +22,3 @@ This series was tested with the fix on top for Cavium Thunder. Tested-by: Robert Richter <rrichter@cavium.com> -Robert - - - -From e798af4fc2f664d1aff7e863489b8298f90e716e Mon Sep 17 00:00:00 2001 -From: Robert Richter <rrichter@cavium.com> -Date: Mon, 22 Sep 2014 10:46:01 +0200 -Subject: [PATCH] OF: PCI: Fix creation of mem-mapped pci host bridges - -The pci host bridge was not created if io_base was not set when -calling of_pci_get_host_bridge_resources(). This is esp. the case for -mem-mapped io (IORESOURCE_MEM). This patch fixes this. Function -parameter io_base is optional now. - -Signed-off-by: Robert Richter <rrichter@cavium.com> ---- - drivers/of/of_pci.c | 7 +++---- - 1 file changed, 3 insertions(+), 4 deletions(-) - -diff --git a/drivers/of/of_pci.c b/drivers/of/of_pci.c -index ffdb45ed8682..1f0e7c2505ee 100644 ---- a/drivers/of/of_pci.c -+++ b/drivers/of/of_pci.c -@@ -182,9 +182,8 @@ int of_pci_get_host_bridge_resources(struct device_node *dev, - char range_type[4]; - int err; - -- if (!io_base) -- return -EINVAL; -- *io_base = OF_BAD_ADDR; -+ if (io_base) -+ *io_base = OF_BAD_ADDR; - - bus_range = kzalloc(sizeof(*bus_range), GFP_KERNEL); - if (!bus_range) -@@ -242,7 +241,7 @@ int of_pci_get_host_bridge_resources(struct device_node *dev, - goto parse_failed; - } - -- if (resource_type(res) == IORESOURCE_IO) { -+ if (io_base && resource_type(res) == IORESOURCE_IO) { - if (*io_base != OF_BAD_ADDR) - pr_warn("More than one I/O resource converted. CPU offset for old range lost!\n"); - *io_base = range.cpu_addr; --- -2.1.0 diff --git a/a/content_digest b/N1/content_digest index 6fe4d2b..bec3419 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -51,51 +51,6 @@ "\n" "Tested-by: Robert Richter <rrichter@cavium.com>\n" "\n" - "-Robert\n" - "\n" - "\n" - "\n" - "From e798af4fc2f664d1aff7e863489b8298f90e716e Mon Sep 17 00:00:00 2001\n" - "From: Robert Richter <rrichter@cavium.com>\n" - "Date: Mon, 22 Sep 2014 10:46:01 +0200\n" - "Subject: [PATCH] OF: PCI: Fix creation of mem-mapped pci host bridges\n" - "\n" - "The pci host bridge was not created if io_base was not set when\n" - "calling of_pci_get_host_bridge_resources(). This is esp. the case for\n" - "mem-mapped io (IORESOURCE_MEM). This patch fixes this. Function\n" - "parameter io_base is optional now.\n" - "\n" - "Signed-off-by: Robert Richter <rrichter@cavium.com>\n" - "---\n" - " drivers/of/of_pci.c | 7 +++----\n" - " 1 file changed, 3 insertions(+), 4 deletions(-)\n" - "\n" - "diff --git a/drivers/of/of_pci.c b/drivers/of/of_pci.c\n" - "index ffdb45ed8682..1f0e7c2505ee 100644\n" - "--- a/drivers/of/of_pci.c\n" - "+++ b/drivers/of/of_pci.c\n" - "@@ -182,9 +182,8 @@ int of_pci_get_host_bridge_resources(struct device_node *dev,\n" - " \tchar range_type[4];\n" - " \tint err;\n" - " \n" - "-\tif (!io_base)\n" - "-\t\treturn -EINVAL;\n" - "-\t*io_base = OF_BAD_ADDR;\n" - "+\tif (io_base)\n" - "+\t\t*io_base = OF_BAD_ADDR;\n" - " \n" - " \tbus_range = kzalloc(sizeof(*bus_range), GFP_KERNEL);\n" - " \tif (!bus_range)\n" - "@@ -242,7 +241,7 @@ int of_pci_get_host_bridge_resources(struct device_node *dev,\n" - " \t\t\tgoto parse_failed;\n" - " \t\t}\n" - " \n" - "-\t\tif (resource_type(res) == IORESOURCE_IO) {\n" - "+\t\tif (io_base && resource_type(res) == IORESOURCE_IO) {\n" - " \t\t\tif (*io_base != OF_BAD_ADDR)\n" - " \t\t\t\tpr_warn(\"More than one I/O resource converted. CPU offset for old range lost!\\n\");\n" - " \t\t\t*io_base = range.cpu_addr;\n" - "-- \n" - 2.1.0 + -Robert -67c4d6cc00fb304a3a3f7de2c1e947672b036fdeb97c39e86d9fc64bd2cde077 +cd80e50ae4bff7d1856c59d37c5f193836145e00335e328f9e4a4144a3e67a96
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox