* [PATCH 0/2] staging: rts5208: Fix checkpatch issues @ 2016-09-28 19:47 Namrata A Shettar 2016-09-28 19:47 ` [PATCH 1/2] staging: rts5208: Add space around binary operators Namrata A Shettar 2016-09-28 19:47 ` [PATCH 2/2] staging: rts5208: Replace explicit NULL comparison Namrata A Shettar 0 siblings, 2 replies; 4+ messages in thread From: Namrata A Shettar @ 2016-09-28 19:47 UTC (permalink / raw) To: Greg Kroah-Hartman, Jonas Rickert, outreachy-kernel Fix checkpatch issues. Namrata A Shettar (2): staging: rts5208: Add space around binary operators staging: rts5208: Replace explicit NULL comparison. drivers/staging/rts5208/rtsx_scsi.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) -- 2.7.4 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] staging: rts5208: Add space around binary operators 2016-09-28 19:47 [PATCH 0/2] staging: rts5208: Fix checkpatch issues Namrata A Shettar @ 2016-09-28 19:47 ` Namrata A Shettar 2016-09-28 19:47 ` [PATCH 2/2] staging: rts5208: Replace explicit NULL comparison Namrata A Shettar 1 sibling, 0 replies; 4+ messages in thread From: Namrata A Shettar @ 2016-09-28 19:47 UTC (permalink / raw) To: Greg Kroah-Hartman, Jonas Rickert, outreachy-kernel Add space around binary operators to resolve checkpatch issue. Signed-off-by: Namrata A Shettar <namrataashettar@gmail.com> --- drivers/staging/rts5208/rtsx_scsi.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/staging/rts5208/rtsx_scsi.c b/drivers/staging/rts5208/rtsx_scsi.c index def53d9..d11b173 100644 --- a/drivers/staging/rts5208/rtsx_scsi.c +++ b/drivers/staging/rts5208/rtsx_scsi.c @@ -484,14 +484,14 @@ static int inquiry(struct scsi_cmnd *srb, struct rtsx_chip *chip) u8 card = get_lun_card(chip, lun); bool pro_formatter_flag = false; unsigned char inquiry_buf[] = { - QULIFIRE|DRCT_ACCESS_DEV, - RMB_DISC|0x0D, + QULIFIRE | DRCT_ACCESS_DEV, + RMB_DISC | 0x0D, 0x00, 0x01, 0x1f, 0x02, 0, - REL_ADR|WBUS_32|WBUS_16|SYNC|LINKED|CMD_QUE|SFT_RE, + REL_ADR | WBUS_32 | WBUS_16 | SYNC | LINKED | CMD_QUE | SFT_RE, }; if (CHECK_LUN_MODE(chip, SD_MS_2LUN)) { @@ -1986,8 +1986,8 @@ static int read_phy_register(struct scsi_cmnd *srb, struct rtsx_chip *chip) return TRANSPORT_FAILED; } - buf[2*i] = (u8)(val >> 8); - buf[2*i+1] = (u8)val; + buf[2 * i] = (u8)(val >> 8); + buf[2 * i + 1] = (u8)val; } len = (unsigned short)min_t(unsigned int, scsi_bufflen(srb), @@ -2045,7 +2045,7 @@ static int write_phy_register(struct scsi_cmnd *srb, struct rtsx_chip *chip) } for (i = 0; i < len / 2; i++) { - val = ((u16)buf[2*i] << 8) | buf[2*i+1]; + val = ((u16)buf[2 * i] << 8) | buf[2 * i + 1]; retval = rtsx_write_phy_register(chip, addr + i, val); if (retval != STATUS_SUCCESS) { vfree(buf); @@ -3067,18 +3067,18 @@ static int get_ms_information(struct scsi_cmnd *srb, struct rtsx_chip *chip) buf[i++] = 0x80; if ((dev_info_id == 0x10) || (dev_info_id == 0x13)) { /* System Information */ - memcpy(buf+i, ms_card->raw_sys_info, 96); + memcpy(buf + i, ms_card->raw_sys_info, 96); } else { /* Model Name */ - memcpy(buf+i, ms_card->raw_model_name, 48); + memcpy(buf + i, ms_card->raw_model_name, 48); } rtsx_stor_set_xfer_buf(buf, buf_len, srb); if (dev_info_id == 0x15) - scsi_set_resid(srb, scsi_bufflen(srb)-0x3C); + scsi_set_resid(srb, scsi_bufflen(srb) - 0x3C); else - scsi_set_resid(srb, scsi_bufflen(srb)-0x6C); + scsi_set_resid(srb, scsi_bufflen(srb) - 0x6C); kfree(buf); return STATUS_SUCCESS; -- 2.7.4 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] staging: rts5208: Replace explicit NULL comparison 2016-09-28 19:47 [PATCH 0/2] staging: rts5208: Fix checkpatch issues Namrata A Shettar 2016-09-28 19:47 ` [PATCH 1/2] staging: rts5208: Add space around binary operators Namrata A Shettar @ 2016-09-28 19:47 ` Namrata A Shettar 2016-09-28 20:49 ` [Outreachy kernel] " Julia Lawall 1 sibling, 1 reply; 4+ messages in thread From: Namrata A Shettar @ 2016-09-28 19:47 UTC (permalink / raw) To: Greg Kroah-Hartman, Jonas Rickert, outreachy-kernel Replace explicit NULL comparison to resolve checkpatch issue. Signed-off-by: Namrata A Shettar <namrataashettar@gmail.com> --- drivers/staging/rts5208/rtsx_scsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rts5208/rtsx_scsi.c b/drivers/staging/rts5208/rtsx_scsi.c index d11b173..7c2ef03 100644 --- a/drivers/staging/rts5208/rtsx_scsi.c +++ b/drivers/staging/rts5208/rtsx_scsi.c @@ -1397,7 +1397,7 @@ static int trace_msg_cmd(struct scsi_cmnd *srb, struct rtsx_chip *chip) buf_len = 4 + ((2 + MSG_FUNC_LEN + MSG_FILE_LEN + TIME_VAL_LEN) * TRACE_ITEM_CNT); - if ((scsi_bufflen(srb) < buf_len) || (scsi_sglist(srb) == NULL)) { + if ((scsi_bufflen(srb) < buf_len) || !(scsi_sglist(srb))) { set_sense_type(chip, SCSI_LUN(srb), SENSE_TYPE_MEDIA_UNRECOVER_READ_ERR); rtsx_trace(chip); -- 2.7.4 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Outreachy kernel] [PATCH 2/2] staging: rts5208: Replace explicit NULL comparison 2016-09-28 19:47 ` [PATCH 2/2] staging: rts5208: Replace explicit NULL comparison Namrata A Shettar @ 2016-09-28 20:49 ` Julia Lawall 0 siblings, 0 replies; 4+ messages in thread From: Julia Lawall @ 2016-09-28 20:49 UTC (permalink / raw) To: Namrata A Shettar; +Cc: Greg Kroah-Hartman, Jonas Rickert, outreachy-kernel On Thu, 29 Sep 2016, Namrata A Shettar wrote: > Replace explicit NULL comparison to resolve checkpatch issue. > > Signed-off-by: Namrata A Shettar <namrataashettar@gmail.com> > --- > drivers/staging/rts5208/rtsx_scsi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/rts5208/rtsx_scsi.c b/drivers/staging/rts5208/rtsx_scsi.c > index d11b173..7c2ef03 100644 > --- a/drivers/staging/rts5208/rtsx_scsi.c > +++ b/drivers/staging/rts5208/rtsx_scsi.c > @@ -1397,7 +1397,7 @@ static int trace_msg_cmd(struct scsi_cmnd *srb, struct rtsx_chip *chip) > buf_len = 4 + ((2 + MSG_FUNC_LEN + MSG_FILE_LEN + TIME_VAL_LEN) * > TRACE_ITEM_CNT); > > - if ((scsi_bufflen(srb) < buf_len) || (scsi_sglist(srb) == NULL)) { > + if ((scsi_bufflen(srb) < buf_len) || !(scsi_sglist(srb))) { The parentheses around the function call shouldn't be needed either. julia > set_sense_type(chip, SCSI_LUN(srb), > SENSE_TYPE_MEDIA_UNRECOVER_READ_ERR); > rtsx_trace(chip); > -- > 2.7.4 > > -- > You received this message because you are subscribed to the Google Groups "outreachy-kernel" group. > To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com. > To post to this group, send email to outreachy-kernel@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1c71305629b78a42717f794e9b8e3eef3cc12010.1475089953.git.namrataashettar%40gmail.com. > For more options, visit https://groups.google.com/d/optout. > ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-09-28 20:49 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-09-28 19:47 [PATCH 0/2] staging: rts5208: Fix checkpatch issues Namrata A Shettar 2016-09-28 19:47 ` [PATCH 1/2] staging: rts5208: Add space around binary operators Namrata A Shettar 2016-09-28 19:47 ` [PATCH 2/2] staging: rts5208: Replace explicit NULL comparison Namrata A Shettar 2016-09-28 20:49 ` [Outreachy kernel] " Julia Lawall
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.