From patchwork Thu Jun 15 07:28:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 776164 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3wpFVz4k72z9s5L for ; Thu, 15 Jun 2017 17:29:15 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="YGPNrvrv"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752092AbdFOH3G (ORCPT ); Thu, 15 Jun 2017 03:29:06 -0400 Received: from fllnx209.ext.ti.com ([198.47.19.16]:46715 "EHLO fllnx209.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750861AbdFOH3E (ORCPT ); Thu, 15 Jun 2017 03:29:04 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by fllnx209.ext.ti.com (8.15.1/8.15.1) with ESMTP id v5F7SWDx007453; Thu, 15 Jun 2017 02:28:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1497511712; bh=sz8POUdIflFwjDCbJSD8IrWABuX4OyEGvzjxMN3+r58=; h=Subject:To:References:CC:From:Date:In-Reply-To; b=YGPNrvrv19PurP7B0k0HxubFhOgScBReS2PrTyZPueLJ7tisnQ1oVeEqbmA4H8wFy j/FTNDHcbpuVw7kQuvqiS7uhZi+UaVvA4Wyex2i3qlTPMtoLrP2LQkfQXhL848CzSK zC8cEZY42s+MikaBWVeIJH4mw1yKnhnI0wsni6Xc= Received: from DLEE70.ent.ti.com (dlemailx.itg.ti.com [157.170.170.113]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id v5F7SR2W018049; Thu, 15 Jun 2017 02:28:27 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.294.0; Thu, 15 Jun 2017 02:28:26 -0500 Received: from [172.24.190.233] (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id v5F7SO6J004181; Thu, 15 Jun 2017 02:28:25 -0500 Subject: Re: [PATCH v2] PCI: dwc: dra7xx: Fix compilation warning. To: Arvind Yadav , References: <673ccda2e1a722fa1b511a9c3bf1af6fbfc262a3.1497507582.git.arvind.yadav.cs@gmail.com> CC: , , From: Kishon Vijay Abraham I Message-ID: <2de7127a-78c3-36dc-fa74-5d29e15fc64c@ti.com> Date: Thu, 15 Jun 2017 12:58:24 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <673ccda2e1a722fa1b511a9c3bf1af6fbfc262a3.1497507582.git.arvind.yadav.cs@gmail.com> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Hi, On Thursday 15 June 2017 11:52 AM, Arvind Yadav wrote: > drivers/pci/dwc/pci-dra7xx.c: In function ‘dra7xx_pcie_enable_msi_interrupts’: > drivers/pci/dwc/pci-dra7xx.c:177:7: warning: large integer implicitly truncated to unsigned type [-Woverflow] > ~LEG_EP_INTERRUPTS & ~MSI); > ^ > drivers/pci/dwc/pci-dra7xx.c: In function ‘dra7xx_pcie_enable_wrapper_interrupts’: > drivers/pci/dwc/pci-dra7xx.c:187:7: warning: large integer implicitly truncated to unsigned type [-Woverflow] > ~INTERRUPTS); Er.. actually both PCIECTRL_TI_CONF_IRQSTATUS_MSI and PCIECTRL_TI_CONF_IRQSTATUS_MAIN are "write 1 to clear" registers. So writing '0' here means no action. So the right fix should be } > > Signed-off-by: Arvind Yadav > > Changes in v2: > Add casts in the definitions. please move the change log below "---" Thanks Kishon diff --git a/drivers/pci/dwc/pci-dra7xx.c b/drivers/pci/dwc/pci-dra7xx.c index 8decf46cf525..aab0187cdf87 100644 --- a/drivers/pci/dwc/pci-dra7xx.c +++ b/drivers/pci/dwc/pci-dra7xx.c @@ -174,7 +174,7 @@ static int dra7xx_pcie_establish_link(struct dw_pcie *pci) static void dra7xx_pcie_enable_msi_interrupts(struct dra7xx_pcie *dra7xx) { dra7xx_pcie_writel(dra7xx, PCIECTRL_DRA7XX_CONF_IRQSTATUS_MSI, - ~LEG_EP_INTERRUPTS & ~MSI); + MSI | LEG_EP_INTERRUPTS); dra7xx_pcie_writel(dra7xx, PCIECTRL_DRA7XX_CONF_IRQENABLE_SET_MSI, @@ -184,7 +184,7 @@ static void dra7xx_pcie_enable_msi_interrupts(struct dra7xx_pcie *dra7xx) static void dra7xx_pcie_enable_wrapper_interrupts(struct dra7xx_pcie *dra7xx) { dra7xx_pcie_writel(dra7xx, PCIECTRL_DRA7XX_CONF_IRQSTATUS_MAIN, - ~INTERRUPTS); + INTERRUPTS); dra7xx_pcie_writel(dra7xx, PCIECTRL_DRA7XX_CONF_IRQENABLE_SET_MAIN, INTERRUPTS);