All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
To: Simon Horman <horms@verge.net.au>
Cc: <bhelgaas@google.com>, <valentine.barshak@cogentembedded.com>,
	<linux-pci@vger.kernel.org>
Subject: Re: [PATCH] PCI: rcar: Add address check of mem_res
Date: Mon, 16 Feb 2015 10:53:40 +0900	[thread overview]
Message-ID: <54E14DA4.8090708@renesas.com> (raw)
In-Reply-To: <20150213164424.GA22407@verge.net.au>

Hi,

Thnaks for your review.

(2015/02/14 1:44), Simon Horman wrote:
> Hi Iwamatsu-san,
>
> On Fri, Feb 13, 2015 at 04:55:38PM +0900, Nobuhiro Iwamatsu wrote:
>> lower 16 bits of the address, which is managed by mem_res need to be 0.
>> This adds address check of lower 16 bits.
>>
>> Signed-off-by: Nobuhiro Iwamatsu<nobuhiro.iwamatsu.yj@renesas.com>
>> ---
>>   drivers/pci/host/pci-rcar-gen2.c | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/pci/host/pci-rcar-gen2.c b/drivers/pci/host/pci-rcar-gen2.c
>> index d9c042f..13b2793 100644
>> --- a/drivers/pci/host/pci-rcar-gen2.c
>> +++ b/drivers/pci/host/pci-rcar-gen2.c
>> @@ -351,6 +351,9 @@ static int rcar_pci_probe(struct platform_device *pdev)
>>   	if (!priv)
>>   		return -ENOMEM;
>>
>> +	if (mem_res->start&  0xFFFF)
>> +		return -EINVAL;
>> +
>
> This check seems correct to me. But would it make sense to place it before
> the call to devm_kzalloc() rather than after it? I think that should group
> it would an existing checking of mem_res.
>

Yes, I will resend patch.

>>   	priv->mem_res = *mem_res;
>>   	/*
>>   	 * The controller does not support/use port I/O,
>> --
>> 2.1.3
>>

Best regards,
   Nobuhiro

      reply	other threads:[~2015-02-16  1:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-13  7:55 [PATCH] PCI: rcar: Add address check of mem_res Nobuhiro Iwamatsu
2015-02-13 16:44 ` Simon Horman
2015-02-16  1:53   ` Nobuhiro Iwamatsu [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=54E14DA4.8090708@renesas.com \
    --to=nobuhiro.iwamatsu.yj@renesas.com \
    --cc=bhelgaas@google.com \
    --cc=horms@verge.net.au \
    --cc=linux-pci@vger.kernel.org \
    --cc=valentine.barshak@cogentembedded.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.