Skip to content

Commit

Permalink
mmc: sh_mmcif: (cosmetic) simplify boolean return blocks
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Guennadi Liakhovetski authored and Chris Ball committed Feb 11, 2013
1 parent eae3098 commit 99eb9d8
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions drivers/mmc/host/sh_mmcif.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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 */
Expand Down

0 comments on commit 99eb9d8

Please sign in to comment.