* [PATCH] staging: rts5208: Fixed checkpath warning.
@ 2019-08-30 7:11 Prakhar Sinha
2019-08-30 10:03 ` Joe Perches
0 siblings, 1 reply; 2+ messages in thread
From: Prakhar Sinha @ 2019-08-30 7:11 UTC (permalink / raw)
To: gregkh, kim.jamie.bradley; +Cc: devel, linux-kernel
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;
Signed-off-by: Prakhar Sinha <prakharsinha2808@gmail.com>
---
drivers/staging/rts5208/rtsx_transport.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/rts5208/rtsx_transport.c b/drivers/staging/rts5208/rtsx_transport.c
index 8277d7895608..3fc83875fe7c 100644
--- a/drivers/staging/rts5208/rtsx_transport.c
+++ b/drivers/staging/rts5208/rtsx_transport.c
@@ -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;
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] staging: rts5208: Fixed checkpath warning.
2019-08-30 7:11 [PATCH] staging: rts5208: Fixed checkpath warning Prakhar Sinha
@ 2019-08-30 10:03 ` Joe Perches
0 siblings, 0 replies; 2+ messages in thread
From: Joe Perches @ 2019-08-30 10:03 UTC (permalink / raw)
To: Prakhar Sinha, gregkh, kim.jamie.bradley; +Cc: devel, linux-kernel
On Fri, 2019-08-30 at 12:41 +0530, Prakhar Sinha wrote:
> 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;
[]
> diff --git a/drivers/staging/rts5208/rtsx_transport.c b/drivers/staging/rts5208/rtsx_transport.c
[]
> @@ -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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-08-30 10:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-30 7:11 [PATCH] staging: rts5208: Fixed checkpath warning Prakhar Sinha
2019-08-30 10:03 ` Joe Perches
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox