Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752514AbbL0Q47 (ORCPT ); Sun, 27 Dec 2015 11:56:59 -0500 Received: from mail-lb0-f174.google.com ([209.85.217.174]:35029 "EHLO mail-lb0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751765AbbL0Q45 (ORCPT ); Sun, 27 Dec 2015 11:56:57 -0500 Date: Sun, 27 Dec 2015 23:58:53 +0700 From: Ivan Safonov To: Johnny Kim Cc: Austin Shin , Chris Park , Tony Cho , Glen Lee , Leo Kim , Greg Kroah-Hartman , linux-wireless@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] staging: wilc1000: min_t macro instead of ternary condition operator used Message-ID: <20151227165853.GA22264@alpha.sfu-kras.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1486 Lines: 37 min_t macro bit shorter then ?: operator. Signed-off-by: Ivan Safonov --- drivers/staging/wilc1000/host_interface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 8c77520..5a770bb 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -4570,7 +4570,7 @@ static void *host_int_ParseJoinBssParam(tstrNetworkInfo *ptstrNetworkInfo) pNewJoinBssParam->rsn_grp_policy = pu8IEs[rsnIndex]; rsnIndex++; jumpOffset = pu8IEs[rsnIndex] * 4; - pcipherCount = (pu8IEs[rsnIndex] > 3) ? 3 : pu8IEs[rsnIndex]; + pcipherCount = min_t(u8, pu8IEs[rsnIndex], 3); rsnIndex += 2; for (i = pcipherTotalCount, j = 0; i < pcipherCount + pcipherTotalCount && i < 3; i++, j++) @@ -4581,7 +4581,7 @@ static void *host_int_ParseJoinBssParam(tstrNetworkInfo *ptstrNetworkInfo) jumpOffset = pu8IEs[rsnIndex] * 4; - authCount = (pu8IEs[rsnIndex] > 3) ? 3 : pu8IEs[rsnIndex]; + authCount = min_t(u8, pu8IEs[rsnIndex], 3); rsnIndex += 2; for (i = authTotalCount, j = 0; i < authTotalCount + authCount; i++, j++) -- 2.4.10 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/