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] [day] [month] [year] [list]
Date:	Tue, 10 Dec 2013 07:03:43 +0000
From:	"Varun.Sethi@...escale.com" <Varun.Sethi@...escale.com>
To:	Yijing Wang <wangyijing@...wei.com>,
	Alex Williamson <alex.williamson@...hat.com>,
	Joerg Roedel <joro@...tes.org>
CC:	"iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Hanjun Guo <guohanjun@...wei.com>
Subject: RE: [PATCH 2/3] iommu/fsl_pamu: Use dev_is_pci() to check whether
 it is	pci device



> -----Original Message-----
> From: iommu-bounces@...ts.linux-foundation.org [mailto:iommu-
> bounces@...ts.linux-foundation.org] On Behalf Of Yijing Wang
> Sent: Thursday, December 05, 2013 5:13 PM
> To: Alex Williamson; Joerg Roedel
> Cc: iommu@...ts.linux-foundation.org; linux-kernel@...r.kernel.org;
> Hanjun Guo
> Subject: [PATCH 2/3] iommu/fsl_pamu: Use dev_is_pci() to check whether it
> is pci device
> 
> 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>
> ---
>  drivers/iommu/fsl_pamu_domain.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/iommu/fsl_pamu_domain.c
> b/drivers/iommu/fsl_pamu_domain.c index c857c30..93072ba 100644
> --- a/drivers/iommu/fsl_pamu_domain.c
> +++ b/drivers/iommu/fsl_pamu_domain.c
> @@ -691,7 +691,7 @@ static int fsl_pamu_attach_device(struct iommu_domain
> *domain,
>  	 * Use LIODN of the PCI controller while attaching a
>  	 * PCI device.
>  	 */
> -	if (dev->bus == &pci_bus_type) {
> +	if (dev_is_pci(dev)) {
>  		pdev = to_pci_dev(dev);
>  		pci_ctl = pci_bus_to_host(pdev->bus);
>  		/*
> @@ -729,7 +729,7 @@ static void fsl_pamu_detach_device(struct
> iommu_domain *domain,
>  	 * Use LIODN of the PCI controller while detaching a
>  	 * PCI device.
>  	 */
> -	if (dev->bus == &pci_bus_type) {
> +	if (dev_is_pci(dev)) {
>  		pdev = to_pci_dev(dev);
>  		pci_ctl = pci_bus_to_host(pdev->bus);
>  		/*
> @@ -1056,7 +1056,7 @@ static int fsl_pamu_add_device(struct device *dev)
>  	 * For platform devices we allocate a separate group for
>  	 * each of the devices.
>  	 */
> -	if (dev->bus == &pci_bus_type) {
> +	if (dev_is_pci(dev)) {
>  		pdev = to_pci_dev(dev);
>  		/* Don't create device groups for virtual PCI bridges */
>  		if (pdev->subordinate)
> --
> 1.7.1
Acked-by: Varun Sethi <varun.sethi@...escale.com>
--
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