From: Zhou Wang <wangzhou1@hisilicon.com>
To: Dongdong Liu <liudongdong3@huawei.com>, <linux-pci@vger.kernel.org>
Cc: <bhelgaas@google.com>, <gabriele.paoloni@huawei.com>,
<qiujiang@huawei.com>, <zhangjukuo@huawei.com>,
<haifeng.wei@huawei.com>, <yisen.zhuang@huawei.com>
Subject: Re: [PATCH] PCI: hisi: fix the hisi_pcie_cfg_read bug when size=4
Date: Mon, 30 Nov 2015 13:25:17 +0800 [thread overview]
Message-ID: <565BDDBD.1040500@hisilicon.com> (raw)
In-Reply-To: <1448600280-83695-1-git-send-email-liudongdong3@huawei.com>
On 2015/11/27 12:58, Dongdong Liu wrote:
> Current hisi_pcie_cfg_read code read the RC configuration space,
> this has a problem that the output parameter "*val" have not been
> assigned when size=4, so we fix the bug by "*val = reg_val" when size=4.
>
> Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
Hi Dongdong,
Sorry for late. You are right, I made a mistake here. So
Reviewed-by: Zhou Wang <wangzhou1@hisilicon.com>
Many thanks,
Zhou
> ---
> drivers/pci/host/pcie-hisi.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/pci/host/pcie-hisi.c b/drivers/pci/host/pcie-hisi.c
> index 35457ec..da677b1 100644
> --- a/drivers/pci/host/pcie-hisi.c
> +++ b/drivers/pci/host/pcie-hisi.c
> @@ -61,7 +61,9 @@ static int hisi_pcie_cfg_read(struct pcie_port *pp, int where, int size,
> *val = *(u8 __force *) walker;
> else if (size == 2)
> *val = *(u16 __force *) walker;
> - else if (size != 4)
> + else if (size == 4)
> + *val = reg_val;
> + else
> return PCIBIOS_BAD_REGISTER_NUMBER;
>
> return PCIBIOS_SUCCESSFUL;
>
next prev parent reply other threads:[~2015-11-30 5:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-27 4:58 [PATCH] PCI: hisi: fix the hisi_pcie_cfg_read bug when size=4 Dongdong Liu
2015-11-30 5:25 ` Zhou Wang [this message]
2015-12-04 22:43 ` Bjorn Helgaas
2015-12-09 16:16 ` Bjorn Helgaas
2015-12-09 20:36 ` Zhou Wang
2015-12-17 10:52 ` Zhou Wang
2015-12-17 18:43 ` Bjorn Helgaas
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=565BDDBD.1040500@hisilicon.com \
--to=wangzhou1@hisilicon.com \
--cc=bhelgaas@google.com \
--cc=gabriele.paoloni@huawei.com \
--cc=haifeng.wei@huawei.com \
--cc=linux-pci@vger.kernel.org \
--cc=liudongdong3@huawei.com \
--cc=qiujiang@huawei.com \
--cc=yisen.zhuang@huawei.com \
--cc=zhangjukuo@huawei.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.