Fix 3.3 checkpatch warnings about min()and max()

Fix three occurrences of the following warnings reported by the checkpatch
script included with Linux kernel version 3.3:
WARNING: min() should probably be min_t()
WARNING: max() should probably be max_t()

Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4172 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2012-03-27 01:46:51 +00:00
parent 5a6928fc2b
commit 49c56244a1
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -3920,7 +3920,7 @@ int iscsi_threads_pool_get(const cpumask_t *cpu_mask,
INIT_LIST_HEAD(&p->threads_list);
if (cpu_mask == NULL)
count = max((int)num_online_cpus(), 2);
count = max_t(int, num_online_cpus(), 2);
else {
count = 0;
for_each_cpu(i, cpu_mask)
+4 -4
View File
@@ -2584,8 +2584,8 @@ static void q2x_init_ctio_ret_entry(ctio_ret_entry_t *ctio_m1,
{
TRACE_ENTRY();
prm->sense_buffer_len = min((uint32_t)prm->sense_buffer_len,
(uint32_t)sizeof(ctio_m1->sense_data));
prm->sense_buffer_len = min_t(uint32_t, prm->sense_buffer_len,
sizeof(ctio_m1->sense_data));
ctio_m1->flags = cpu_to_le16(OF_SSTS | OF_FAST_POST |
OF_NO_DATA | OF_SS_MODE_1);
@@ -2791,8 +2791,8 @@ static void q24_init_ctio_ret_entry(ctio7_status0_entry_t *ctio,
TRACE_ENTRY();
prm->sense_buffer_len = min((uint32_t)prm->sense_buffer_len,
(uint32_t)sizeof(ctio1->sense_data));
prm->sense_buffer_len = min_t(uint32_t, prm->sense_buffer_len,
sizeof(ctio1->sense_data));
ctio->flags |= cpu_to_le16(CTIO7_FLAGS_SEND_STATUS);
if (q2t_need_explicit_conf(prm->tgt->ha, prm->cmd, 0)) {
ctio->flags |= cpu_to_le16(