From patchwork Thu Nov 10 10:35:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacob Bai X-Patchwork-Id: 18060 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp66533wru; Thu, 10 Nov 2022 02:39:23 -0800 (PST) X-Google-Smtp-Source: AMsMyM5kICv8pS7ACaf5BxZ4PGEftsU6enjNejlti9O03l4QWu/2+LQyBuKF0L0qRBzK/4uBmJ/K X-Received: by 2002:aa7:dbc6:0:b0:464:6bce:97c with SMTP id v6-20020aa7dbc6000000b004646bce097cmr29402710edt.310.1668076762954; Thu, 10 Nov 2022 02:39:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668076762; cv=none; d=google.com; s=arc-20160816; b=KAvIOxpKXA1r3tg84YhskfXaBWZ99gPbEw4ok7XOGxeLKsgoXYSsyyOq7MPFchx2u0 eWNwV9IxH72aJs5c7F5UMz2H+xL1OdlaBOwWKt65idhLFk4Fd/mNiZzXUodRxG4auRXQ jdRYJkQCEx7hxx0FHDNT/MhB4bV9tMR1qfB1DjwsTvHvwqEJk82rlhMh1r5mIMZN4eV2 XZ/yKZRi1wHmDnZZXdkk0SZfgWW2MC2uQUKGqQ3W3O3On1IuPimhUPyvvNT9ANuwGZuM PCFbWsZCC7XyNnuSRXYOHWzTyL+YDfhyyzJ2WiA61Jx48yze+vtsqZbUdD3jCXHaN89H kewQ== 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:to:from :dkim-signature; bh=XN+Q6Uz1Z9DwS84wbHOEHzmi43ielaLqgyLWhdiQqew=; b=Z2oxvNJnEHzlb5I5OWIyzbFy5bw+jLUtzbtF2Lth1kygCXwyYVEt5/u8crlHZpdnE+ WCe3JLBGoiMFuH3hTsCk5H4nFC7cMVfkqJqRm+INqr2TmNEPQiSsmshZbOovjSS8W34o apu/SMC0VHsVcNqXQtui9rDPNC4Tsq3YsoILOb/2+g+NJN2T3C2fnv4IW/AT1sjJL1y0 TOBTy8XfLgXl9MiZQdgeZYp98jarBuGrsMiEtZ32q1HVE+O1rXIQ30OtTApADto8nc6m 5tmE3C0ZH6reagn0d0otH9s+w+1DGVCvAgSy2ks39pdLC8X/ILV64wjb4OGc//fs0ESz D8hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=dT4dsMO7; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m13-20020a056402430d00b00458bbd3a0d2si20713137edc.602.2022.11.10.02.38.59; Thu, 10 Nov 2022 02:39:22 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=dT4dsMO7; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229601AbiKJKfZ (ORCPT + 99 others); Thu, 10 Nov 2022 05:35:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229873AbiKJKfW (ORCPT ); Thu, 10 Nov 2022 05:35:22 -0500 Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7F606C729 for ; Thu, 10 Nov 2022 02:35:20 -0800 (PST) Received: by mail-pf1-x42b.google.com with SMTP id m6so1655270pfb.0 for ; Thu, 10 Nov 2022 02:35:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=XN+Q6Uz1Z9DwS84wbHOEHzmi43ielaLqgyLWhdiQqew=; b=dT4dsMO76xg61VXBbs4oAcxX7aWNAp6h9PhuTAJ8c7/GSY+MM6ZLl5EfZ41SlhWAet VuHzD//m9n+nB5DT0BQM9nHZ35/w2XetGv5A1WfCDmK1VQXqhFIPenC6dd2hY5h9e51c L/NKcgdF/w9oUpCqLVKol3dYKF4InQRMkcmvZv+YUm6kOQo5vhF5UEeNhd2lgZBnhPbk 7uCGad1Ad+IFcEfhJM00gwiHK0srr1/BBN/YHkzKHo1xEEKU+ps/wpI1CHUUEzMVoRpK rV7iCwAKOohk78Ww+m0Kzq9eWjXEHTdP4vG5nZTEIz53hGX2L1I07I/CIUdeuTw8KFCK qJ7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XN+Q6Uz1Z9DwS84wbHOEHzmi43ielaLqgyLWhdiQqew=; b=17ZjmYa+av0jFdjj1w12UxfYzTPMGU6fvTf2fdZb2GIN74T16qTwO887mUTpVb/HpG l8lYRhCml32EkojRUSBLs75qwHEIrVY7zAa0G8+WWOCARfaSTgan4FzjayEWl2gRFtW9 aiO6LvIlEKU1UUNd9CqbRU4rjo4e77w3IBxLVUvajiK66LycXeR5DCHmax1VTduYy2w0 itQnfHHG8Xidb0bfpOvn21PJJqPIcRE1rR5Xi+8TLA7v62JMTax+dztS2Sg84V9jGBvo p22izcGSjKZGlUlvusqBnC9/P5DhOrmeQF6EYf9dq14vmHehL6BZETkdaZv1rT+sEAn2 8bkg== X-Gm-Message-State: ACrzQf1g68y0arHct3Y8xyDAvc1nwkix86z3VOdfPgRadHBd9mO1NK9+ 8i5awb2A+um32mpOp/DZZzrkzjnR4vRsVw== X-Received: by 2002:a63:1b10:0:b0:46f:b888:164f with SMTP id b16-20020a631b10000000b0046fb888164fmr2196094pgb.386.1668076519627; Thu, 10 Nov 2022 02:35:19 -0800 (PST) Received: from jacob-Ubuntu (126.224.215.218.sta.wbroadband.net.au. [218.215.224.126]) by smtp.gmail.com with ESMTPSA id y18-20020a170902b49200b001769206a766sm10764112plr.307.2022.11.10.02.35.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Nov 2022 02:35:19 -0800 (PST) From: Jacob Bai To: gregkh@linuxfoundation.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v5 1/2] staging: rtl8192e: rename tables in r8192e_hwimg.c Date: Thu, 10 Nov 2022 21:35:10 +1100 Message-Id: <01eb4d9cb22be5f76aa39eedd406577cdfd9f486.1668075486.git.jacob.bai.au@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749105259687705743?= X-GMAIL-MSGID: =?utf-8?q?1749105259687705743?= fix camel case issue. Signed-off-by: Jacob Bai --- .../staging/rtl8192e/rtl8192e/r8192E_hwimg.c | 18 +++++----- .../staging/rtl8192e/rtl8192e/r8192E_hwimg.h | 36 +++++++++---------- .../staging/rtl8192e/rtl8192e/r8192E_phy.h | 36 +++++++++---------- 3 files changed, 45 insertions(+), 45 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.c index e6fce749e65b..8920283f340e 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.c @@ -6,9 +6,9 @@ */ #include "r8192E_hwimg.h" -u32 Rtl8192PciEPHY_REGArray[PHY_REGArrayLengthPciE] = {0x0,}; +u32 RTL8192E_PHY_REG_ARRAY[RTL8192E_PHY_REG_ARRAY_LEN] = {0x0,}; -u32 Rtl8192PciEPHY_REG_1T2RArray[PHY_REG_1T2RArrayLengthPciE] = { +u32 RTL8192E_PHY_REG_1T2R_ARRAY[RTL8192E_PHY_REG_1T2R_ARRAY_LEN] = { 0x800, 0x00000000, 0x804, 0x00000001, 0x808, 0x0000fc00, @@ -159,7 +159,7 @@ u32 Rtl8192PciEPHY_REG_1T2RArray[PHY_REG_1T2RArrayLengthPciE] = { 0xe1c, 0x12121416, }; -u32 Rtl8192PciERadioA_Array[RadioA_ArrayLengthPciE] = { +u32 RTL8192E_RADIOA_ARRAY[RTL8192E_RADIOA_ARRAY_LEN] = { 0x019, 0x00000003, 0x000, 0x000000bf, 0x001, 0x00000ee0, @@ -285,7 +285,7 @@ u32 Rtl8192PciERadioA_Array[RadioA_ArrayLengthPciE] = { 0x007, 0x00000700, }; -u32 Rtl8192PciERadioB_Array[RadioB_ArrayLengthPciE] = { +u32 RTL8192E_RADIOB_ARRAY[RTL8192E_RADIOB_ARRAY_LEN] = { 0x019, 0x00000003, 0x000, 0x000000bf, 0x001, 0x000006e0, @@ -327,13 +327,13 @@ u32 Rtl8192PciERadioB_Array[RadioB_ArrayLengthPciE] = { 0x007, 0x00000700, }; -u32 Rtl8192PciERadioC_Array[RadioC_ArrayLengthPciE] = { +u32 RTL8192E_RADIOC_ARRAY[RTL8192E_RADIOC_ARRAY_LEN] = { 0x0, }; -u32 Rtl8192PciERadioD_Array[RadioD_ArrayLengthPciE] = { +u32 RTL8192E_RADIOD_ARRAY[RTL8192E_RADIOD_ARRAY_LEN] = { 0x0, }; -u32 Rtl8192PciEMACPHY_Array[] = { +u32 RTL8192E_MAC_ARRAY[RTL8192E_MAC_ARRAY_LEN] = { 0x03c, 0xffff0000, 0x00000f0f, 0x340, 0xffffffff, 0x161a1a1a, 0x344, 0xffffffff, 0x12121416, @@ -342,7 +342,7 @@ u32 Rtl8192PciEMACPHY_Array[] = { 0x318, 0x00000fff, 0x00000100, }; -u32 Rtl8192PciEMACPHY_Array_PG[] = { +u32 RTL8192E_MAC_ARRAY_PG[RTL8192E_MAC_ARRAY_PG_LEN] = { 0x03c, 0xffff0000, 0x00000f0f, 0xe00, 0xffffffff, 0x06090909, 0xe04, 0xffffffff, 0x00030306, @@ -355,7 +355,7 @@ u32 Rtl8192PciEMACPHY_Array_PG[] = { 0x318, 0x00000fff, 0x00000800, }; -u32 Rtl8192PciEAGCTAB_Array[AGCTAB_ArrayLengthPciE] = { +u32 RTL8192E_AGC_TAB_ARRAY[RTL8192E_AGC_TAB_ARRAY_LEN] = { 0xc78, 0x7d000001, 0xc78, 0x7d010001, 0xc78, 0x7d020001, diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.h b/drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.h index 7d63f5a5c1b7..a436c089a779 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.h +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.h @@ -11,23 +11,23 @@ #include -#define PHY_REGArrayLengthPciE 1 -extern u32 Rtl8192PciEPHY_REGArray[PHY_REGArrayLengthPciE]; -#define PHY_REG_1T2RArrayLengthPciE 296 -extern u32 Rtl8192PciEPHY_REG_1T2RArray[PHY_REG_1T2RArrayLengthPciE]; -#define RadioA_ArrayLengthPciE 246 -extern u32 Rtl8192PciERadioA_Array[RadioA_ArrayLengthPciE]; -#define RadioB_ArrayLengthPciE 78 -extern u32 Rtl8192PciERadioB_Array[RadioB_ArrayLengthPciE]; -#define RadioC_ArrayLengthPciE 2 -extern u32 Rtl8192PciERadioC_Array[RadioC_ArrayLengthPciE]; -#define RadioD_ArrayLengthPciE 2 -extern u32 Rtl8192PciERadioD_Array[RadioD_ArrayLengthPciE]; -#define MACPHY_ArrayLengthPciE 18 -extern u32 Rtl8192PciEMACPHY_Array[MACPHY_ArrayLengthPciE]; -#define MACPHY_Array_PGLengthPciE 30 -extern u32 Rtl8192PciEMACPHY_Array_PG[MACPHY_Array_PGLengthPciE]; -#define AGCTAB_ArrayLengthPciE 384 -extern u32 Rtl8192PciEAGCTAB_Array[AGCTAB_ArrayLengthPciE]; +#define RTL8192E_PHY_REG_ARRAY_LEN 1 +extern u32 RTL8192E_PHY_REG_ARRAY[RTL8192E_PHY_REG_ARRAY_LEN]; +#define RTL8192E_PHY_REG_1T2R_ARRAY_LEN 296 +extern u32 RTL8192E_PHY_REG_1T2R_ARRAY[RTL8192E_PHY_REG_1T2R_ARRAY_LEN]; +#define RTL8192E_RADIOA_ARRAY_LEN 246 +extern u32 RTL8192E_RADIOA_ARRAY[RTL8192E_RADIOA_ARRAY_LEN]; +#define RTL8192E_RADIOB_ARRAY_LEN 78 +extern u32 RTL8192E_RADIOB_ARRAY[RTL8192E_RADIOB_ARRAY_LEN]; +#define RTL8192E_RADIOC_ARRAY_LEN 2 +extern u32 RTL8192E_RADIOC_ARRAY[RTL8192E_RADIOC_ARRAY_LEN]; +#define RTL8192E_RADIOD_ARRAY_LEN 2 +extern u32 RTL8192E_RADIOD_ARRAY[RTL8192E_RADIOD_ARRAY_LEN]; +#define RTL8192E_MAC_ARRAY_LEN 18 +extern u32 RTL8192E_MAC_ARRAY[RTL8192E_MAC_ARRAY_LEN]; +#define RTL8192E_MAC_ARRAY_PG_LEN 30 +extern u32 RTL8192E_MAC_ARRAY_PG[RTL8192E_MAC_ARRAY_PG_LEN]; +#define RTL8192E_AGC_TAB_ARRAY_LEN 384 +extern u32 RTL8192E_AGC_TAB_ARRAY[RTL8192E_AGC_TAB_ARRAY_LEN]; #endif diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h index 75629f5df954..e1c1f19b71a3 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h @@ -9,25 +9,25 @@ #define MAX_DOZE_WAITING_TIMES_9x 64 -#define AGCTAB_ArrayLength AGCTAB_ArrayLengthPciE -#define MACPHY_ArrayLength MACPHY_ArrayLengthPciE -#define RadioA_ArrayLength RadioA_ArrayLengthPciE -#define RadioB_ArrayLength RadioB_ArrayLengthPciE -#define MACPHY_Array_PGLength MACPHY_Array_PGLengthPciE -#define RadioC_ArrayLength RadioC_ArrayLengthPciE -#define RadioD_ArrayLength RadioD_ArrayLengthPciE -#define PHY_REGArrayLength PHY_REGArrayLengthPciE -#define PHY_REG_1T2RArrayLength PHY_REG_1T2RArrayLengthPciE +#define AGCTAB_ArrayLength RTL8192E_AGC_TAB_ARRAY_LEN +#define MACPHY_ArrayLength RTL8192E_MAC_ARRAY_LEN +#define RadioA_ArrayLength RTL8192E_RADIOA_ARRAY_LEN +#define RadioB_ArrayLength RTL8192E_RADIOB_ARRAY_LEN +#define MACPHY_Array_PGLength RTL8192E_MAC_ARRAY_PG_LEN +#define RadioC_ArrayLength RTL8192E_RADIOC_ARRAY_LEN +#define RadioD_ArrayLength RTL8192E_RADIOD_ARRAY_LEN +#define PHY_REGArrayLength RTL8192E_PHY_REG_ARRAY_LEN +#define PHY_REG_1T2RArrayLength RTL8192E_PHY_REG_1T2R_ARRAY_LEN -#define Rtl819XMACPHY_Array_PG Rtl8192PciEMACPHY_Array_PG -#define Rtl819XMACPHY_Array Rtl8192PciEMACPHY_Array -#define Rtl819XRadioA_Array Rtl8192PciERadioA_Array -#define Rtl819XRadioB_Array Rtl8192PciERadioB_Array -#define Rtl819XRadioC_Array Rtl8192PciERadioC_Array -#define Rtl819XRadioD_Array Rtl8192PciERadioD_Array -#define Rtl819XAGCTAB_Array Rtl8192PciEAGCTAB_Array -#define Rtl819XPHY_REGArray Rtl8192PciEPHY_REGArray -#define Rtl819XPHY_REG_1T2RArray Rtl8192PciEPHY_REG_1T2RArray +#define Rtl819XMACPHY_Array_PG RTL8192E_MAC_ARRAY_PG +#define Rtl819XMACPHY_Array RTL8192E_MAC_ARRAY +#define Rtl819XRadioA_Array RTL8192E_RADIOA_ARRAY +#define Rtl819XRadioB_Array RTL8192E_RADIOB_ARRAY +#define Rtl819XRadioC_Array RTL8192E_RADIOC_ARRAY +#define Rtl819XRadioD_Array RTL8192E_RADIOD_ARRAY +#define Rtl819XAGCTAB_Array RTL8192E_AGC_TAB_ARRAY +#define Rtl819XPHY_REGArray RTL8192E_PHY_REG_ARRAY +#define Rtl819XPHY_REG_1T2RArray RTL8192E_PHY_REG_1T2R_ARRAY extern u32 rtl819XAGCTAB_Array[]; From patchwork Thu Nov 10 10:35:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacob Bai X-Patchwork-Id: 18064 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp67305wru; Thu, 10 Nov 2022 02:41:20 -0800 (PST) X-Google-Smtp-Source: AA0mqf5sMRdjtht5Q9MzFe1FJHAZ/tncK45Z8jh7HZLDXnDNlp0W9U7le1pZ8con6y28AoqZwdEr X-Received: by 2002:a17:906:e1b:b0:7ae:6e4b:6c0d with SMTP id l27-20020a1709060e1b00b007ae6e4b6c0dmr14557068eji.98.1668076880632; Thu, 10 Nov 2022 02:41:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668076880; cv=none; d=google.com; s=arc-20160816; b=YJBwEk8lnBLAlwbhau58v+VvHavZCnWG6nHzsqcLZn0eNFzwpv/MjHpysFeY8yce0g sQK5Um9cn6nopt6JnKLNoQ4G97ZkD9ddYKvBdSTvz8uScp/Bagw9S+/9MS2qAABOTmQq 8xlr2UU6orvMto7nUSURmywp6zBcknsK8PUANT39Nv9+M9U8H/kzTfMjP20R316pJP1b RsTn+xcAuMN7sQ9Yn1U8Zzd9QcS922ZUIHUVSc6WN6Mfx/UhoUEOFbywh2ELS7uc4jr4 M6s/enFLgsE8jxxugDrU9WzEP3b7CQ541xBVyl3ighXBGo8PnX1bFsOqbeNW4b3LpSff hyxA== 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:to:from :dkim-signature; bh=B9QXzhrLhDW3RHcvqKL2KC0I9EowigNO1qRdY6DDV+A=; b=iGgzFXpM+rofiCAK0RwbgB2E0Z0iA2ScagkczKFHRMl2niaEVrSNaU26u8RYZ4tDFq XRS18GzgdcPXW3GpHmsQbFi6PwCJDNlbzD16ffgCiJQk5x3Ub4ef41DJ2YPmpw12SA44 sjJa83jmZR3O0f6hJJuGWXkl2rk7p+QO2yh8VpHW9gKvnhlcJvv1eJ4ftd0oQTsOcRar SPRGFIfCm1oApR2XEKA7Q3GlxuP1SyQrk7gnQXkIj8jfK6A2pgHVyl6DxG3xEwC80Eub cKb8BmE6leUcFIZFM9gQy23pBWu4sa00ojhNOTfEtKGRCt0LkMM56ceL2KSE6Ks2WZuX nCHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=MuPr3tbf; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ov4-20020a170906fc0400b0078de51e658esi13987417ejb.208.2022.11.10.02.40.55; Thu, 10 Nov 2022 02:41:20 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=MuPr3tbf; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229918AbiKJKfc (ORCPT + 99 others); Thu, 10 Nov 2022 05:35:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230020AbiKJKf3 (ORCPT ); Thu, 10 Nov 2022 05:35:29 -0500 Received: from mail-pg1-x530.google.com (mail-pg1-x530.google.com [IPv6:2607:f8b0:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A9A5663E1 for ; Thu, 10 Nov 2022 02:35:24 -0800 (PST) Received: by mail-pg1-x530.google.com with SMTP id 136so1419398pga.1 for ; Thu, 10 Nov 2022 02:35:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=B9QXzhrLhDW3RHcvqKL2KC0I9EowigNO1qRdY6DDV+A=; b=MuPr3tbfbxFkIWMMj5tUNTNIGbc7kJOLypJtpArKx7JWS2Q9tjNs37jv1Mtwx79lqR IoEJTG52Rzo4UWCWhWbKfA44s9sddH8BpnqdU8d8mzJfFdZdpmA65Bjn5wk7DE/HzDlI 70DjIXIZABnNq8qUTU8kIKKX3Juqnbo0Q0UXWgqPs8IpXY2nF4wFtRPI0HWy0MfEkcin U0baAVdodfnM7OMGrOyGS/EvPg3b4eRliPCNX5NzZSU0qsM7FcUY7vOKtX9Fv3HrIgSs Nbc3zSP//xTVfq3UAeWly8bj561qHkN5P71wp8crK4jvqMY7qwABamSycSNCebu5EdTc PK6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=B9QXzhrLhDW3RHcvqKL2KC0I9EowigNO1qRdY6DDV+A=; b=IvByLNd6EzJTl6gyoSzkDy2YD/gBDoNeQp+h+3Fp0U551JOKlwNqsgga+sSDmuu4RA F2ljYJTY9Sxr2J8Ux4Ft/wwLIu7EsXIXOu5gqrlcrO3tJFXKiJpLPCPoT8NdF8hLA2oF cT7yd2Nk0gEMRYxafKa+YpBU0i2wyWm1LDsYe3CYafF+0tMSBkthAwv984Os90ckNSDq eg781U4BRkql2f+Lqz1WNH6irRvv4ghcW0Db3ToBl47kyg08glE/zxP6R1g+DOxfb57I gzFWMVfQ/TBi37BMg2l29++TvgoGWJvZGH9CgMiUviMSoAkUfaPj6bTTaOWf5UD5elBY n8IA== X-Gm-Message-State: ACrzQf3zKRsy2Pa/mQ/CCKYLKZuCuKLwoVyDvBAvCcvJ3xqlR3KdZgj1 DOB6FdFfgh9i0cer5BiOAz2fWsSqGG+3Ag== X-Received: by 2002:a63:90c4:0:b0:46f:5a21:3b5d with SMTP id a187-20020a6390c4000000b0046f5a213b5dmr40523313pge.210.1668076523572; Thu, 10 Nov 2022 02:35:23 -0800 (PST) Received: from jacob-Ubuntu (126.224.215.218.sta.wbroadband.net.au. [218.215.224.126]) by smtp.gmail.com with ESMTPSA id n4-20020a63e044000000b0044e8d66ae05sm8879450pgj.22.2022.11.10.02.35.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Nov 2022 02:35:23 -0800 (PST) From: Jacob Bai To: gregkh@linuxfoundation.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v5 2/2] staging: rtl8192e: replace macro defines with variables Date: Thu, 10 Nov 2022 21:35:11 +1100 Message-Id: <354847ce7b2f9ea4dc549bf13656192c1db7c231.1668075486.git.jacob.bai.au@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749105383422182011?= X-GMAIL-MSGID: =?utf-8?q?1749105383422182011?= remove marco defines of array length, use variables instead and initialize them from ARRAY_SIZE(). Signed-off-by: Jacob Bai --- .../staging/rtl8192e/rtl8192e/r8192E_hwimg.c | 31 ++++++++++------ .../staging/rtl8192e/rtl8192e/r8192E_hwimg.h | 36 +++++++++---------- .../staging/rtl8192e/rtl8192e/r8192E_phy.h | 20 ----------- 3 files changed, 38 insertions(+), 49 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.c index 8920283f340e..ec9e2de4c942 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.c @@ -6,9 +6,10 @@ */ #include "r8192E_hwimg.h" -u32 RTL8192E_PHY_REG_ARRAY[RTL8192E_PHY_REG_ARRAY_LEN] = {0x0,}; +u32 RTL8192E_PHY_REG_ARRAY[] = {0x0,}; +u32 RTL8192E_PHY_REG_ARRAY_LEN = ARRAY_SIZE(RTL8192E_PHY_REG_ARRAY); -u32 RTL8192E_PHY_REG_1T2R_ARRAY[RTL8192E_PHY_REG_1T2R_ARRAY_LEN] = { +u32 RTL8192E_PHY_REG_1T2R_ARRAY[] = { 0x800, 0x00000000, 0x804, 0x00000001, 0x808, 0x0000fc00, @@ -158,8 +159,9 @@ u32 RTL8192E_PHY_REG_1T2R_ARRAY[RTL8192E_PHY_REG_1T2R_ARRAY_LEN] = { 0xe18, 0x161a1a1a, 0xe1c, 0x12121416, }; +u32 RTL8192E_PHY_REG_1T2R_ARRAY_LEN = ARRAY_SIZE(RTL8192E_PHY_REG_1T2R_ARRAY); -u32 RTL8192E_RADIOA_ARRAY[RTL8192E_RADIOA_ARRAY_LEN] = { +u32 RTL8192E_RADIOA_ARRAY[] = { 0x019, 0x00000003, 0x000, 0x000000bf, 0x001, 0x00000ee0, @@ -284,8 +286,9 @@ u32 RTL8192E_RADIOA_ARRAY[RTL8192E_RADIOA_ARRAY_LEN] = { 0x004, 0x00000975, 0x007, 0x00000700, }; +u32 RTL8192E_RADIOA_ARRAY_LEN = ARRAY_SIZE(RTL8192E_RADIOA_ARRAY); -u32 RTL8192E_RADIOB_ARRAY[RTL8192E_RADIOB_ARRAY_LEN] = { +u32 RTL8192E_RADIOB_ARRAY[] = { 0x019, 0x00000003, 0x000, 0x000000bf, 0x001, 0x000006e0, @@ -326,14 +329,17 @@ u32 RTL8192E_RADIOB_ARRAY[RTL8192E_RADIOB_ARRAY_LEN] = { 0x004, 0x00000975, 0x007, 0x00000700, }; +u32 RTL8192E_RADIOB_ARRAY_LEN = ARRAY_SIZE(RTL8192E_RADIOB_ARRAY); -u32 RTL8192E_RADIOC_ARRAY[RTL8192E_RADIOC_ARRAY_LEN] = { - 0x0, }; +u32 RTL8192E_RADIOC_ARRAY[] = { + 0x0, 0x0 }; +u32 RTL8192E_RADIOC_ARRAY_LEN = ARRAY_SIZE(RTL8192E_RADIOC_ARRAY); -u32 RTL8192E_RADIOD_ARRAY[RTL8192E_RADIOD_ARRAY_LEN] = { - 0x0, }; +u32 RTL8192E_RADIOD_ARRAY[] = { + 0x0, 0x0 }; +u32 RTL8192E_RADIOD_ARRAY_LEN = ARRAY_SIZE(RTL8192E_RADIOD_ARRAY); -u32 RTL8192E_MAC_ARRAY[RTL8192E_MAC_ARRAY_LEN] = { +u32 RTL8192E_MAC_ARRAY[] = { 0x03c, 0xffff0000, 0x00000f0f, 0x340, 0xffffffff, 0x161a1a1a, 0x344, 0xffffffff, 0x12121416, @@ -341,8 +347,9 @@ u32 RTL8192E_MAC_ARRAY[RTL8192E_MAC_ARRAY_LEN] = { 0x12c, 0xffffffff, 0x04000802, 0x318, 0x00000fff, 0x00000100, }; +u32 RTL8192E_MAC_ARRAY_LEN = ARRAY_SIZE(RTL8192E_MAC_ARRAY); -u32 RTL8192E_MAC_ARRAY_PG[RTL8192E_MAC_ARRAY_PG_LEN] = { +u32 RTL8192E_MAC_ARRAY_PG[] = { 0x03c, 0xffff0000, 0x00000f0f, 0xe00, 0xffffffff, 0x06090909, 0xe04, 0xffffffff, 0x00030306, @@ -354,8 +361,9 @@ u32 RTL8192E_MAC_ARRAY_PG[RTL8192E_MAC_ARRAY_PG_LEN] = { 0x12c, 0xffffffff, 0x04000802, 0x318, 0x00000fff, 0x00000800, }; +u32 RTL8192E_MAC_ARRAY_PG_LEN = ARRAY_SIZE(RTL8192E_MAC_ARRAY_PG); -u32 RTL8192E_AGC_TAB_ARRAY[RTL8192E_AGC_TAB_ARRAY_LEN] = { +u32 RTL8192E_AGC_TAB_ARRAY[] = { 0xc78, 0x7d000001, 0xc78, 0x7d010001, 0xc78, 0x7d020001, @@ -549,3 +557,4 @@ u32 RTL8192E_AGC_TAB_ARRAY[RTL8192E_AGC_TAB_ARRAY_LEN] = { 0xc78, 0x693e001e, 0xc78, 0x6a3f001e, }; +u32 RTL8192E_AGC_TAB_ARRAY_LEN = ARRAY_SIZE(RTL8192E_AGC_TAB_ARRAY); diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.h b/drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.h index a436c089a779..9d2537806460 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.h +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.h @@ -11,23 +11,23 @@ #include -#define RTL8192E_PHY_REG_ARRAY_LEN 1 -extern u32 RTL8192E_PHY_REG_ARRAY[RTL8192E_PHY_REG_ARRAY_LEN]; -#define RTL8192E_PHY_REG_1T2R_ARRAY_LEN 296 -extern u32 RTL8192E_PHY_REG_1T2R_ARRAY[RTL8192E_PHY_REG_1T2R_ARRAY_LEN]; -#define RTL8192E_RADIOA_ARRAY_LEN 246 -extern u32 RTL8192E_RADIOA_ARRAY[RTL8192E_RADIOA_ARRAY_LEN]; -#define RTL8192E_RADIOB_ARRAY_LEN 78 -extern u32 RTL8192E_RADIOB_ARRAY[RTL8192E_RADIOB_ARRAY_LEN]; -#define RTL8192E_RADIOC_ARRAY_LEN 2 -extern u32 RTL8192E_RADIOC_ARRAY[RTL8192E_RADIOC_ARRAY_LEN]; -#define RTL8192E_RADIOD_ARRAY_LEN 2 -extern u32 RTL8192E_RADIOD_ARRAY[RTL8192E_RADIOD_ARRAY_LEN]; -#define RTL8192E_MAC_ARRAY_LEN 18 -extern u32 RTL8192E_MAC_ARRAY[RTL8192E_MAC_ARRAY_LEN]; -#define RTL8192E_MAC_ARRAY_PG_LEN 30 -extern u32 RTL8192E_MAC_ARRAY_PG[RTL8192E_MAC_ARRAY_PG_LEN]; -#define RTL8192E_AGC_TAB_ARRAY_LEN 384 -extern u32 RTL8192E_AGC_TAB_ARRAY[RTL8192E_AGC_TAB_ARRAY_LEN]; +extern u32 RTL8192E_PHY_REG_ARRAY_LEN; +extern u32 RTL8192E_PHY_REG_ARRAY[]; +extern u32 RTL8192E_PHY_REG_1T2R_ARRAY_LEN; +extern u32 RTL8192E_PHY_REG_1T2R_ARRAY[]; +extern u32 RTL8192E_RADIOA_ARRAY_LEN; +extern u32 RTL8192E_RADIOA_ARRAY[]; +extern u32 RTL8192E_RADIOB_ARRAY_LEN; +extern u32 RTL8192E_RADIOB_ARRAY[]; +extern u32 RTL8192E_RADIOC_ARRAY_LEN; +extern u32 RTL8192E_RADIOC_ARRAY[]; +extern u32 RTL8192E_RADIOD_ARRAY_LEN; +extern u32 RTL8192E_RADIOD_ARRAY[]; +extern u32 RTL8192E_MAC_ARRAY_LEN; +extern u32 RTL8192E_MAC_ARRAY[]; +extern u32 RTL8192E_MAC_ARRAY_PG_LEN; +extern u32 RTL8192E_MAC_ARRAY_PG[]; +extern u32 RTL8192E_AGC_TAB_ARRAY_LEN; +extern u32 RTL8192E_AGC_TAB_ARRAY[]; #endif diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h index e1c1f19b71a3..5e6527e835db 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h @@ -9,26 +9,6 @@ #define MAX_DOZE_WAITING_TIMES_9x 64 -#define AGCTAB_ArrayLength RTL8192E_AGC_TAB_ARRAY_LEN -#define MACPHY_ArrayLength RTL8192E_MAC_ARRAY_LEN -#define RadioA_ArrayLength RTL8192E_RADIOA_ARRAY_LEN -#define RadioB_ArrayLength RTL8192E_RADIOB_ARRAY_LEN -#define MACPHY_Array_PGLength RTL8192E_MAC_ARRAY_PG_LEN -#define RadioC_ArrayLength RTL8192E_RADIOC_ARRAY_LEN -#define RadioD_ArrayLength RTL8192E_RADIOD_ARRAY_LEN -#define PHY_REGArrayLength RTL8192E_PHY_REG_ARRAY_LEN -#define PHY_REG_1T2RArrayLength RTL8192E_PHY_REG_1T2R_ARRAY_LEN - -#define Rtl819XMACPHY_Array_PG RTL8192E_MAC_ARRAY_PG -#define Rtl819XMACPHY_Array RTL8192E_MAC_ARRAY -#define Rtl819XRadioA_Array RTL8192E_RADIOA_ARRAY -#define Rtl819XRadioB_Array RTL8192E_RADIOB_ARRAY -#define Rtl819XRadioC_Array RTL8192E_RADIOC_ARRAY -#define Rtl819XRadioD_Array RTL8192E_RADIOD_ARRAY -#define Rtl819XAGCTAB_Array RTL8192E_AGC_TAB_ARRAY -#define Rtl819XPHY_REGArray RTL8192E_PHY_REG_ARRAY -#define Rtl819XPHY_REG_1T2RArray RTL8192E_PHY_REG_1T2R_ARRAY - extern u32 rtl819XAGCTAB_Array[]; enum hw90_block {