Commit 7f9ddb3f authored by Randy Dunlap's avatar Randy Dunlap Committed by James Bottomley

[PATCH] (3/5) ncr53c8x: use kernel.h min/max

From: Michael Veeck <michael.veeck@gmx.net>
Subject: [Kernel-janitors] [PATCH] drivers/scsi/53c* MIN/MAX removal


Patch (against 2.6.6-rc1) removes unnecessary min/max macros and changes
calls to use kernel.h macros instead.


 drivers/scsi/ncr53c8xx.c      |    6 +++---
 drivers/scsi/sym53c8xx_comm.h |    5 +----
 2 files changed, 4 insertions(+), 7 deletions(-)
parent 746ffb12
...@@ -4542,7 +4542,7 @@ static int ncr_queue_command (ncb_p np, Scsi_Cmnd *cmd) ...@@ -4542,7 +4542,7 @@ static int ncr_queue_command (ncb_p np, Scsi_Cmnd *cmd)
/* /*
** command ** 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.addr = cpu_to_scr(CCB_PHYS (cp, cdb_buf[0]));
cp->phys.cmd.size = cpu_to_scr(cmd->cmd_len); cp->phys.cmd.size = cpu_to_scr(cmd->cmd_len);
...@@ -5172,7 +5172,7 @@ void ncr_complete (ncb_p np, ccb_p cp) ...@@ -5172,7 +5172,7 @@ void ncr_complete (ncb_p np, ccb_p cp)
** Copy back sense data to caller's buffer. ** Copy back sense data to caller's buffer.
*/ */
memcpy(cmd->sense_buffer, cp->sense_buf, 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)) { if (DEBUG_FLAGS & (DEBUG_RESULT|DEBUG_TINY)) {
u_char * p = (u_char*) & cmd->sense_buffer; u_char * p = (u_char*) & cmd->sense_buffer;
......
...@@ -62,9 +62,6 @@ ...@@ -62,9 +62,6 @@
** driver includes this file. ** driver includes this file.
*/ */
#define MIN(a,b) (((a) < (b)) ? (a) : (b))
#define MAX(a,b) (((a) > (b)) ? (a) : (b))
/*========================================================== /*==========================================================
** **
** Hmmm... What complex some PCI-HOST bridges actually ** Hmmm... What complex some PCI-HOST bridges actually
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment