* [patch] ia64: pci: Fix a condition in pcibr_dmamap_ate32()
@ 2016-12-08 10:59 Dan Carpenter
2018-12-17 9:22 ` Dan Carpenter
2018-12-17 18:47 ` Luck, Tony
0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2016-12-08 10:59 UTC (permalink / raw)
To: kernel-janitors
Smatch complains that probably this condition isn't correct because it
first does a comparison and then a mask. Judging from the surrounding
code probably the parenthesis are in the wrong place.
The original code is equivalent to:
if (dma_flags = SN_DMA_ADDR_PHYS)
And it's probably going to be true less often than my corrected version.
Fixes: 83821d3f558d ("[PATCH] PCI: altix: msi support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/arch/ia64/sn/pci/pcibr/pcibr_dma.c b/arch/ia64/sn/pci/pcibr/pcibr_dma.c
index 1e863b277ac9..71c9bf308adf 100644
--- a/arch/ia64/sn/pci/pcibr/pcibr_dma.c
+++ b/arch/ia64/sn/pci/pcibr/pcibr_dma.c
@@ -82,7 +82,7 @@
if (IS_PCIX(pcibus_info))
ate_flags &= ~(PCI32_ATE_PREF);
- if (SN_DMA_ADDRTYPE(dma_flags = SN_DMA_ADDR_PHYS))
+ if (SN_DMA_ADDRTYPE(dma_flags) = SN_DMA_ADDR_PHYS)
xio_addr = IS_PIC_SOFT(pcibus_info) ? PHYS_TO_DMA(paddr) :
PHYS_TO_TIODMA(paddr);
else
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [patch] ia64: pci: Fix a condition in pcibr_dmamap_ate32()
2016-12-08 10:59 [patch] ia64: pci: Fix a condition in pcibr_dmamap_ate32() Dan Carpenter
@ 2018-12-17 9:22 ` Dan Carpenter
2018-12-17 18:47 ` Luck, Tony
1 sibling, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2018-12-17 9:22 UTC (permalink / raw)
To: kernel-janitors
This patch is still required. Would you like me to resend it?
regards,
dan carpenter
On Thu, Dec 08, 2016 at 01:59:36PM +0300, Dan Carpenter wrote:
> Smatch complains that probably this condition isn't correct because it
> first does a comparison and then a mask. Judging from the surrounding
> code probably the parenthesis are in the wrong place.
>
> The original code is equivalent to:
>
> if (dma_flags = SN_DMA_ADDR_PHYS)
>
> And it's probably going to be true less often than my corrected version.
>
> Fixes: 83821d3f558d ("[PATCH] PCI: altix: msi support")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/arch/ia64/sn/pci/pcibr/pcibr_dma.c b/arch/ia64/sn/pci/pcibr/pcibr_dma.c
> index 1e863b277ac9..71c9bf308adf 100644
> --- a/arch/ia64/sn/pci/pcibr/pcibr_dma.c
> +++ b/arch/ia64/sn/pci/pcibr/pcibr_dma.c
> @@ -82,7 +82,7 @@
> if (IS_PCIX(pcibus_info))
> ate_flags &= ~(PCI32_ATE_PREF);
>
> - if (SN_DMA_ADDRTYPE(dma_flags = SN_DMA_ADDR_PHYS))
> + if (SN_DMA_ADDRTYPE(dma_flags) = SN_DMA_ADDR_PHYS)
> xio_addr = IS_PIC_SOFT(pcibus_info) ? PHYS_TO_DMA(paddr) :
> PHYS_TO_TIODMA(paddr);
> else
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [patch] ia64: pci: Fix a condition in pcibr_dmamap_ate32()
2016-12-08 10:59 [patch] ia64: pci: Fix a condition in pcibr_dmamap_ate32() Dan Carpenter
2018-12-17 9:22 ` Dan Carpenter
@ 2018-12-17 18:47 ` Luck, Tony
1 sibling, 0 replies; 3+ messages in thread
From: Luck, Tony @ 2018-12-17 18:47 UTC (permalink / raw)
To: kernel-janitors
> This patch is still required. Would you like me to resend it?
No need to resend. I've picked it up now. Thanks
-Tony
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-12-17 18:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-08 10:59 [patch] ia64: pci: Fix a condition in pcibr_dmamap_ate32() Dan Carpenter
2018-12-17 9:22 ` Dan Carpenter
2018-12-17 18:47 ` Luck, Tony
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.