* [PATCH] CNS3xxx: Fix PCI cns3xxx_write_config()
@ 2016-03-11 11:32 Krzysztof Halasa
2016-03-13 1:02 ` Olof Johansson
0 siblings, 1 reply; 2+ messages in thread
From: Krzysztof Halasa @ 2016-03-11 11:32 UTC (permalink / raw)
To: linux-arm-kernel
The "where" offset was added twice, fix it.
Signed-off-by: Krzysztof Ha?asa <khalasa@piap.pl>
Fixes: 498a92d42596 ("ARM: cns3xxx: pci: avoid potential stack overflow")
diff --git a/arch/arm/mach-cns3xxx/pcie.c b/arch/arm/mach-cns3xxx/pcie.c
index 47905a5..318394e 100644
--- a/arch/arm/mach-cns3xxx/pcie.c
+++ b/arch/arm/mach-cns3xxx/pcie.c
@@ -220,13 +220,13 @@ static void cns3xxx_write_config(struct cns3xxx_pcie *cnspci,
u32 mask = (0x1ull << (size * 8)) - 1;
int shift = (where % 4) * 8;
- v = readl_relaxed(base + (where & 0xffc));
+ v = readl_relaxed(base);
v &= ~(mask << shift);
v |= (val & mask) << shift;
- writel_relaxed(v, base + (where & 0xffc));
- readl_relaxed(base + (where & 0xffc));
+ writel_relaxed(v, base);
+ readl_relaxed(base);
}
static void __init cns3xxx_pcie_hw_init(struct cns3xxx_pcie *cnspci)
--
Krzysztof Halasa
Industrial Research Institute for Automation and Measurements PIAP
Al. Jerozolimskie 202, 02-486 Warsaw, Poland
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] CNS3xxx: Fix PCI cns3xxx_write_config()
2016-03-11 11:32 [PATCH] CNS3xxx: Fix PCI cns3xxx_write_config() Krzysztof Halasa
@ 2016-03-13 1:02 ` Olof Johansson
0 siblings, 0 replies; 2+ messages in thread
From: Olof Johansson @ 2016-03-13 1:02 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Mar 11, 2016 at 12:32:14PM +0100, Krzysztof Halasa wrote:
> The "where" offset was added twice, fix it.
>
> Signed-off-by: Krzysztof Ha??asa <khalasa@piap.pl>
> Fixes: 498a92d42596 ("ARM: cns3xxx: pci: avoid potential stack overflow")
Thanks, applied to next/fixes-non-critical.
-Olof
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-03-13 1:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-11 11:32 [PATCH] CNS3xxx: Fix PCI cns3xxx_write_config() Krzysztof Halasa
2016-03-13 1:02 ` Olof Johansson
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).