From patchwork Fri Dec 27 00:33:12 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jingoo Han X-Patchwork-Id: 3407671 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 70E429F380 for ; Fri, 27 Dec 2013 00:33:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B06AE20149 for ; Fri, 27 Dec 2013 00:33:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 31AD62012B for ; Fri, 27 Dec 2013 00:33:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752368Ab3L0AdU (ORCPT ); Thu, 26 Dec 2013 19:33:20 -0500 Received: from mailout2.samsung.com ([203.254.224.25]:22841 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751256Ab3L0AdT (ORCPT ); Thu, 26 Dec 2013 19:33:19 -0500 Received: from epcpsbgr5.samsung.com (u145.gpu120.samsung.co.kr [203.254.230.145]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MYF007S1W7DT470@mailout2.samsung.com> for linux-pci@vger.kernel.org; Fri, 27 Dec 2013 09:33:13 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [203.254.230.50]) by epcpsbgr5.samsung.com (EPCPMTA) with SMTP id 67.25.14803.8CACCB25; Fri, 27 Dec 2013 09:33:12 +0900 (KST) X-AuditID: cbfee691-b7efc6d0000039d3-ca-52bccac82b8a Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 02.06.29263.8CACCB25; Fri, 27 Dec 2013 09:33:12 +0900 (KST) Received: from DOJG1HAN03 ([12.23.120.99]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MYF00J66W7CUA70@mmp1.samsung.com>; Fri, 27 Dec 2013 09:33:12 +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:33:12 +0900 Message-id: <000501cf029b$39aa4400$acfecc00$%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: Ac8CmzSl10tLrc++Szu/mPPm8D3LPA== Content-language: ko x-cr-hashedpuzzle: BlZf CCyf GIRa OTcz QKsa T6UC VdKs Z5eO b594 da64 d9vx gsB2 hGBH iOuY pPVU 0xF1; 5; YgBoAGUAbABnAGEAYQBzAEAAZwBvAG8AZwBsAGUALgBjAG8AbQA7AGoAYQBzAG8AbgBAAGwAYQBrAGUAZABhAGUAbQBvAG4ALgBuAGUAdAA7AGoAZwAxAC4AaABhAG4AQABzAGEAbQBzAHUAbgBnAC4AYwBvAG0AOwBsAGkAbgB1AHgALQBwAGMAaQBAAHYAZwBlAHIALgBrAGUAcgBuAGUAbAAuAG8AcgBnADsAdABoAG8AbQBhAHMALgBwAGUAdABhAHoAegBvAG4AaQBAAGYAcgBlAGUALQBlAGwAZQBjAHQAcgBvAG4AcwAuAGMAbwBtAA==; Sosha1_v1; 7; {01AF7230-1119-4110-9DCA-F4DAA6E0933E}; agBnADEALgBoAGEAbgBAAHMAYQBtAHMAdQBuAGcALgBjAG8AbQA=; Fri, 27 Dec 2013 00:33:04 GMT; UABBAFQAQ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A+NgFtrCKsWRmVeSWpSXmKPExsVy+t9jAd0Tp/YEGaxtsLRY0pRh0bjkMovF 5YWXWC3OzjvOZvH0QROTA6vHk00XGT0WbCr1aDhwnsWjb8sqRo/Pm+QCWKMaGG0yUhNTUosU UvOS81My89JtlbyD453jTc0MDHUNLS3MlRTyEnNTbZVcfAJ03TJzgHYrKZQl5pQChQISi4uV 9O0wTQgNcdO1gGmM0PUNCYLrMTJAAwnrGDNmHlrMXrCbo2Lr8lb2BsZe9i5GTg4JAROJL6sa WSFsMYkL99azdTFycQgJLGKUeNnXywrh/GKUmHygmw2kik1ATeLLl8Ng3SICmhKzV2xhArGZ BZYxSix66QpiCwt4SByesYsZxGYRUJXY3vgHrIZXwFZiz5tPjBC2oMSPyfdYIHq1JDZva2KF sOUlNq95C9TLAXSRusSjv7oQq/QkJl/+zgxRIiKx78U7RpDbJASesEr0f78N9Y2pxLTjr1gn MArNQrJiFpIVs5CsmIVk1gJGllWMoqkFyQXFSem5hnrFibnFpXnpesn5uZsYwWngmdQOxpUN FocYBTgYlXh4HTbsCRJiTSwrrsw9xCjBwawkwnvtGFCINyWxsiq1KD++qDQntfgQYzIwBCYy S4km5wNTVF5JvKGxiZmRpZGZhZGJuTlpwkrivAdarQOFBNITS1KzU1MLUotgtjBxcEo1MAYU X9y3/M8Ct+lxPMoXT/8Le7Zo4YFfQpscF6QtDD9810NBvaettpPp3eJlNs0c+bKbGY6wS3zU mBbPLeDl63YuMENGgiU/6d20T2W/T+58Nc/Vc9fq5IQMjeU3tjmlF7bk/lK0W31IqFLm8MGp 1u+Xb/cyahJWiZxy/el8B+aH8R/FZcT9a5RYijMSDbWYi4oTARMCkYJHAwAA 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 --- 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; }