Received: by 10.223.164.202 with SMTP id h10csp3750937wrb; Tue, 28 Nov 2017 16:55:38 -0800 (PST) X-Google-Smtp-Source: AGs4zMb1eMJ3XxvHD7Cue92ZI5rVHiepPdof4tscWgK5w2nGUnv2w4BNvSFOn9xgNXR15llEm6Ht X-Received: by 10.84.251.130 with SMTP id w2mr1103272pll.24.1511916938317; Tue, 28 Nov 2017 16:55:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511916938; cv=none; d=google.com; s=arc-20160816; b=fmFyDZeyOUBvIxkSpLzkCePdIAx8sHFBN1MoidyIDohe4ixHZOYiX6x4HyqUIh80pU EaybtQRBMywj8kg0UCDohMVt3g+Fl+IXY12Bz2ugm4OKDDvNdYmq+eBtHY7lgljCKaot D3X23sFO6OPzYw6iC6wa3uUpgWiGaseXlO5GT8nDsB8liJNJiBD2U8vv91g+VSIBbGMD +att4t3iW2ywTIwXmUg9++Yal6JQIrfGvGkDAR01qKuxSvlva3EP7pRsX2tOxV5RJLAt 05+qAL25acR9oqejrjt4VDo7KkgI4eovbhwDikD5Jo4VNMG1MkcY1yG8hVKHOHFFX+O3 3eXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dmarc-filter:dkim-signature:dkim-signature :arc-authentication-results; bh=vi36XPbRZChxuBbib5Gt8GUHJ1/6ggC7hbKi91NJSZw=; b=iWcmdVVanTK2b4iveIaM64mcBhECcSM8TvvCfFHEhJAuCLCW7QLAu4BzS0A2fm8PeU cDdzjuBJ0tbK3wqRUdru+lhXoUMkiL4AtfP3qq8lYFlz8fn+R5kXUXoaUjWtB1uDb+lx eEdptpMF39k8KD4t/lgE9rwtiO0WcqM/T2DByoNL2wm4CYmMqXNYb8br7ctS7n4IWZOQ /4s+TA5m099kqN5lySzoTyzyMGFRm6rdZKHkHJQyqUZAV83GGZvfm2hamImwalmEOkvy UmSgcPvckyftE4Sx6MXghs7HdKhapHn12Gwb3EXhLQMe6G3ha82hqLDyxLB7mGEoRNGG rpZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=PvvPAcdH; dkim=pass header.i=@codeaurora.org header.s=default header.b=WY01PXoq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s1si343786pgq.14.2017.11.28.16.55.27; Tue, 28 Nov 2017 16:55:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=PvvPAcdH; dkim=pass header.i=@codeaurora.org header.s=default header.b=WY01PXoq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752812AbdK2Axi (ORCPT + 70 others); Tue, 28 Nov 2017 19:53:38 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:55366 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752133AbdK2Axg (ORCPT ); Tue, 28 Nov 2017 19:53:36 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 5441860249; Wed, 29 Nov 2017 00:53:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1511916816; bh=AKZXfblBBFl7b7NpzO4FcDVqHNLIG+FtMjS4Yg/D+d0=; h=From:To:Cc:Subject:Date:From; b=PvvPAcdHOHtU8E6m2jNTB9vfFzBSTCSsgmyhhG0jZhS1weeNePZD+joRejfmPCIYW vrz1dzfkrViArr86pN48qbvNaYR/+VGuTtQaqqn7SR2BZeTSP22usAKCeHJ/iWLftY ecbfYRkTOdyGgqEjZQbHHITB92bW1QtlkFCMCwvY= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from sboyd-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sboyd@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 775F060249; Wed, 29 Nov 2017 00:53:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1511916815; bh=AKZXfblBBFl7b7NpzO4FcDVqHNLIG+FtMjS4Yg/D+d0=; h=From:To:Cc:Subject:Date:From; b=WY01PXoqwt2Ad/UMUpp/RmZlRhuyN0lkg4vNj7ST7aOgAkq1SV1AWbNj/w74V7sju AbWVY6WTT3S+X2gL3ahdqD2buzzfXGlzHj7sYjuCMxPTmQfsJzWWAGM78wGYUZzu8J ANyog5Vk/T33Ne4FzWjMiHWt9dX61ngah944pXjA= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 775F060249 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=sboyd@codeaurora.org From: Stephen Boyd To: Jingoo Han , Joao Pinto Cc: linux-kernel@vger.kernel.org, Bjorn Helgaas , linux-pci@vger.kernel.org Subject: [PATCH] PCI: dwc: Use {upper,lower}_32_bits() macros for clarity Date: Tue, 28 Nov 2017 16:53:34 -0800 Message-Id: <20171129005334.16425-1-sboyd@codeaurora.org> X-Mailer: git-send-email 2.15.0.374.g5f9953d2c365 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We have macros for getting the upper or lower 32 bits of a number. Use them here to shave a couple lines off the code. Signed-off-by: Stephen Boyd --- drivers/pci/dwc/pcie-designware-host.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/pci/dwc/pcie-designware-host.c b/drivers/pci/dwc/pcie-designware-host.c index 157621175147..ae5abfddf8de 100644 --- a/drivers/pci/dwc/pcie-designware-host.c +++ b/drivers/pci/dwc/pcie-designware-host.c @@ -89,10 +89,8 @@ void dw_pcie_msi_init(struct pcie_port *pp) msi_target = virt_to_phys((void *)pp->msi_data); /* program the msi_data */ - dw_pcie_wr_own_conf(pp, PCIE_MSI_ADDR_LO, 4, - (u32)(msi_target & 0xffffffff)); - dw_pcie_wr_own_conf(pp, PCIE_MSI_ADDR_HI, 4, - (u32)(msi_target >> 32 & 0xffffffff)); + dw_pcie_wr_own_conf(pp, PCIE_MSI_ADDR_LO, 4, lower_32_bits(msi_target)); + dw_pcie_wr_own_conf(pp, PCIE_MSI_ADDR_HI, 4, upper_32_bits(msi_target)); } static void dw_pcie_msi_clear_irq(struct pcie_port *pp, int irq) -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project From 1584505865937875882@xxx Sun Nov 19 14:42:28 +0000 2017 X-GM-THRID: 1584505349929874835 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread