Skip to content

Commit

Permalink
PCI: mvebu: Use max_t() instead of max(resource_size_t,)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jingoo Han authored and Bjorn Helgaas committed Jan 2, 2014
1 parent 31e45ec commit 0648900
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/pci/host/pci-mvebu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 0648900

Please sign in to comment.