mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] PCI: layerscape: rename variable
@ 2020-01-14  8:50 Sascha Hauer
  2020-01-14  8:50 ` [PATCH 2/2] PCI: layerscape: Fixup iommu-map properties Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Sascha Hauer @ 2020-01-14  8:50 UTC (permalink / raw)
  To: Barebox List

Rename 'arr' to 'msi_map' which is a better name when we add another
array in the next patch.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 drivers/pci/pci-layerscape.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/pci/pci-layerscape.c b/drivers/pci/pci-layerscape.c
index ccdc025c2e..0e41321a9a 100644
--- a/drivers/pci/pci-layerscape.c
+++ b/drivers/pci/pci-layerscape.c
@@ -342,7 +342,7 @@ static int ls_pcie_of_fixup(struct device_node *root, void *ctx)
 	struct device_d *dev = pcie->pci.dev;
 	struct device_node *np;
 	char *name;
-	u32 *arr, phandle;
+	u32 *msi_map, phandle;
 	int nluts;
 	int ret, i;
 	u32 devid, stream_id;
@@ -364,7 +364,7 @@ static int ls_pcie_of_fixup(struct device_node *root, void *ctx)
 		return ret;
 	}
 
-	arr = xmalloc(nluts * sizeof(u32) * 4);
+	msi_map = xmalloc(nluts * sizeof(u32) * 4);
 
 	for (i = 0; i < nluts; i++) {
 		u32 udr = lut_readl(pcie, PCIE_LUT_UDR(i));
@@ -376,10 +376,10 @@ static int ls_pcie_of_fixup(struct device_node *root, void *ctx)
 		devid = udr >> 16;
 		stream_id = ldr & 0x7fff;
 
-		arr[i * 4] = devid;
-		arr[i * 4 + 1] = phandle;
-		arr[i * 4 + 2] = stream_id;
-		arr[i * 4 + 3] = 1;
+		msi_map[i * 4] = devid;
+		msi_map[i * 4 + 1] = phandle;
+		msi_map[i * 4 + 2] = stream_id;
+		msi_map[i * 4 + 3] = 1;
 	}
 
 	/*
@@ -391,7 +391,7 @@ static int ls_pcie_of_fixup(struct device_node *root, void *ctx)
 	 *                 [devid] [phandle-to-msi-ctrl] [stream-id] [count]>;
 	 */
 
-	ret = of_property_write_u32_array(np, "msi-map", arr, nluts * 4);
+	ret = of_property_write_u32_array(np, "msi-map", msi_map, nluts * 4);
 	if (ret)
 		goto out;
 
@@ -400,7 +400,7 @@ static int ls_pcie_of_fixup(struct device_node *root, void *ctx)
 	ret = 0;
 
 out:
-	free(arr);
+	free(msi_map);
 	return ret;
 }
 
-- 
2.25.0.rc1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-01-14  8:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-14  8:50 [PATCH 1/2] PCI: layerscape: rename variable Sascha Hauer
2020-01-14  8:50 ` [PATCH 2/2] PCI: layerscape: Fixup iommu-map properties Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox