Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp204056rdh; Wed, 25 Oct 2023 22:45:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFHPR21kk2qU7S9cSqjzjm1NMUhSPOc2UZKCIPiMfrWl2XArDKWFtTxI5f89IWh0cXHe7yj X-Received: by 2002:a05:6102:1046:b0:457:bda2:d667 with SMTP id h6-20020a056102104600b00457bda2d667mr15827019vsq.12.1698299137078; Wed, 25 Oct 2023 22:45:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698299137; cv=none; d=google.com; s=arc-20160816; b=NON6Wy92M0IyRB2EpXLd1n1uG89TjY8BIGVKADEiE2oBF6kKHHxB1ahIFGsCLJJ7lp MaOZDdZToQjqreR+yGUySaPx/K5ZDUR92NW5z38qf4XutwI+VXAEZUtZz/f6cWgsnkN/ o4DelXBBfKwVRyiglSw63iUOEP8X5RBQc1gaJd59nSzLW+1J0vc42zuwCIVp3v+rfE97 f1QXLa+Zec4mI/i89BSbWHKofiUeMXyWMDYZ4X7vybAF6tVw56XIJ2z3cFFfMkZPVRHF FmxnR1ccXVZE9Y8ez6e3jLA6WRJT8KoGbIGSLAtSOs3qTsoy52GPU+jJSb4g5SYHhBX5 QcfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:to:from:date:dkim-signature; bh=imLoq3QOIDWhZVVFMyITjeWZi//HhodEfugMiQeWmFQ=; fh=Sw1rtAM+hKyOoOQVYiiLzcdjc4spg79Z/tN6UmWUAKs=; b=DtOeuegw9JC4zG+2Ul82Qp3uPwmCFe5Avif8hQQb/Mf+UYozEaMwOcA8o+lEmlCjVN EMvVMv/pra3vmU935zUydvMI91EoT9qYQQCQAIzaeCNMKb/f+4msgSELagpswLc+bDGk 2+hx1MpiZL9eLQgGJE/g4eM1wekJJ+yrI1Aid9KTY0Z9CiLsZ7oGgGQZGshekRcbAlXw jS/1Ck7WyAX6+nQ+jShQp+y3DZ1W4Y/3JXvqFgZ9071ggW2rP6OZnbhbLWMHN5sNU87P 5nEcEi3T0s+IOAvPZ0qO4Uuijxr2HE+To9+E8Nouc0AtMo6N8KQ8Pyy+fHhCutUeURgt ph+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=NMnGdXhE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id q6-20020a056902150600b00d9a53f25be8si18548497ybu.179.2023.10.25.22.45.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 22:45:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=NMnGdXhE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id A88AB81A4FF3; Wed, 25 Oct 2023 22:45:33 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344448AbjJZFou (ORCPT + 99 others); Thu, 26 Oct 2023 01:44:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343906AbjJZFob (ORCPT ); Thu, 26 Oct 2023 01:44:31 -0400 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ABD07189 for ; Wed, 25 Oct 2023 22:44:21 -0700 (PDT) Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-54115c72f78so116127a12.1 for ; Wed, 25 Oct 2023 22:44:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698299060; x=1698903860; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=imLoq3QOIDWhZVVFMyITjeWZi//HhodEfugMiQeWmFQ=; b=NMnGdXhEBz3HXa38KqE9v8Zi90Xp6CXEk35P4CU6qKf1IuaIuC1D1sSG5nMwDDulrO raWH11a1DBOlVE3ljrn7ou+PBw3GT4cJdhWXxyf4qeSAsmbxbDi1NZ207iUzeQJFOW9l eOxc79uX3GGR1wY0D4retDWKEptnK3GgaOsWMgqd4u234ekskNAB1R6aBu38JxKYvA+X KSfEawE9GjpaORJCk2QsxwMxTsoCPsYPuE4eHXY8HML+XaYG/FTc7C9yfxdzsvkTD6Po BZm98IRiew7PbYBRXYJo2ZQUFgFslJUiCvJ/XnieC0+0tSEDMl5Matqkch5cI3vfZM2Z NTEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698299060; x=1698903860; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=imLoq3QOIDWhZVVFMyITjeWZi//HhodEfugMiQeWmFQ=; b=owSo4nkKUYiiUnS+w/auELgDIwD2iCrgJVw94p0c1zpsMdvaWdSnTQWWR2bPfbAp7n 7DoZTRl0qAL+3EB4s8oWLPCKnVJewAM60QyoxHdvP69MMK5DM1ok1/9IDz89q5EWDvDU IhKL0jh3jTCs72RcVvPcjWs/dVfMExit+/iklPEmZ3QuNXeBYJ5grJyUcE8Jtu/iNihi yF+kbTwC10jHYd+naO7Tvar++7i4MWDZpkKfff/6+oDrQfGEucITbj4BoGabMPlXpFZq IUzbzsjV3/JCdA4qKcw3jGu9TwAjt/Tf9FwAtwDgzAwpvApGgkSKGG11TLA43+cUQxqZ 6VNg== X-Gm-Message-State: AOJu0YwTjsiEKAkEaXWWWPu0GJ65Z+X0CCYmF93y+Zf8xDKYlTU1n8ch OjkD7ES8rsUcJ1BUJveVl7NYoytXakI= X-Received: by 2002:a17:906:59a5:b0:9cb:798f:91e8 with SMTP id m37-20020a17090659a500b009cb798f91e8mr5736638ejs.6.1698299059999; Wed, 25 Oct 2023 22:44:19 -0700 (PDT) Received: from matrix-ESPRIMO-P710 (p579356c7.dip0.t-ipconnect.de. [87.147.86.199]) by smtp.gmail.com with ESMTPSA id n13-20020a17090673cd00b00991faf3810esm11261518ejl.146.2023.10.25.22.44.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 22:44:19 -0700 (PDT) Date: Thu, 26 Oct 2023 07:44:18 +0200 From: Philipp Hortmann To: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 08/10] staging: rtl8192e: Convert array rx_ring_dma[] to variable rx_ring_dma Message-ID: <51d3be0a715452cefe5ac6dd29a86fbe65b824fa.1698295861.git.philipp.g.hortmann@gmail.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Wed, 25 Oct 2023 22:45:33 -0700 (PDT) Convert array rx_ring_dma[] to variable rx_ring_dma as index is always 0. This increases readability. Signed-off-by: Philipp Hortmann --- drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 2 +- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 4 ++-- drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c index e343e10e011a..e93394c51264 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c @@ -1841,7 +1841,7 @@ void rtl92e_enable_rx(struct net_device *dev) { struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv(dev); - rtl92e_writel(dev, RDQDA, priv->rx_ring_dma[RX_MPDU_QUEUE]); + rtl92e_writel(dev, RDQDA, priv->rx_ring_dma); } static const u32 TX_DESC_BASE[] = { diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c index 573d548e44d8..8af732870ddf 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -1159,7 +1159,7 @@ static void _rtl92e_free_rx_ring(struct net_device *dev) dma_free_coherent(&priv->pdev->dev, sizeof(*priv->rx_ring) * priv->rxringcount, priv->rx_ring, - priv->rx_ring_dma[rx_queue_idx]); + priv->rx_ring_dma); priv->rx_ring = NULL; } @@ -1356,7 +1356,7 @@ static short _rtl92e_alloc_rx_ring(struct net_device *dev) priv->rx_ring = dma_alloc_coherent(&priv->pdev->dev, sizeof(*priv->rx_ring) * priv->rxringcount, - &priv->rx_ring_dma[rx_queue_idx], + &priv->rx_ring_dma, GFP_ATOMIC); if (!priv->rx_ring || (unsigned long)priv->rx_ring & 0xFF) { netdev_warn(dev, "Cannot allocate RX ring\n"); diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h index 2a99873fbe90..b3ebff2df62a 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h @@ -234,7 +234,7 @@ struct r8192_priv { struct rx_desc *rx_ring; struct sk_buff *rx_buf[MAX_RX_COUNT]; - dma_addr_t rx_ring_dma[MAX_RX_QUEUE]; + dma_addr_t rx_ring_dma; unsigned int rx_idx[MAX_RX_QUEUE]; int rxringcount; u16 rxbuffersize; -- 2.42.0