staging: rtl8192e: Replace ?: with max_t
authorMateusz Kulikowski <mateusz.kulikowski@gmail.com>
Sun, 31 May 2015 18:19:45 +0000 (20:19 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 31 May 2015 21:33:22 +0000 (06:33 +0900)
Improve readability and make checkpatch happy.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192e/rtllib_rx.c

index 588c6d7cf2f9ac6f2661690d36548898169e5149..2280d1809ffec5f4ba9a1da7121e96d35c915869 100644 (file)
@@ -1685,7 +1685,7 @@ static int rtllib_qos_convert_ac_to_parameters(struct rtllib_qos_parameter_info
                qos_param->aifs[aci] = (ac_params->aci_aifsn) & 0x0f;
 
                /* WMM spec P.11: The minimum value for AIFSN shall be 2 */
-               qos_param->aifs[aci] = (qos_param->aifs[aci] < 2) ? 2 : qos_param->aifs[aci];
+               qos_param->aifs[aci] = max_t(u8, qos_param->aifs[aci], 2);
 
                qos_param->cw_min[aci] = cpu_to_le16(ac_params->ecw_min_max &
                                                     0x0F);