linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shawn Lin <shawn.lin@rock-chips.com>
To: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	Colin King <colin.king@canonical.com>
Cc: shawn.lin@rock-chips.com, Bjorn Helgaas <bhelgaas@google.com>,
	Heiko Stuebner <heiko@sntech.de>,
	linux-pci@vger.kernel.org, linux-rockchip@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,
	kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] PCI: rockchip: fix bitwise operations on status and ROCKCHIP_PCIE_EP_CMD_STATUS_IS
Date: Mon, 15 Apr 2019 09:46:54 +0800	[thread overview]
Message-ID: <1df4816e-8d16-e894-e99e-ee16cd1c4cb8@rock-chips.com> (raw)
In-Reply-To: <20190412095125.GB8113@red-moon>


On 2019/4/12 17:51, Lorenzo Pieralisi wrote:
> On Sat, Mar 30, 2019 at 03:09:10PM +0000, Colin King wrote:
>> From: Colin Ian King <colin.king@canonical.com>
>>
>> Currently the bitwise operations on the u16 variable 'status' with
>> the setting ROCKCHIP_PCIE_EP_CMD_STATUS_IS are incorrect because
>> ROCKCHIP_PCIE_EP_CMD_STATUS_IS is 1UL<<19 which is wider than the
>> u16 variable.  Fix this by making status a u32.  (Not tested).
>>
>> Fixes: cf590b078391 ("PCI: rockchip: Add EP driver for Rockchip PCIe controller")
>> Signed-off-by: Colin Ian King <colin.king@canonical.com>
>> ---
>>   drivers/pci/controller/pcie-rockchip-ep.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Shawn,
> 
> I need your ACK on this patch, thanks.

Acked-by: Shawn Lin <shawn.lin@rock-chips.com>

> 
> Lorenzo
> 
>> diff --git a/drivers/pci/controller/pcie-rockchip-ep.c b/drivers/pci/controller/pcie-rockchip-ep.c
>> index a5d799e2dff2..d743b0a48988 100644
>> --- a/drivers/pci/controller/pcie-rockchip-ep.c
>> +++ b/drivers/pci/controller/pcie-rockchip-ep.c
>> @@ -350,7 +350,7 @@ static void rockchip_pcie_ep_assert_intx(struct rockchip_pcie_ep *ep, u8 fn,
>>   	struct rockchip_pcie *rockchip = &ep->rockchip;
>>   	u32 r = ep->max_regions - 1;
>>   	u32 offset;
>> -	u16 status;
>> +	u32 status;
>>   	u8 msg_code;
>>   
>>   	if (unlikely(ep->irq_pci_addr != ROCKCHIP_PCIE_EP_PCI_LEGACY_IRQ_ADDR ||
>> -- 
>> 2.20.1
>>
> 
> 
> 



  reply	other threads:[~2019-04-15  1:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-30 15:09 [PATCH] PCI: rockchip: fix bitwise operations on status and ROCKCHIP_PCIE_EP_CMD_STATUS_IS Colin King
2019-03-30 16:38 ` Mukesh Ojha
2019-04-12  9:51 ` Lorenzo Pieralisi
2019-04-15  1:46   ` Shawn Lin [this message]
2019-04-15 10:03 ` Lorenzo Pieralisi

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=1df4816e-8d16-e894-e99e-ee16cd1c4cb8@rock-chips.com \
    --to=shawn.lin@rock-chips.com \
    --cc=bhelgaas@google.com \
    --cc=colin.king@canonical.com \
    --cc=heiko@sntech.de \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=lorenzo.pieralisi@arm.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).