mmc: sh_mmcif: (cosmetic) simplify boolean return blocks
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Wed, 12 Dec 2012 14:38:13 +0000 (15:38 +0100)
committerChris Ball <cjb@laptop.org>
Mon, 11 Feb 2013 18:28:25 +0000 (13:28 -0500)
Use "return condition" instead of "if (condition) return true; return false"
in functions, returning bool.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/host/sh_mmcif.c

index 8aa7b0e6dec2a6aef26b5c67e26f5a24c8f9a77a..de4b6d0735995ed64d94a7d2acb959e96d5755c0 100644 (file)
@@ -542,10 +542,7 @@ static bool sh_mmcif_next_block(struct sh_mmcif_host *host, u32 *p)
                host->pio_ptr = p;
        }
 
-       if (host->sg_idx == data->sg_len)
-               return false;
-
-       return true;
+       return host->sg_idx != data->sg_len;
 }
 
 static void sh_mmcif_single_read(struct sh_mmcif_host *host,
@@ -1071,9 +1068,7 @@ static bool sh_mmcif_end_cmd(struct sh_mmcif_host *host)
 
        if (!host->dma_active) {
                data->error = sh_mmcif_data_trans(host, host->mrq, cmd->opcode);
-               if (!data->error)
-                       return true;
-               return false;
+               return !data->error;
        }
 
        /* Running in the IRQ thread, can sleep */