PCI: mvebu: Use max_t() instead of max(resource_size_t,)
authorJingoo Han <jg1.han@samsung.com>
Fri, 27 Dec 2013 00:34:36 +0000 (09:34 +0900)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 2 Jan 2014 21:43:48 +0000 (14:43 -0700)
Use max_t() instead of max(resource_size_t,) in order to fix
the following checkpatch warning.

  WARNING: max() should probably be max_t(resource_size_t, SZ_64K, size)
  WARNING: max() should probably be max_t(resource_size_t, SZ_1M, size)

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Jason Cooper <jason@lakedaemon.net>
drivers/pci/host/pci-mvebu.c

index 18057905689ab81116f1030709880f976ea82c56..7889feb632edab5ccccb3a385a85b83f66486ec4 100644 (file)
@@ -728,9 +728,9 @@ static resource_size_t mvebu_pcie_align_resource(struct pci_dev *dev,
         * aligned on their size
         */
        if (res->flags & IORESOURCE_IO)
-               return round_up(start, max((resource_size_t)SZ_64K, size));
+               return round_up(start, max_t(resource_size_t, SZ_64K, size));
        else if (res->flags & IORESOURCE_MEM)
-               return round_up(start, max((resource_size_t)SZ_1M, size));
+               return round_up(start, max_t(resource_size_t, SZ_1M, size));
        else
                return start;
 }