From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,USER_AGENT_MUTT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 18220C10F12 for ; Mon, 15 Apr 2019 10:03:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DB1D72073F for ; Mon, 15 Apr 2019 10:03:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726659AbfDOKDF (ORCPT ); Mon, 15 Apr 2019 06:03:05 -0400 Received: from foss.arm.com ([217.140.101.70]:59678 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725798AbfDOKDF (ORCPT ); Mon, 15 Apr 2019 06:03:05 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E486480D; Mon, 15 Apr 2019 03:03:04 -0700 (PDT) Received: from red-moon (red-moon.cambridge.arm.com [10.1.197.39]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4476A3F557; Mon, 15 Apr 2019 03:03:03 -0700 (PDT) Date: Mon, 15 Apr 2019 11:03:01 +0100 From: Lorenzo Pieralisi To: Colin King Cc: Bjorn Helgaas , Heiko Stuebner , 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, Shawn Lin Subject: Re: [PATCH] PCI: rockchip: fix bitwise operations on status and ROCKCHIP_PCIE_EP_CMD_STATUS_IS Message-ID: <20190415100301.GA12127@red-moon> References: <20190330150910.9389-1-colin.king@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190330150910.9389-1-colin.king@canonical.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Mar 30, 2019 at 03:09:10PM +0000, Colin King wrote: > From: Colin Ian King > > 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 > --- > drivers/pci/controller/pcie-rockchip-ep.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Applied to pci/rockchip for v5.2, thanks. 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 >