patch-2_6_7-vs1_9_1_12
[linux-2.6.git] / drivers / scsi / ncr53c8xx.c
index ce2e1ac..bc51dc6 100644 (file)
@@ -307,7 +307,7 @@ typedef u32 tagmap_t;
 **    The maximum number of segments a transfer is split into.
 **    We support up to 127 segments for both read and write.
 **    The data scripts are broken into 2 sub-scripts.
-**    80 (MAX_SCATTERL) segments are moved from a sub-script 
+**    80 (MAX_SCATTERL) segments are moved from a sub-script
 **    in on-chip RAM. This makes data transfers shorter than 
 **    80k (assuming 1k fs) as fast as possible.
 */
@@ -4542,7 +4542,7 @@ static int ncr_queue_command (ncb_p np, Scsi_Cmnd *cmd)
        /*
        **      command
        */
-       memcpy(cp->cdb_buf, cmd->cmnd, MIN(cmd->cmd_len, sizeof(cp->cdb_buf)));
+       memcpy(cp->cdb_buf, cmd->cmnd, min_t(int, cmd->cmd_len, sizeof(cp->cdb_buf)));
        cp->phys.cmd.addr               = cpu_to_scr(CCB_PHYS (cp, cdb_buf[0]));
        cp->phys.cmd.size               = cpu_to_scr(cmd->cmd_len);
 
@@ -5172,7 +5172,7 @@ void ncr_complete (ncb_p np, ccb_p cp)
                **      Copy back sense data to caller's buffer.
                */
                memcpy(cmd->sense_buffer, cp->sense_buf,
-                      MIN(sizeof(cmd->sense_buffer), sizeof(cp->sense_buf)));
+                      min(sizeof(cmd->sense_buffer), sizeof(cp->sense_buf)));
 
                if (DEBUG_FLAGS & (DEBUG_RESULT|DEBUG_TINY)) {
                        u_char * p = (u_char*) & cmd->sense_buffer;