From nobody Mon Feb 9 20:30:07 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6B3BDC433F5 for ; Sat, 14 May 2022 16:48:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234215AbiENQsF (ORCPT ); Sat, 14 May 2022 12:48:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234374AbiENQry (ORCPT ); Sat, 14 May 2022 12:47:54 -0400 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 694D6326D1 for ; Sat, 14 May 2022 09:47:53 -0700 (PDT) Received: from dslb-188-097-047-153.188.097.pools.vodafone-ip.de ([188.97.47.153] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1npuvl-0003kw-CW; Sat, 14 May 2022 18:47:49 +0200 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 4/7] staging: r8188eu: replace if with ternary operator Date: Sat, 14 May 2022 18:47:37 +0200 Message-Id: <20220514164740.282552-5-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220514164740.282552-1-martin@kaiser.cx> References: <20220514164740.282552-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Replace an if statement with a ternary operator, making the code a tiny bit shorter. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/= r8188eu/core/rtw_mlme_ext.c index 77f229121b4d..d5ea074c62f4 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -1503,10 +1503,8 @@ unsigned int OnAction_back(struct adapter *padapter,= struct recv_frame *precv_fr preorder_ctrl->indicate_seq =3D 0xffff; preorder_ctrl->enable =3D pmlmeinfo->bAcceptAddbaReq; =20 - if (pmlmeinfo->bAcceptAddbaReq) - issue_action_BA(padapter, mgmt->sa, WLAN_ACTION_ADDBA_RESP, 0); - else - issue_action_BA(padapter, mgmt->sa, WLAN_ACTION_ADDBA_RESP, 37);/* reje= ct ADDBA Req */ + issue_action_BA(padapter, mgmt->sa, WLAN_ACTION_ADDBA_RESP, + pmlmeinfo->bAcceptAddbaReq ? 0 : 37); break; case WLAN_ACTION_ADDBA_RESP: tid =3D u16_get_bits(le16_to_cpu(mgmt->u.action.u.addba_resp.capab), --=20 2.30.2