From 377b8fc6d70aab90ccfc053630c65835defbc3f8 Mon Sep 17 00:00:00 2001 From: Asai Thambi S P Date: Tue, 29 May 2012 18:44:01 -0700 Subject: [PATCH] mtip32xx: minor performance tweak When checking for command completions if the register value is zero, proceed to next register. Signed-off-by: Asai Thambi S P Signed-off-by: Jens Axboe --- drivers/block/mtip32xx/mtip32xx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c index cd271d5e1b73..29735316730a 100644 --- a/drivers/block/mtip32xx/mtip32xx.c +++ b/drivers/block/mtip32xx/mtip32xx.c @@ -970,6 +970,8 @@ static inline void mtip_process_sdbf(struct driver_data *dd) /* walk all bits in all slot groups */ for (group = 0; group < dd->slot_groups; group++) { completed = readl(port->completed[group]); + if (!completed) + continue; /* clear completed status register in the hardware.*/ writel(completed, port->completed[group]); -- 2.39.5