[OPW,kernel] staging: rts5139: Replaced deprecated function in rts51x_scsi.c
diff mbox

Message ID 1382453317-4335-1-git-send-email-archanakumari959@gmail.com
State Changes Requested
Headers show

Commit Message

Archana kumari Oct. 22, 2013, 2:48 p.m. UTC
This patch fixes use of deprecated functions in rts51x_scsi.c

Signed-off-by: Archana kumari <archanakumari959@gmail.com>
---
 drivers/staging/rts5139/rts51x_scsi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Lisa Nguyen Oct. 22, 2013, 8:39 p.m. UTC | #1
On Tue, Oct 22, 2013 at 7:48 AM, Archana kumari
<archanakumari959@gmail.com> wrote:
> This patch fixes use of deprecated functions in rts51x_scsi.c
>
> Signed-off-by: Archana kumari <archanakumari959@gmail.com>
> ---

It's probably just me, but it's more specific to mention that you
replaced min() with min_t().

Other than that, it looks good.

Reviewed-by: Lisa Nguyen <lisa@xenapiadmin.com>

>  drivers/staging/rts5139/rts51x_scsi.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/rts5139/rts51x_scsi.c b/drivers/staging/rts5139/rts51x_scsi.c
> index 6108705..a474eed 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);
>
> --
> 1.8.1.2
>
> --
> You received this message because you are subscribed to the Google Groups "opw-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to opw-kernel+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

Patch
diff mbox

diff --git a/drivers/staging/rts5139/rts51x_scsi.c b/drivers/staging/rts5139/rts51x_scsi.c
index 6108705..a474eed 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);