Skip to content

Commit

Permalink
Staging: rts5139: sd_cprm: fix coding style and deprecation issues
Browse files Browse the repository at this point in the history
This commit fixes coding style and deprecation issues which
includes long lines, braces with single statments in if condition
and deprecated min() function.

Signed-off-by: Adnan Ali <adnan.ali@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Adnan Ali authored and Greg Kroah-Hartman committed Jun 12, 2012
1 parent ff5e4a1 commit dee0dc0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/staging/rts5139/sd_cprm.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,8 @@ static int ext_sd_send_cmd_get_rsp(struct rts51x_chip *chip, u8 cmd_idx,
if (buf[1] & 0x80)
TRACE_RET(chip, STATUS_FAIL);
}
if (buf[1] & 0x7F) {
if (buf[1] & 0x7F)
TRACE_RET(chip, STATUS_FAIL);
}
if (buf[2] & 0xF8)
TRACE_RET(chip, STATUS_FAIL);

Expand All @@ -224,7 +223,8 @@ static int ext_sd_send_cmd_get_rsp(struct rts51x_chip *chip, u8 cmd_idx,
return STATUS_SUCCESS;
}

static int ext_sd_get_rsp(struct rts51x_chip *chip, int len, u8 *rsp, u8 rsp_type)
static int ext_sd_get_rsp(struct rts51x_chip *chip, int len,
u8 *rsp, u8 rsp_type)
{
int retval, rsp_len;
u16 reg_addr;
Expand Down Expand Up @@ -844,7 +844,7 @@ int sd_pass_thru_mode(struct scsi_cmnd *srb, struct rts51x_chip *chip)

buf[15] = chip->max_lun;

len = min(18, (int)scsi_bufflen(srb));
len = min_t(unsigned, 18, scsi_bufflen(srb));
rts51x_set_xfer_buf(buf, len, srb);

return TRANSPORT_GOOD;
Expand Down

0 comments on commit dee0dc0

Please sign in to comment.