* [PATCH 1/5] net: remove unused fields from struct eth_device
2011-07-28 7:58 fixes for -next Sascha Hauer
@ 2011-07-28 7:58 ` Sascha Hauer
2011-07-28 7:58 ` [PATCH 2/5] ARM i.MX: Add missing cpu_is_mx53() Sascha Hauer
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Sascha Hauer @ 2011-07-28 7:58 UTC (permalink / raw)
To: barebox
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
include/net.h | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/include/net.h b/include/net.h
index 31bf6a2..7ac1c33 100644
--- a/include/net.h
+++ b/include/net.h
@@ -28,8 +28,6 @@
struct device_d;
struct eth_device {
- int iobase;
- int state;
int active;
int (*init) (struct eth_device*);
--
1.7.5.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/5] ARM i.MX: Add missing cpu_is_mx53()
2011-07-28 7:58 fixes for -next Sascha Hauer
2011-07-28 7:58 ` [PATCH 1/5] net: remove unused fields from struct eth_device Sascha Hauer
@ 2011-07-28 7:58 ` Sascha Hauer
2011-07-28 7:58 ` [PATCH 3/5] Fix memory corruption bug in dev_id() Sascha Hauer
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Sascha Hauer @ 2011-07-28 7:58 UTC (permalink / raw)
To: barebox
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/mach-imx/include/mach/generic.h | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-imx/include/mach/generic.h b/arch/arm/mach-imx/include/mach/generic.h
index 2926036..8ff04fb 100644
--- a/arch/arm/mach-imx/include/mach/generic.h
+++ b/arch/arm/mach-imx/include/mach/generic.h
@@ -51,5 +51,11 @@ u64 imx_uid(void);
#define cpu_is_mx51() (0)
#endif
+#ifdef CONFIG_ARCH_IMX53
+#define cpu_is_mx53() (1)
+#else
+#define cpu_is_mx53() (0)
+#endif
+
#define cpu_is_mx23() (0)
#define cpu_is_mx28() (0)
--
1.7.5.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 3/5] Fix memory corruption bug in dev_id()
2011-07-28 7:58 fixes for -next Sascha Hauer
2011-07-28 7:58 ` [PATCH 1/5] net: remove unused fields from struct eth_device Sascha Hauer
2011-07-28 7:58 ` [PATCH 2/5] ARM i.MX: Add missing cpu_is_mx53() Sascha Hauer
@ 2011-07-28 7:58 ` Sascha Hauer
2011-07-28 7:58 ` [PATCH 4/5] fix typo Sascha Hauer
2011-07-28 7:58 ` [PATCH 5/5] mci: do not use unitialized resource Sascha Hauer
4 siblings, 0 replies; 6+ messages in thread
From: Sascha Hauer @ 2011-07-28 7:58 UTC (permalink / raw)
To: barebox
The size of the static buffer in dev_id was only 8 bytes
(sizeof(long) * 2). This is completely bogus, so give
the buffer a sane length and also make sure we don't
write beyond the buffer using snprintf.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
drivers/base/driver.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/base/driver.c b/drivers/base/driver.c
index b5166c8..bb6df3c 100644
--- a/drivers/base/driver.c
+++ b/drivers/base/driver.c
@@ -284,9 +284,9 @@ EXPORT_SYMBOL(dummy_probe);
const char *dev_id(const struct device_d *dev)
{
- static char buf[sizeof(unsigned long) * 2];
+ static char buf[MAX_DRIVER_NAME + 16];
- sprintf(buf, FORMAT_DRIVER_MANE_ID, dev->name, dev->id);
+ snprintf(buf, sizeof(buf), FORMAT_DRIVER_MANE_ID, dev->name, dev->id);
return buf;
}
--
1.7.5.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 4/5] fix typo
2011-07-28 7:58 fixes for -next Sascha Hauer
` (2 preceding siblings ...)
2011-07-28 7:58 ` [PATCH 3/5] Fix memory corruption bug in dev_id() Sascha Hauer
@ 2011-07-28 7:58 ` Sascha Hauer
2011-07-28 7:58 ` [PATCH 5/5] mci: do not use unitialized resource Sascha Hauer
4 siblings, 0 replies; 6+ messages in thread
From: Sascha Hauer @ 2011-07-28 7:58 UTC (permalink / raw)
To: barebox
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
drivers/base/driver.c | 2 +-
include/driver.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/base/driver.c b/drivers/base/driver.c
index bb6df3c..78e9ea9 100644
--- a/drivers/base/driver.c
+++ b/drivers/base/driver.c
@@ -286,7 +286,7 @@ const char *dev_id(const struct device_d *dev)
{
static char buf[MAX_DRIVER_NAME + 16];
- snprintf(buf, sizeof(buf), FORMAT_DRIVER_MANE_ID, dev->name, dev->id);
+ snprintf(buf, sizeof(buf), FORMAT_DRIVER_NAME_ID, dev->name, dev->id);
return buf;
}
diff --git a/include/driver.h b/include/driver.h
index af34803..9a0b102 100644
--- a/include/driver.h
+++ b/include/driver.h
@@ -27,7 +27,7 @@
#include <linux/ioport.h>
#define MAX_DRIVER_NAME 32
-#define FORMAT_DRIVER_MANE_ID "%s%d"
+#define FORMAT_DRIVER_NAME_ID "%s%d"
#include <param.h>
--
1.7.5.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 5/5] mci: do not use unitialized resource
2011-07-28 7:58 fixes for -next Sascha Hauer
` (3 preceding siblings ...)
2011-07-28 7:58 ` [PATCH 4/5] fix typo Sascha Hauer
@ 2011-07-28 7:58 ` Sascha Hauer
4 siblings, 0 replies; 6+ messages in thread
From: Sascha Hauer @ 2011-07-28 7:58 UTC (permalink / raw)
To: barebox
disk_dev->resource is unitialized. Do not use it. This
got broken in:
commit 4c542622cb07354c410680e0a6782508179f9e5f
Author: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Date: Mon Jul 18 20:17:04 2011 +0800
mci: switch to "struct resource"
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
drivers/mci/mci-core.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c
index 0611ce6..3cf364c 100644
--- a/drivers/mci/mci-core.c
+++ b/drivers/mci/mci-core.c
@@ -1231,8 +1231,7 @@ static int mci_card_probe(struct device_d *mci_dev)
p->priv = mci_dev;
strcpy(disk_dev->name, "disk");
- disk_dev->resource[0].size = mci->capacity;
- disk_dev->resource[0].start = 0;
+ disk_dev->size = mci->capacity;
disk_dev->platform_data = p;
register_device(disk_dev);
--
1.7.5.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread