* [PATCH 1/2] mtd: nand_orion: remove unused goto label
@ 2014-11-09 11:10 Uwe Kleine-König
2014-11-09 11:10 ` [PATCH 2/2] pci: mvebu: Fix uninitialized variable in mvebu_get_target_attr() Uwe Kleine-König
2014-11-10 6:14 ` [PATCH 1/2] mtd: nand_orion: remove unused goto label Sascha Hauer
0 siblings, 2 replies; 3+ messages in thread
From: Uwe Kleine-König @ 2014-11-09 11:10 UTC (permalink / raw)
To: barebox
This fixes the following warning:
drivers/mtd/nand/nand_orion.c: In function ‘orion_nand_probe’:
drivers/mtd/nand/nand_orion.c:145:1: warning: label ‘no_res’ defined but not used [-Wunused-label]
Fixes: 1a215f5 ("nand: Add Marvell Orion NAND driver")
Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
---
drivers/mtd/nand/nand_orion.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mtd/nand/nand_orion.c b/drivers/mtd/nand/nand_orion.c
index 2c9707d..fe06ef7 100644
--- a/drivers/mtd/nand/nand_orion.c
+++ b/drivers/mtd/nand/nand_orion.c
@@ -142,7 +142,7 @@ static int orion_nand_probe(struct device_d *dev)
no_dev:
if (!IS_ERR(clk))
clk_disable(clk);
-no_res:
+
free(priv);
return ret;
}
--
2.1.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 2/2] pci: mvebu: Fix uninitialized variable in mvebu_get_target_attr()
2014-11-09 11:10 [PATCH 1/2] mtd: nand_orion: remove unused goto label Uwe Kleine-König
@ 2014-11-09 11:10 ` Uwe Kleine-König
2014-11-10 6:14 ` [PATCH 1/2] mtd: nand_orion: remove unused goto label Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Uwe Kleine-König @ 2014-11-09 11:10 UTC (permalink / raw)
To: barebox; +Cc: Thomas Petazzoni
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This is the same fix that was applied to the Linux kernel in commit
56fab6e18944 (PCI: mvebu: Fix uninitialized variable in
mvebu_get_tgt_attr()).
Fixes: 5a9ba98 ("pci: mvebu: Add PCIe driver")
Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
---
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
---
drivers/pci/pci-mvebu.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/pci/pci-mvebu.c b/drivers/pci/pci-mvebu.c
index 45befbb..a314a68 100644
--- a/drivers/pci/pci-mvebu.c
+++ b/drivers/pci/pci-mvebu.c
@@ -240,7 +240,7 @@ static int mvebu_get_target_attr(struct device_node *np, int devfn,
rangesz = pna + na + ns;
nranges = rlen / sizeof(__be32) / rangesz;
- for (i = 0; i < nranges; i++) {
+ for (i = 0; i < nranges; i++, range += rangesz) {
u32 flags = of_read_number(range, 1);
u32 slot = of_read_number(range + 1, 1);
u64 cpuaddr = of_read_number(range + na, pna);
@@ -250,14 +250,14 @@ static int mvebu_get_target_attr(struct device_node *np, int devfn,
rtype = IORESOURCE_IO;
else if (DT_FLAGS_TO_TYPE(flags) == DT_TYPE_MEM32)
rtype = IORESOURCE_MEM;
+ else
+ continue;
if (slot == PCI_SLOT(devfn) && type == rtype) {
*target = DT_CPUADDR_TO_TARGET(cpuaddr);
*attr = DT_CPUADDR_TO_ATTR(cpuaddr);
return 0;
}
-
- range += rangesz;
}
return -ENOENT;
--
2.1.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] mtd: nand_orion: remove unused goto label
2014-11-09 11:10 [PATCH 1/2] mtd: nand_orion: remove unused goto label Uwe Kleine-König
2014-11-09 11:10 ` [PATCH 2/2] pci: mvebu: Fix uninitialized variable in mvebu_get_target_attr() Uwe Kleine-König
@ 2014-11-10 6:14 ` Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2014-11-10 6:14 UTC (permalink / raw)
To: Uwe Kleine-König; +Cc: barebox
On Sun, Nov 09, 2014 at 12:10:31PM +0100, Uwe Kleine-König wrote:
> This fixes the following warning:
>
> drivers/mtd/nand/nand_orion.c: In function ‘orion_nand_probe’:
> drivers/mtd/nand/nand_orion.c:145:1: warning: label ‘no_res’ defined but not used [-Wunused-label]
>
> Fixes: 1a215f5 ("nand: Add Marvell Orion NAND driver")
> Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
Applied both, thanks
Sascha
> ---
> drivers/mtd/nand/nand_orion.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mtd/nand/nand_orion.c b/drivers/mtd/nand/nand_orion.c
> index 2c9707d..fe06ef7 100644
> --- a/drivers/mtd/nand/nand_orion.c
> +++ b/drivers/mtd/nand/nand_orion.c
> @@ -142,7 +142,7 @@ static int orion_nand_probe(struct device_d *dev)
> no_dev:
> if (!IS_ERR(clk))
> clk_disable(clk);
> -no_res:
> +
> free(priv);
> return ret;
> }
> --
> 2.1.1
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-11-10 6:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-09 11:10 [PATCH 1/2] mtd: nand_orion: remove unused goto label Uwe Kleine-König
2014-11-09 11:10 ` [PATCH 2/2] pci: mvebu: Fix uninitialized variable in mvebu_get_target_attr() Uwe Kleine-König
2014-11-10 6:14 ` [PATCH 1/2] mtd: nand_orion: remove unused goto label Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox