From patchwork Fri Dec 27 00:34:36 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jingoo Han X-Patchwork-Id: 3407681 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id CDE0AC02DC for ; Fri, 27 Dec 2013 00:34:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1A4C020144 for ; Fri, 27 Dec 2013 00:34:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 35B0B2012B for ; Fri, 27 Dec 2013 00:34:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752391Ab3L0Aei (ORCPT ); Thu, 26 Dec 2013 19:34:38 -0500 Received: from mailout3.samsung.com ([203.254.224.33]:46842 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751877Ab3L0Aei (ORCPT ); Thu, 26 Dec 2013 19:34:38 -0500 Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MYF00BZPW9ORL50@mailout3.samsung.com> for linux-pci@vger.kernel.org; Fri, 27 Dec 2013 09:34:37 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [203.254.230.50]) by epcpsbgr1.samsung.com (EPCPMTA) with SMTP id E4.14.12635.C1BCCB25; Fri, 27 Dec 2013 09:34:36 +0900 (KST) X-AuditID: cbfee68d-b7fcd6d00000315b-00-52bccb1cb157 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id B6.26.29263.C1BCCB25; Fri, 27 Dec 2013 09:34:36 +0900 (KST) Received: from DOJG1HAN03 ([12.23.120.99]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MYF00C4DW9OTM70@mmp2.samsung.com>; Fri, 27 Dec 2013 09:34:36 +0900 (KST) From: Jingoo Han To: 'Bjorn Helgaas' Cc: linux-pci@vger.kernel.org, 'Thomas Petazzoni' , 'Jason Cooper' , 'Jingoo Han' Subject: [PATCH] PCI: mvebu: Use max_t() instead of max(resource_size_t,) Date: Fri, 27 Dec 2013 09:34:36 +0900 Message-id: <000601cf029b$6bb27e40$43177ac0$%han@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-index: Ac8Cm2uYOB6YPiQxQg+XfI5cymjLnA== Content-language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrNIsWRmVeSWpSXmKPExsVy+t8zI12Z03uCDO7tsbBY0pRh0bjkMovF 5YWXWC3OzjvOZvH0QROTA6vHk00XGT0WbCr1aDhwnsWjb8sqRo/Pm+QCWKO4bFJSczLLUov0 7RK4MmYeWsxesJujYuvyVvYGxl72LkZODgkBE4n+L3PZIGwxiQv31oPZQgLLGCX2f1eDqdl4 bCtTFyMXUHw6o8TJGVsZIYp+MUrsvqoHYrMJqEl8+XIYbKiIgKbE7BVbmEBsZpBBi166gtjC Ap4S/04vAarh4GARUJVoXa8FEuYVsJVYd/0kC4QtKPFj8j0WiFYtic3bmlghbHmJzWveMoO0 SgioSzz6qwuxSU+i7dJpNogSEYl9L94xgpwpIbCPXeLTjRVgZ7IICEh8m3yIBaJXVmLTAWaI tyQlDq64wTKBUWwWks2zkGyehWTzLCQrFjCyrGIUTS1ILihOSi8y1CtOzC0uzUvXS87P3cQI ibjeHYy3D1gfYkw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Viq64dO1h+5NeDw7tn3THpLe9X1bWXd4gT kTrwZLbf3YSJYg/194jtmD99M/9t5bJ7fQ+OFxlqnP1mfCvketwfZi/GqN9e+mc8S3axiuqm LJtZUcgxT4mlOCPRUIu5qDgRAHaZulYsAwAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: Jason Cooper --- 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; }