This commit fixes coding style issue including deprecated min(). Signed-off-by: Adnan Ali <adnan.ali@xxxxxxxxxxxxxxx> --- drivers/staging/rts5139/rts51x_scsi.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/rts5139/rts51x_scsi.c b/drivers/staging/rts5139/rts51x_scsi.c index e07a1f4..6313250 100644 --- a/drivers/staging/rts5139/rts51x_scsi.c +++ b/drivers/staging/rts5139/rts51x_scsi.c @@ -973,7 +973,7 @@ static int get_dev_status(struct scsi_cmnd *srb, struct rts51x_chip *chip) rts51x_pp_status(chip, lun, status, 32); - buf_len = min(scsi_bufflen(srb), (unsigned int)sizeof(status)); + buf_len = min_t(unsigned int, scsi_bufflen(srb), sizeof(status)); rts51x_set_xfer_buf(status, buf_len, srb); scsi_set_resid(srb, scsi_bufflen(srb) - buf_len); @@ -988,7 +988,7 @@ static int read_status(struct scsi_cmnd *srb, struct rts51x_chip *chip) rts51x_read_status(chip, lun, rts51x_status, 16); - buf_len = min(scsi_bufflen(srb), (unsigned int)sizeof(rts51x_status)); + buf_len = min_t(unsigned int, scsi_bufflen(srb), sizeof(rts51x_status)); rts51x_set_xfer_buf(rts51x_status, buf_len, srb); scsi_set_resid(srb, scsi_bufflen(srb) - buf_len); @@ -1027,7 +1027,7 @@ static int read_mem(struct scsi_cmnd *srb, struct rts51x_chip *chip) } } - len = (unsigned short)min(scsi_bufflen(srb), (unsigned int)len); + len = (unsigned short)min_t(unsigned int, scsi_bufflen(srb), len); rts51x_set_xfer_buf(buf, len, srb); scsi_set_resid(srb, scsi_bufflen(srb) - len); @@ -1054,7 +1054,7 @@ static int write_mem(struct scsi_cmnd *srb, struct rts51x_chip *chip) return TRANSPORT_GOOD; } - len = (unsigned short)min(scsi_bufflen(srb), (unsigned int)len); + len = (unsigned short)min_t(unsigned int, scsi_bufflen(srb), len); buf = vmalloc(len); if (!buf) TRACE_RET(chip, TRANSPORT_ERROR); @@ -1126,7 +1126,7 @@ static int read_phy_register(struct scsi_cmnd *srb, struct rts51x_chip *chip) } } - len = min(scsi_bufflen(srb), (unsigned int)len); + len = min_t(unsigned int, scsi_bufflen(srb), len); rts51x_set_xfer_buf(buf, len, srb); scsi_set_resid(srb, scsi_bufflen(srb) - len); @@ -1149,7 +1149,7 @@ static int write_phy_register(struct scsi_cmnd *srb, struct rts51x_chip *chip) len = srb->cmnd[7]; if (len) { - len = min(scsi_bufflen(srb), (unsigned int)len); + len = min_t(unsigned int, scsi_bufflen(srb), len); buf = vmalloc(len); if (buf == NULL) -- 1.7.4.1 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel