lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <000001d3696c$978b4e70$c6a1eb50$@gmail.com>
Date:   Wed, 29 Nov 2017 18:48:42 -0500
From:   "Jingoo Han" <jingoohan1@...il.com>
To:     "'Stephen Boyd'" <sboyd@...eaurora.org>,
        "'Joao Pinto'" <Joao.Pinto@...opsys.com>
Cc:     <linux-kernel@...r.kernel.org>,
        "'Bjorn Helgaas'" <bhelgaas@...gle.com>,
        <linux-pci@...r.kernel.org>
Subject: Re: [PATCH] PCI: dwc: Use {upper,lower}_32_bits() macros for clarity

On Tuesday, November 28, 2017 7:54 PM, Stephen Boyd wrote:
> 
> 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 <sboyd@...eaurora.org>

Acked-by: Jingoo Han <jingoohan1@...il.com>

Best regards,
Jingoo Han

> ---
>  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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ