public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arch/sh/drivers/heartbeat.c ioremap is expected to succeed
@ 2008-02-18 13:09 Roel Kluin
  2008-02-26  5:21 ` Paul Mundt
  0 siblings, 1 reply; 2+ messages in thread
From: Roel Kluin @ 2008-02-18 13:09 UTC (permalink / raw)
  To: Paul Mundt, linux-sh; +Cc: lkml

!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

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
---
diff --git a/arch/sh/drivers/heartbeat.c b/arch/sh/drivers/heartbeat.c
index b76a14f..ab77b0e 100644
--- a/arch/sh/drivers/heartbeat.c
+++ b/arch/sh/drivers/heartbeat.c
@@ -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)

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-02-26  5:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-18 13:09 [PATCH] arch/sh/drivers/heartbeat.c ioremap is expected to succeed Roel Kluin
2008-02-26  5:21 ` Paul Mundt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox