From: Bjorn Helgaas <bhelgaas@google.com>
To: Jingoo Han <jg1.han@samsung.com>
Cc: linux-pci@vger.kernel.org,
'Thomas Petazzoni' <thomas.petazzoni@free-electrons.com>,
'Jason Cooper' <jason@lakedaemon.net>
Subject: Re: [PATCH] PCI: mvebu: Use max_t() instead of max(resource_size_t,)
Date: Thu, 2 Jan 2014 14:44:54 -0700 [thread overview]
Message-ID: <20140102214454.GA7228@google.com> (raw)
In-Reply-To: <000601cf029b$6bb27e40$43177ac0$%han@samsung.com>
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
>
>
prev parent reply other threads:[~2014-01-02 21:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-27 0:34 [PATCH] PCI: mvebu: Use max_t() instead of max(resource_size_t,) Jingoo Han
2013-12-27 17:34 ` Jason Cooper
2014-01-02 21:44 ` Bjorn Helgaas [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140102214454.GA7228@google.com \
--to=bhelgaas@google.com \
--cc=jason@lakedaemon.net \
--cc=jg1.han@samsung.com \
--cc=linux-pci@vger.kernel.org \
--cc=thomas.petazzoni@free-electrons.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).