lkml.org 
[lkml]   [2016]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH 4/8] staging: rts5208: Logical continuation fixes
From
Date
On Mon, 2016-10-03 at 23:17 +0000, Wayne Porter wrote:
> Checkpatch detected multiple instances of logical continuation warnings
[]
> diff --git a/drivers/staging/rts5208/xd.c b/drivers/staging/rts5208/xd.c
[]
> @@ -819,11 +819,11 @@ static int reset_xd(struct rtsx_chip *chip)
> }
>
> if ((buf[0] == 0x01) && (buf[1] == 0x03) &&
> - (buf[2] == 0xD9)
> - && (buf[3] == 0x01) && (buf[4] == 0xFF)
> - && (buf[5] == 0x18) && (buf[6] == 0x02)
> - && (buf[7] == 0xDF) && (buf[8] == 0x01)
> - && (buf[9] == 0x20)) {
> + (buf[2] == 0xD9) &&
> + (buf[3] == 0x01) && (buf[4] == 0xFF) &&
> + (buf[5] == 0x18) && (buf[6] == 0x02) &&
> + (buf[7] == 0xDF) && (buf[8] == 0x01) &&
> + (buf[9] == 0x20)) {

memcmp might be easier to read

if (!memcmp(buf, "\x01\x03\xd9\x01\xff\x18\x02\xdf\x01\x20", 10))

\
 
 \ /
  Last update: 2016-10-04 01:26    [W:0.729 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site