** 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.
*/
/*
** 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);
** 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;