* [PATCH 6/9] powerpc/pci: Use dev_is_pci() to check whether it is pci device @ 2013-12-05 12:01 Yijing Wang 2013-12-16 7:13 ` Wei Yang 0 siblings, 1 reply; 4+ messages in thread From: Yijing Wang @ 2013-12-05 12:01 UTC (permalink / raw) To: Bjorn Helgaas, Benjamin Herrenschmidt, Paul Mackerras Cc: linux-pci, linux-kernel, Yijing Wang, Hanjun Guo, Scott Wood, linuxppc-dev 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@huawei.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 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 6/9] powerpc/pci: Use dev_is_pci() to check whether it is pci device 2013-12-05 12:01 [PATCH 6/9] powerpc/pci: Use dev_is_pci() to check whether it is pci device Yijing Wang @ 2013-12-16 7:13 ` Wei Yang 2013-12-16 9:05 ` Yijing Wang 0 siblings, 1 reply; 4+ messages in thread From: Wei Yang @ 2013-12-16 7:13 UTC (permalink / raw) To: Yijing Wang Cc: linux-pci, linux-kernel, Scott Wood, Paul Mackerras, Hanjun Guo, Bjorn Helgaas, linuxppc-dev 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@huawei.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@lists.ozlabs.org >https://lists.ozlabs.org/listinfo/linuxppc-dev -- Richard Yang Help you, Help me ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 6/9] powerpc/pci: Use dev_is_pci() to check whether it is pci device 2013-12-16 7:13 ` Wei Yang @ 2013-12-16 9:05 ` Yijing Wang 2013-12-17 2:02 ` Wei Yang 0 siblings, 1 reply; 4+ messages in thread From: Yijing Wang @ 2013-12-16 9:05 UTC (permalink / raw) To: Wei Yang Cc: linux-pci, linux-kernel, Scott Wood, Paul Mackerras, Hanjun Guo, Bjorn Helgaas, linuxppc-dev On 2013/12/16 15:13, Wei Yang wrote: > 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? I sent the other similar changes to related maillist, some of them (David, Greg )has been accepted, and other is not. :) eg. http://article.gmane.org/gmane.linux.kernel/1608341/match=dev_is_pci Thanks! Yijing. > > 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@huawei.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@lists.ozlabs.org >> https://lists.ozlabs.org/listinfo/linuxppc-dev > -- Thanks! Yijing ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 6/9] powerpc/pci: Use dev_is_pci() to check whether it is pci device 2013-12-16 9:05 ` Yijing Wang @ 2013-12-17 2:02 ` Wei Yang 0 siblings, 0 replies; 4+ messages in thread From: Wei Yang @ 2013-12-17 2:02 UTC (permalink / raw) To: Yijing Wang Cc: Wei Yang, Hanjun Guo, linux-kernel, Scott Wood, Paul Mackerras, linux-pci, Bjorn Helgaas, linuxppc-dev On Mon, Dec 16, 2013 at 05:05:05PM +0800, Yijing Wang wrote: >On 2013/12/16 15:13, Wei Yang wrote: >> 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? > >I sent the other similar changes to related maillist, some of them (David, Greg )has been accepted, >and other is not. :) > >eg. >http://article.gmane.org/gmane.linux.kernel/1608341/match=dev_is_pci Ah, I see. Thanks :-) > >Thanks! >Yijing. > >> >> 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@huawei.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@lists.ozlabs.org >>> https://lists.ozlabs.org/listinfo/linuxppc-dev >> > > >-- >Thanks! >Yijing -- Richard Yang Help you, Help me ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-12-17 2:02 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-12-05 12:01 [PATCH 6/9] powerpc/pci: Use dev_is_pci() to check whether it is pci device Yijing Wang 2013-12-16 7:13 ` Wei Yang 2013-12-16 9:05 ` Yijing Wang 2013-12-17 2:02 ` Wei Yang
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).