Skip to contentSkip to conversation

arch/sh/drivers/heartbeat.c ioremap is expected to succeed

PATCH In review Roel Kluin 2 participants 2 messages Feb 18, 2008 – Feb 26, 2008 SuperH

lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 arch/sh/drivers/heartbeat.c ioremap is expected to succeed

!unlikely(hd->base) is equivalent to likely(!hd->base) (for instance see comments with commit fd312561adcc90e924f35d3032d5493aeb4c3017), I think the ioremap is expected to succeed? please confirm that's right. The patch below was *not* tested.
---
ioremap is expected to succeed

---

arch/sh/drivers/heartbeat.c +1 -1
index b76a14f..ab77b0e 100644
@@ -93,7 +93,7 @@ static int heartbeat_drv_probe(struct platform_device *pdev)
 	}
 
 	hd->base = ioremap_nocache(res->start, res->end - res->start + 1);
-	if (!unlikely(hd->base)) {
+	if (unlikely(!hd->base)) {
 		dev_err(&pdev->dev, "ioremap failed\n");
 
 		if (!pdev->dev.platform_data)
#1 lore raw
Quoted 8 lines · Roel Kluin

!unlikely(hd->base) is equivalent to likely(!hd->base) (for instance see comments with commit fd312561adcc90e924f35d3032d5493aeb4c3017), I think the ioremap is expected to succeed? please confirm that's right. The patch below was *not* tested.
---
ioremap is expected to succeed

Indeed it is. Applied, thanks.