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: <20131216071305.GA16842@weiyang.vnet.ibm.com>
Date:	Mon, 16 Dec 2013 15:13:05 +0800
From:	Wei Yang <weiyang@...ux.vnet.ibm.com>
To:	Yijing Wang <wangyijing@...wei.com>
Cc:	Bjorn Helgaas <bhelgaas@...gle.com>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Paul Mackerras <paulus@...ba.org>, linux-pci@...r.kernel.org,
	linux-kernel@...r.kernel.org, Hanjun Guo <guohanjun@...wei.com>,
	Scott Wood <scottwood@...escale.com>,
	linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH 6/9] powerpc/pci: Use dev_is_pci() to check whether it is
 pci device

Yijing,

This one looks good.

While I take a look at the source code, there are around 20 places with
similar style. Do you think it would be good to change all these places
in one patch?

On Thu, Dec 05, 2013 at 08:01:20PM +0800, Yijing Wang wrote:
>Use PCI standard marco dev_is_pci() instead of directly compare
>pci_bus_type to check whether it is pci device.
>
>Signed-off-by: Yijing Wang <wangyijing@...wei.com>
>---
> arch/powerpc/sysdev/fsl_pci.c |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
>diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c
>index 4dfd61d..7066e52 100644
>--- a/arch/powerpc/sysdev/fsl_pci.c
>+++ b/arch/powerpc/sysdev/fsl_pci.c
>@@ -122,7 +122,7 @@ static int fsl_pci_dma_set_mask(struct device *dev, u64 dma_mask)
> 	 * address width of the SoC such that we can address any internal
> 	 * SoC address from across PCI if needed
> 	 */
>-	if ((dev->bus == &pci_bus_type) &&
>+	if ((dev_is_pci(dev)) &&
> 	    dma_mask >= DMA_BIT_MASK(MAX_PHYS_ADDR_BITS)) {
> 		set_dma_ops(dev, &dma_direct_ops);
> 		set_dma_offset(dev, pci64_dma_offset);
>-- 
>1.7.1
>
>
>_______________________________________________
>Linuxppc-dev mailing list
>Linuxppc-dev@...ts.ozlabs.org
>https://lists.ozlabs.org/listinfo/linuxppc-dev

-- 
Richard Yang
Help you, Help me

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ