* [PATCH] mmc: cb710: fix indentation issue in if block
@ 2019-02-07 12:59 Colin King
2019-02-08 11:52 ` Ulf Hansson
2019-02-08 15:28 ` Michał Mirosław
0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2019-02-07 12:59 UTC (permalink / raw)
To: kernel-janitors
From: Colin Ian King <colin.king@canonical.com>
There is an if block that is not indented, fix this. Also add a
break statement on the default case to clean up a cppcheck warning.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/mmc/host/cb710-mmc.c | 42 +++++++++++++++++++-----------------
1 file changed, 22 insertions(+), 20 deletions(-)
diff --git a/drivers/mmc/host/cb710-mmc.c b/drivers/mmc/host/cb710-mmc.c
index 1087b4c79cd6..4c477dcd2ada 100644
--- a/drivers/mmc/host/cb710-mmc.c
+++ b/drivers/mmc/host/cb710-mmc.c
@@ -566,30 +566,32 @@ static void cb710_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
cb710_mmc_select_clock_divider(mmc, ios->clock);
- if (ios->power_mode != reader->last_power_mode)
- switch (ios->power_mode) {
- case MMC_POWER_ON:
- err = cb710_mmc_powerup(slot);
- if (err) {
- dev_warn(cb710_slot_dev(slot),
- "powerup failed (%d)- retrying\n", err);
- cb710_mmc_powerdown(slot);
- udelay(1);
+ if (ios->power_mode != reader->last_power_mode) {
+ switch (ios->power_mode) {
+ case MMC_POWER_ON:
err = cb710_mmc_powerup(slot);
- if (err)
+ if (err) {
dev_warn(cb710_slot_dev(slot),
- "powerup retry failed (%d) - expect errors\n",
+ "powerup failed (%d)- retrying\n", err);
+ cb710_mmc_powerdown(slot);
+ udelay(1);
+ err = cb710_mmc_powerup(slot);
+ if (err)
+ dev_warn(cb710_slot_dev(slot),
+ "powerup retry failed (%d) - expect errors\n",
err);
+ }
+ reader->last_power_mode = MMC_POWER_ON;
+ break;
+ case MMC_POWER_OFF:
+ cb710_mmc_powerdown(slot);
+ reader->last_power_mode = MMC_POWER_OFF;
+ break;
+ case MMC_POWER_UP:
+ default:
+ /* ignore */
+ break;
}
- reader->last_power_mode = MMC_POWER_ON;
- break;
- case MMC_POWER_OFF:
- cb710_mmc_powerdown(slot);
- reader->last_power_mode = MMC_POWER_OFF;
- break;
- case MMC_POWER_UP:
- default:
- /* ignore */;
}
cb710_mmc_enable_4bit_data(slot, ios->bus_width != MMC_BUS_WIDTH_1);
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mmc: cb710: fix indentation issue in if block
2019-02-07 12:59 [PATCH] mmc: cb710: fix indentation issue in if block Colin King
@ 2019-02-08 11:52 ` Ulf Hansson
2019-02-08 15:28 ` Michał Mirosław
1 sibling, 0 replies; 3+ messages in thread
From: Ulf Hansson @ 2019-02-08 11:52 UTC (permalink / raw)
To: kernel-janitors
On Thu, 7 Feb 2019 at 14:00, Colin King <colin.king@canonical.com> wrote:
>
> From: Colin Ian King <colin.king@canonical.com>
>
> There is an if block that is not indented, fix this. Also add a
> break statement on the default case to clean up a cppcheck warning.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Applied for next, thanks!
Kind regards
Uffe
> ---
> drivers/mmc/host/cb710-mmc.c | 42 +++++++++++++++++++-----------------
> 1 file changed, 22 insertions(+), 20 deletions(-)
>
> diff --git a/drivers/mmc/host/cb710-mmc.c b/drivers/mmc/host/cb710-mmc.c
> index 1087b4c79cd6..4c477dcd2ada 100644
> --- a/drivers/mmc/host/cb710-mmc.c
> +++ b/drivers/mmc/host/cb710-mmc.c
> @@ -566,30 +566,32 @@ static void cb710_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
>
> cb710_mmc_select_clock_divider(mmc, ios->clock);
>
> - if (ios->power_mode != reader->last_power_mode)
> - switch (ios->power_mode) {
> - case MMC_POWER_ON:
> - err = cb710_mmc_powerup(slot);
> - if (err) {
> - dev_warn(cb710_slot_dev(slot),
> - "powerup failed (%d)- retrying\n", err);
> - cb710_mmc_powerdown(slot);
> - udelay(1);
> + if (ios->power_mode != reader->last_power_mode) {
> + switch (ios->power_mode) {
> + case MMC_POWER_ON:
> err = cb710_mmc_powerup(slot);
> - if (err)
> + if (err) {
> dev_warn(cb710_slot_dev(slot),
> - "powerup retry failed (%d) - expect errors\n",
> + "powerup failed (%d)- retrying\n", err);
> + cb710_mmc_powerdown(slot);
> + udelay(1);
> + err = cb710_mmc_powerup(slot);
> + if (err)
> + dev_warn(cb710_slot_dev(slot),
> + "powerup retry failed (%d) - expect errors\n",
> err);
> + }
> + reader->last_power_mode = MMC_POWER_ON;
> + break;
> + case MMC_POWER_OFF:
> + cb710_mmc_powerdown(slot);
> + reader->last_power_mode = MMC_POWER_OFF;
> + break;
> + case MMC_POWER_UP:
> + default:
> + /* ignore */
> + break;
> }
> - reader->last_power_mode = MMC_POWER_ON;
> - break;
> - case MMC_POWER_OFF:
> - cb710_mmc_powerdown(slot);
> - reader->last_power_mode = MMC_POWER_OFF;
> - break;
> - case MMC_POWER_UP:
> - default:
> - /* ignore */;
> }
>
> cb710_mmc_enable_4bit_data(slot, ios->bus_width != MMC_BUS_WIDTH_1);
> --
> 2.20.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mmc: cb710: fix indentation issue in if block
2019-02-07 12:59 [PATCH] mmc: cb710: fix indentation issue in if block Colin King
2019-02-08 11:52 ` Ulf Hansson
@ 2019-02-08 15:28 ` Michał Mirosław
1 sibling, 0 replies; 3+ messages in thread
From: Michał Mirosław @ 2019-02-08 15:28 UTC (permalink / raw)
To: kernel-janitors
On Thu, Feb 07, 2019 at 12:59:06PM +0000, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> There is an if block that is not indented, fix this. Also add a
> break statement on the default case to clean up a cppcheck warning.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
[...]
Acked-by: Micha³ Miros³aw <mirq-linux@rere.qmqm.pl>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-02-08 15:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-07 12:59 [PATCH] mmc: cb710: fix indentation issue in if block Colin King
2019-02-08 11:52 ` Ulf Hansson
2019-02-08 15:28 ` Michał Mirosław
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.