diff mbox

PCI: mvebu: Use max_t() instead of max(resource_size_t,)

Message ID 000601cf029b$6bb27e40$43177ac0$%han@samsung.com
State Accepted
Headers show

Commit Message

Jingoo Han Dec. 27, 2013, 12:34 a.m. UTC
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>
---
 drivers/pci/host/pci-mvebu.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Jason Cooper Dec. 27, 2013, 5:34 p.m. UTC | #1
On Fri, Dec 27, 2013 at 09:34:36AM +0900, Jingoo Han wrote:
> 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>
> ---
>  drivers/pci/host/pci-mvebu.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Acked-by: Jason Cooper <jason@lakedaemon.net>

thx,

Jason.
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Bjorn Helgaas Jan. 2, 2014, 9:44 p.m. UTC | #2
On Fri, Dec 27, 2013 at 09:34:36AM +0900, Jingoo Han wrote:
> 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>

Applied with Jason's ack to pci/host-mvebu for v3.14, thanks!

Bjorn

> ---
>  drivers/pci/host/pci-mvebu.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/pci/host/pci-mvebu.c b/drivers/pci/host/pci-mvebu.c
> index bedc0b1..fa140e1 100644
> --- a/drivers/pci/host/pci-mvebu.c
> +++ b/drivers/pci/host/pci-mvebu.c
> @@ -735,9 +735,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;
>  }
> -- 
> 1.7.10.4
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/pci/host/pci-mvebu.c b/drivers/pci/host/pci-mvebu.c
index bedc0b1..fa140e1 100644
--- a/drivers/pci/host/pci-mvebu.c
+++ b/drivers/pci/host/pci-mvebu.c
@@ -735,9 +735,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;
 }