Skip to contentSkip to conversation

staging: rts5208: Fixed checkpath warning.

PATCH Superseded Prakhar Sinha 2 participants 2 messages Aug 30, 2019 Staging

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: rts5208: Fixed checkpath warning.

This patch solves the following checkpatch.pl's message in drivers/staging/rts5208/rtsx_transport.c:397.

WARNING: line over 80 characters
+ option = RTSX_SG_VALID | RTSX_SG_END | RTSX_SG_TRANS_DATA;

---
 drivers/staging/rts5208/rtsx_transport.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/rts5208/rtsx_transport.c +2 -1
index 8277d7895608..3fc83875fe7c 100644
@@ -394,7 +394,8 @@ static int rtsx_transfer_sglist_adma_partial(struct rtsx_chip *chip, u8 card,
 			*index = *index + 1;
 		}
 		if ((i == (sg_cnt - 1)) || !resid)
-			option = RTSX_SG_VALID | RTSX_SG_END | RTSX_SG_TRANS_DATA;
+			option = RTSX_SG_VALID | RTSX_SG_END | 
+				 RTSX_SG_TRANS_DATA;
 		else
 			option = RTSX_SG_VALID | RTSX_SG_TRANS_DATA;
 
Signature · 1 line
2.20.1
#1 lore raw
Quoted 3 lines · Prakhar Sinha

This patch solves the following checkpatch.pl's message in drivers/staging/rts5208/rtsx_transport.c:397.
WARNING: line over 80 characters
+ option = RTSX_SG_VALID | RTSX_SG_END | RTSX_SG_TRANS_DATA;

[]

drivers/staging/rts5208/rtsx_transport.c

Quoted 1 line
drivers/staging/rts5208/rtsx_transport.c +0 -0

[]

drivers/staging/rts5208/rtsx_transport.c static int rtsx_transfer_sglist_adma_partial(struct rtsx_chip *chip, u8 card, · line 400

Quoted 9 lines
drivers/staging/rts5208/rtsx_transport.c +2 -1
@@ -394,7 +394,8 @@ static int rtsx_transfer_sglist_adma_partial(struct rtsx_chip *chip, u8 card,
 			*index = *index + 1;
 		}
 		if ((i == (sg_cnt - 1)) || !resid)
-			option = RTSX_SG_VALID | RTSX_SG_END | RTSX_SG_TRANS_DATA;
+			option = RTSX_SG_VALID | RTSX_SG_END | 
+				 RTSX_SG_TRANS_DATA;
 		else
 			option = RTSX_SG_VALID | RTSX_SG_TRANS_DATA;

probably more readable as:

		option = RTXS_SG_VALID | RTSX_SG_TRANS_DATA;
		if (i == sg_cnt - 1 || !resid)
			option |= RTXS_SG_END;

The compiler should produce the same object code.

Add parentheses in the if to suit, but they are not necessary.