PCI: j721e: Drop pointless of_device_get_match_data() cast
authorBjorn Helgaas <bhelgaas@google.com>
Thu, 23 Dec 2021 01:10:39 +0000 (19:10 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 3 Jan 2022 21:01:33 +0000 (15:01 -0600)
of_device_get_match_data() returns "void *", so no cast is needed when
assigning the result to a pointer type.  Drop the unnecessary cast.

Link: https://lore.kernel.org/r/20211223011054.1227810-9-helgaas@kernel.org
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: Kishon Vijay Abraham I <kishon@ti.com>
Cc: Tom Joseph <tjoseph@cadence.com>
drivers/pci/controller/cadence/pci-j721e.c

index 918e11082e6a747aa75330d6bea4817765c7b030..cd43d18984826c47896e1bd66577fc2dec84c5c3 100644 (file)
@@ -354,7 +354,7 @@ static int j721e_pcie_probe(struct platform_device *pdev)
        struct device *dev = &pdev->dev;
        struct device_node *node = dev->of_node;
        struct pci_host_bridge *bridge;
-       struct j721e_pcie_data *data;
+       const struct j721e_pcie_data *data;
        struct cdns_pcie *cdns_pcie;
        struct j721e_pcie *pcie;
        struct cdns_pcie_rc *rc;
@@ -367,7 +367,7 @@ static int j721e_pcie_probe(struct platform_device *pdev)
        int ret;
        int irq;
 
-       data = (struct j721e_pcie_data *)of_device_get_match_data(dev);
+       data = of_device_get_match_data(dev);
        if (!data)
                return -EINVAL;