From: <vl...@us...> - 2011-12-02 02:15:05
|
Revision: 3944 http://scst.svn.sourceforge.net/scst/?rev=3944&view=rev Author: vlnb Date: 2011-12-02 02:14:59 +0000 (Fri, 02 Dec 2011) Log Message: ----------- 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 <bva...@ac...> Modified Paths: -------------- trunk/scst/src/dev_handlers/scst_user.c trunk/scst/src/scst_lib.c Modified: trunk/scst/src/dev_handlers/scst_user.c =================================================================== --- trunk/scst/src/dev_handlers/scst_user.c 2011-12-01 03:36:15 UTC (rev 3943) +++ trunk/scst/src/dev_handlers/scst_user.c 2011-12-02 02:14:59 UTC (rev 3944) @@ -1497,7 +1497,7 @@ 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, Modified: trunk/scst/src/scst_lib.c =================================================================== --- trunk/scst/src/scst_lib.c 2011-12-01 03:36:15 UTC (rev 3943) +++ trunk/scst/src/scst_lib.c 2011-12-02 02:14:59 UTC (rev 3944) @@ -6144,7 +6144,7 @@ { 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(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |