[v2] staging: rts5208: split long line of code

Message ID Y06Vsr7JVvpPem5T@elroy-temp-vm.gaiao0uenmiufjlowqgp5yxwdh.gvxx.internal.cloudapp.net
State New
Headers
Series [v2] staging: rts5208: split long line of code |

Commit Message

Tanjuate Brunostar Oct. 18, 2022, 12:01 p.m. UTC
  Fix checkpatch warning by splitting up a long line of code, improving
code readability

Signed-off-by: Tanjuate Brunostar <tanjubrunostar0@gmail.com>
---

v2: Reorganized the line of code by splitting it where it does not break
the parenthesis as recommended by Julia Lawall

 drivers/staging/rts5208/sd.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Comments

Julia Lawall Oct. 18, 2022, 12:11 p.m. UTC | #1
On Tue, 18 Oct 2022, Tanjuate Brunostar wrote:

> Fix checkpatch warning by splitting up a long line of code, improving
> code readability
>
> Signed-off-by: Tanjuate Brunostar <tanjubrunostar0@gmail.com>

Acked-by: Julia Lawall <julia.lawall@inria.fr>

> ---
>
> v2: Reorganized the line of code by splitting it where it does not break
> the parenthesis as recommended by Julia Lawall
>
>  drivers/staging/rts5208/sd.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/staging/rts5208/sd.c b/drivers/staging/rts5208/sd.c
> index 4643127a87ca..74c4f476b3a4 100644
> --- a/drivers/staging/rts5208/sd.c
> +++ b/drivers/staging/rts5208/sd.c
> @@ -4505,7 +4505,8 @@ int sd_execute_write_data(struct scsi_cmnd *srb, struct rtsx_chip *chip)
>  				if (CHK_SD(sd_card)) {
>  					retval = reset_sd(chip);
>  					if (retval != STATUS_SUCCESS) {
> -						sd_card->sd_lock_status &= ~(SD_UNLOCK_POW_ON | SD_SDR_RST);
> +						sd_card->sd_lock_status &=
> +							~(SD_UNLOCK_POW_ON | SD_SDR_RST);
>  						goto sd_execute_write_cmd_failed;
>  					}
>  				}
> --
> 2.34.1
>
>
>
  

Patch

diff --git a/drivers/staging/rts5208/sd.c b/drivers/staging/rts5208/sd.c
index 4643127a87ca..74c4f476b3a4 100644
--- a/drivers/staging/rts5208/sd.c
+++ b/drivers/staging/rts5208/sd.c
@@ -4505,7 +4505,8 @@  int sd_execute_write_data(struct scsi_cmnd *srb, struct rtsx_chip *chip)
 				if (CHK_SD(sd_card)) {
 					retval = reset_sd(chip);
 					if (retval != STATUS_SUCCESS) {
-						sd_card->sd_lock_status &= ~(SD_UNLOCK_POW_ON | SD_SDR_RST);
+						sd_card->sd_lock_status &=
+							~(SD_UNLOCK_POW_ON | SD_SDR_RST);
 						goto sd_execute_write_cmd_failed;
 					}
 				}