summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
Diffstat (limited to 'commands')
-rw-r--r--commands/mem.c3
-rw-r--r--commands/miitool.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/commands/mem.c b/commands/mem.c
index eb91ade05a..cdd7a492d0 100644
--- a/commands/mem.c
+++ b/commands/mem.c
@@ -96,7 +96,8 @@ static int mem_probe(struct device_d *dev)
dev->priv = cdev;
cdev->name = (char*)dev->resource[0].name;
- cdev->size = (unsigned long)resource_size(&dev->resource[0]);
+ cdev->size = min(resource_size(&dev->resource[0]),
+ (unsigned long long)S64_MAX);
cdev->ops = &memops;
cdev->dev = dev;
diff --git a/commands/miitool.c b/commands/miitool.c
index dea4f853ce..acf61421b8 100644
--- a/commands/miitool.c
+++ b/commands/miitool.c
@@ -115,7 +115,7 @@ static int show_basic_mii(struct mii_bus *mii, struct phy_device *phydev,
for (i = 0; i < 32; i++)
mii_val[i] = mii->read(mii, phydev->addr, i);
- printf((mii->parent->id) < 0 ? "%s: %s:" : "%s: %s%d: ",
+ printf((mii->parent->id) < 0 ? "%s: %s: " : "%s: %s%d: ",
phydev->cdev.name, mii->parent->name, mii->parent->id);