mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-19 21:56:31 +00:00
Avoid that the checkpatch.pl script as included in Linux kernel 3.1
complains about min((int)(a), (int)(b)) that should be changed into min_t(int, (a), (b)). BSD-signed-off-by: Bart Van Assche <bvanassche@acm.org> git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3944 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -1497,7 +1497,7 @@ static int dev_user_process_reply_exec(struct scst_user_cmd *ucmd,
|
||||
if (res != 0)
|
||||
goto out_compl;
|
||||
|
||||
sense_len = min((int)cmd->sense_buflen, (int)ereply->sense_len);
|
||||
sense_len = min_t(int, cmd->sense_buflen, ereply->sense_len);
|
||||
|
||||
rc = copy_from_user(cmd->sense,
|
||||
(void __user *)(unsigned long)ereply->psense_buffer,
|
||||
|
||||
+1
-1
@@ -6144,7 +6144,7 @@ static void __scst_check_set_UA(struct scst_tgt_dev *tgt_dev,
|
||||
{
|
||||
int skip_UA = 0;
|
||||
struct scst_tgt_dev_UA *UA_entry_tmp;
|
||||
int len = min((int)sizeof(UA_entry_tmp->UA_sense_buffer), sense_len);
|
||||
int len = min_t(int, sizeof(UA_entry_tmp->UA_sense_buffer), sense_len);
|
||||
|
||||
TRACE_ENTRY();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user