[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 54/77] hw/sd/sdcard: Update coding style to make checkpatch.pl ha
From: |
Michael Roth |
Subject: |
[PATCH 54/77] hw/sd/sdcard: Update coding style to make checkpatch.pl happy |
Date: |
Thu, 3 Sep 2020 15:59:12 -0500 |
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
To make the next commit easier to review, clean this code first.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Alexander Bulekov <alxndr@bu.edu>
Message-Id: <20200630133912.9428-3-f4bug@amsat.org>
(cherry picked from commit 794d68de2f021a6d3874df41d6bbe8590ec05207)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
hw/sd/sd.c | 24 ++++++++++++++++--------
1 file changed, 16 insertions(+), 8 deletions(-)
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index c34435ede4..b927f7966d 100644
--- a/hw/sd/sd.c
+++ b/hw/sd/sd.c
@@ -1160,8 +1160,9 @@ static sd_rsp_type_t sd_normal_command(SDState *sd,
SDRequest req)
sd->data_start = addr;
sd->data_offset = 0;
- if (sd->data_start + sd->blk_len > sd->size)
+ if (sd->data_start + sd->blk_len > sd->size) {
sd->card_status |= ADDRESS_ERROR;
+ }
return sd_r1;
default:
@@ -1176,8 +1177,9 @@ static sd_rsp_type_t sd_normal_command(SDState *sd,
SDRequest req)
sd->data_start = addr;
sd->data_offset = 0;
- if (sd->data_start + sd->blk_len > sd->size)
+ if (sd->data_start + sd->blk_len > sd->size) {
sd->card_status |= ADDRESS_ERROR;
+ }
return sd_r1;
default:
@@ -1222,12 +1224,15 @@ static sd_rsp_type_t sd_normal_command(SDState *sd,
SDRequest req)
sd->data_offset = 0;
sd->blk_written = 0;
- if (sd->data_start + sd->blk_len > sd->size)
+ if (sd->data_start + sd->blk_len > sd->size) {
sd->card_status |= ADDRESS_ERROR;
- if (sd_wp_addr(sd, sd->data_start))
+ }
+ if (sd_wp_addr(sd, sd->data_start)) {
sd->card_status |= WP_VIOLATION;
- if (sd->csd[14] & 0x30)
+ }
+ if (sd->csd[14] & 0x30) {
sd->card_status |= WP_VIOLATION;
+ }
return sd_r1;
default:
@@ -1246,12 +1251,15 @@ static sd_rsp_type_t sd_normal_command(SDState *sd,
SDRequest req)
sd->data_offset = 0;
sd->blk_written = 0;
- if (sd->data_start + sd->blk_len > sd->size)
+ if (sd->data_start + sd->blk_len > sd->size) {
sd->card_status |= ADDRESS_ERROR;
- if (sd_wp_addr(sd, sd->data_start))
+ }
+ if (sd_wp_addr(sd, sd->data_start)) {
sd->card_status |= WP_VIOLATION;
- if (sd->csd[14] & 0x30)
+ }
+ if (sd->csd[14] & 0x30) {
sd->card_status |= WP_VIOLATION;
+ }
return sd_r1;
default:
--
2.17.1
- [PATCH 45/77] docs/orangepi: Add instructions for resizing SD image to power of two, (continued)
- [PATCH 45/77] docs/orangepi: Add instructions for resizing SD image to power of two, Michael Roth, 2020/09/03
- [PATCH 46/77] tests/acceptance/boot_linux: Tag tests using a SD card with 'device:sd', Michael Roth, 2020/09/03
- [PATCH 48/77] tests/acceptance: refactor boot_linux to allow code reuse, Michael Roth, 2020/09/03
- [PATCH 53/77] hw/sd/sdcard: Do not allow invalid SD card sizes, Michael Roth, 2020/09/03
- [PATCH 49/77] tests/acceptance: refactor boot_linux_console test to allow code reuse, Michael Roth, 2020/09/03
- [PATCH 47/77] tests/acceptance: allow console interaction with specific VMs, Michael Roth, 2020/09/03
- [PATCH 50/77] tests/acceptance/boot_linux: Expand SD card image to power of 2, Michael Roth, 2020/09/03
- [PATCH 51/77] hw/sd/sdcard: Restrict Class 6 commands to SCSD cards, Michael Roth, 2020/09/03
- [PATCH 52/77] hw/sd/sdcard: Simplify realize() a bit, Michael Roth, 2020/09/03
- [PATCH 04/77] 9p: Lock directory streams with a CoMutex, Michael Roth, 2020/09/03
- [PATCH 54/77] hw/sd/sdcard: Update coding style to make checkpatch.pl happy,
Michael Roth <=
- [PATCH 55/77] hw/sd/sdcard: Do not switch to ReceivingData if address is invalid, Michael Roth, 2020/09/03
- [PATCH 56/77] target/hppa: Free some temps in do_sub, Michael Roth, 2020/09/03
- [PATCH 57/77] tpm: tpm_spapr: Exit on TPM backend failures, Michael Roth, 2020/09/03
- [PATCH 58/77] tests: tpm: Skip over pcrUpdateCounter byte in result comparison, Michael Roth, 2020/09/03
- [PATCH 59/77] qdev: Fix device_add DRIVER,help to print to monitor, Michael Roth, 2020/09/03
- [PATCH 60/77] virtio-balloon: Prevent guest from starting a report when we didn't request one, Michael Roth, 2020/09/03
- [PATCH 05/77] net: Do not include a newline in the id of -nic devices, Michael Roth, 2020/09/03
- [PATCH 61/77] virtio-balloon: Add locking to prevent possible race when starting hinting, Michael Roth, 2020/09/03
- [PATCH 63/77] linux-headers: update against Linux 5.7-rc3, Michael Roth, 2020/09/03
- [PATCH 65/77] virtio: list legacy-capable devices, Michael Roth, 2020/09/03