Message ID | 20230123205342.229589-7-martin@kaiser.cx |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1811171wrn; Mon, 23 Jan 2023 12:56:38 -0800 (PST) X-Google-Smtp-Source: AMrXdXtDdj7dEbu0ICvMsROe9Au3sSgPERtU3V3GW2uLt/xtIK4N5231cmyymkrIg5cg9baX0pLc X-Received: by 2002:a17:907:7da0:b0:86d:67b0:6292 with SMTP id oz32-20020a1709077da000b0086d67b06292mr39558529ejc.73.1674507398741; Mon, 23 Jan 2023 12:56:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674507398; cv=none; d=google.com; s=arc-20160816; b=vgv+gtDFBl3+7rdblTeBL2R/k7PMx5z5UihM4JRjaPlo/4nskexF2MeN830ppOCmqi C8B5iN2C2Fyytx3FUnenemy4MWX7WFFcRd2mN9zNHU0Nw5PKFTnH+p8AHdpVRS3aXed+ VZVCr0yN7mRsrc3w2P9L6YotXu06mMrCAP9V+/FMJJDpwkl/70N2wC9MFP7McHlmDcU8 ti7sDVp2uJBpE80L8xggQMnWvezeZZn80bKkuwIveDKHGOxD7Red9Zc+slyqS9r/1juT CD4hAnx6DE6wWy3ikTpF+BXOSpe4VE0E65zbcBJsEBK1rx++Hu13gx6nyqSkFMSrCBc1 BOng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=szs8S7KSXP1TOq+m4SYmaEQUvK++YtXkl0CkpnUhKv4=; b=AMOC5LDdVESRTJiWKokG9PTIhqacwRPKd0qYuAZ3/lj3IgbW6XAMm5DK5xdHu/55JP AmkIRmbC9kLCFLWJ+P44eFSucHDwdLRsb5+372OcdcTPmBlogjxeABUYmSOrt2XIRYGD 5hvcWJhbpOzlQcCheCJzTO8hZuGe9qKLTG5/DgytnmbiOFAQI8RmUB+qDYd5DYETXuTa cb/LkMqmMJgXPg4wOdy3WfQCRO44fTNtIQSp0barqlO5jG9RA2lDGGlaB0Kf2QSfqGbs dmurvle/MrYQpAG2R33O7YwxOpCvTZPNEjF+JXInQlh3/Dd9Eeu51rkzG73k69SB2pCb +idw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s4-20020a17090699c400b008778924dd6csi14584228ejn.954.2023.01.23.12.56.14; Mon, 23 Jan 2023 12:56:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232139AbjAWUyT (ORCPT <rfc822;rust.linux@gmail.com> + 99 others); Mon, 23 Jan 2023 15:54:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231819AbjAWUyG (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 23 Jan 2023 15:54:06 -0500 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 C982C23D9F for <linux-kernel@vger.kernel.org>; Mon, 23 Jan 2023 12:54:05 -0800 (PST) Received: from ipservice-092-217-089-134.092.217.pools.vodafone-ip.de ([92.217.89.134] 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 <martin@kaiser.cx>) id 1pK3pI-0000Lk-13; Mon, 23 Jan 2023 21:54:00 +0100 From: Martin Kaiser <martin@kaiser.cx> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Larry Finger <Larry.Finger@lwfinger.net>, Phillip Potter <phil@philpotter.co.uk>, Michael Straube <straube.linux@gmail.com>, Pavel Skripkin <paskripkin@gmail.com>, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser <martin@kaiser.cx> Subject: [PATCH 06/23] staging: r8188eu: simplify the code to initialise inx Date: Mon, 23 Jan 2023 21:53:25 +0100 Message-Id: <20230123205342.229589-7-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230123205342.229589-1-martin@kaiser.cx> References: <20230123205342.229589-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755848270295705047?= X-GMAIL-MSGID: =?utf-8?q?1755848270295705047?= |
Series |
staging: r8188eu: some more xmit cleanups
|
|
Commit Message
Martin Kaiser
Jan. 23, 2023, 8:53 p.m. UTC
Simplify the code to initialise the inx array in function
rtw_dequeue_xframe and make the code a tiny bit smaller.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
drivers/staging/r8188eu/core/rtw_xmit.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c index b07a1ce21a38..30bc9405356d 100644 --- a/drivers/staging/r8188eu/core/rtw_xmit.c +++ b/drivers/staging/r8188eu/core/rtw_xmit.c @@ -1384,15 +1384,11 @@ struct xmit_frame *rtw_dequeue_xframe(struct xmit_priv *pxmitpriv, struct hw_xmi struct xmit_frame *pxmitframe = NULL; struct adapter *padapter = pxmitpriv->adapter; struct registry_priv *pregpriv = &padapter->registrypriv; - int i, inx[4]; - - inx[0] = 0; inx[1] = 1; inx[2] = 2; inx[3] = 3; + int i, inx[] = { 0, 1, 2, 3 }; if (pregpriv->wifi_spec == 1) { - int j; - - for (j = 0; j < 4; j++) - inx[j] = pxmitpriv->wmm_para_seq[j]; + for (i = 0; i < ARRAY_SIZE(inx); i++) + inx[i] = pxmitpriv->wmm_para_seq[i]; } spin_lock_bh(&pxmitpriv->lock);