From patchwork Tue Mar 7 21:01:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Hortmann X-Patchwork-Id: 65869 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2669582wrd; Tue, 7 Mar 2023 13:23:48 -0800 (PST) X-Google-Smtp-Source: AK7set9NPTXxPs0sixu0qCpDksGML8D/F0+6vAFQ4oFWuisazR5MV+/nKmR4Bf6DSuDSr8dPFvLF X-Received: by 2002:a17:906:4e15:b0:883:3299:91c8 with SMTP id z21-20020a1709064e1500b00883329991c8mr15653891eju.55.1678224228126; Tue, 07 Mar 2023 13:23:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678224228; cv=none; d=google.com; s=arc-20160816; b=EPLSbjhiL9p/Gq8lI+ge31n6VqJTSaPNfAFYIAV60zs8vT9jWRPSEIb19R2nH27iEk 9w6BhtSTE1EkXDfXjCOLgPk+5t1qmy+PCgSdfcDW8F26xVAAABR3rebDQMNT8LvyvGhj gN2CEQ5dq/sk8l0vzQHonj2fQP1xACLE7LruF8zXmeZlqLazEDcVC5ZWnvBbtG6zGlXc rmj50fVvAQmtCXlJEJz0d+Ih40vm2T2pF+qvB0HeQa1kRNmXHw+wxkdKNNm6h8csJGqy 9Tw9lHcILpcMNQlay1aSy5r1NB6iWMSV4uHNqneUF7he0titAv0RLz2tobxI3kVzT/DR cYRA== 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=+laKuP5cAVSNtPYHlxeAmSs0nLf7ZBBLqCdQZgZeOuw=; b=Myorz0uDY6NYK7lNZNO08dW5LMQ9dN/QgiOUplACqQlTy5IT2HpXspfWgMbd1oZTOP 2lV/YUkZjVSkK8e1QK0WPkYc37W8mJeGkfzvTd+o1m20Rvdh6LF8kVceDjl80pdwqDjp MhgiQwA6XP+s0HDVFHkWj6MfBLuunpAuYAaqnplLuT6++7tpam+r4aSOjDkSnyzAErZq s8eJ5EXjwbByxzznRpL4r3dMbRN1IH2HkgOASSijfEizw9iB4nsPd4Yup+7C/joGAoc8 oPEndMUSa3xgqI57WH2r/5wLtMFqAZKILbCyRhuoECZQGpvw2ofCkqIotzC2m5txAsyq w0aA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="pP8JZTf/"; 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 qp2-20020a170907206200b008ddf3c18301si1355596ejb.653.2023.03.07.13.23.01; Tue, 07 Mar 2023 13:23:48 -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="pP8JZTf/"; 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 S230297AbjCGVBX (ORCPT + 99 others); Tue, 7 Mar 2023 16:01:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230518AbjCGVBR (ORCPT ); Tue, 7 Mar 2023 16:01:17 -0500 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6DDD39E521 for ; Tue, 7 Mar 2023 13:01:10 -0800 (PST) Received: by mail-ed1-x52c.google.com with SMTP id ec29so26856449edb.6 for ; Tue, 07 Mar 2023 13:01:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678222869; 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=+laKuP5cAVSNtPYHlxeAmSs0nLf7ZBBLqCdQZgZeOuw=; b=pP8JZTf/ySfxULNY/h6PvVv+THp2rayv+OJYRT4KQh4uQhrRgyCfIuSlGzJWfC5WAw iL1sUouNGDPhFTUtxIR5InIUZ6jBKsTGAG+C8KrXDV5mb/LDAS3RUqkDhlfZNiWk+etX 883/y1oRQz0BpS5IBX8xbImf7iKLQFuy0zKE/0UOm3RBXaSlu6DPmib5/2aN5FLyK+zj wyc07QcbQXzOxZm1VsxcCwIPZk/ELGXByKhoSqosjVDYe4nQ4IDnzb9Fy5ERXB10pJo1 KkmOzXXnqFvZXjKRfBxox6Kcl7Hkh+PSybG0kmJWpB2BlTIi+UPvOSYHbTdERNNnXfu8 ticQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678222869; 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=+laKuP5cAVSNtPYHlxeAmSs0nLf7ZBBLqCdQZgZeOuw=; b=SsQ3/z2JZA6zGJd8opqkMBw64f76OjnhJUJVJ2FDB8LYjRvdNSb1ZVznxG2w6zdSnR jLioAt5Yly7zliqrACIqZPsEEALJzMZvPwjkScMwd7iH9xjpcHksBKSaODr5I06yeqCh NObmByEID4pRDMIl1uFoqvqX0teGb16GwAwzRta6hZ33rrubyywcocuEgDvmnsNrZWQK +Qtg7CqNuLPBulwk8GQnLED+2q8swogHupMSOoyYhJGmdLJgFkUjFnUciYViVETyydmM GUDdben4la7X5YALAKdqYkn1lcB+hARBEftDMe5etefrorRTNFvsn01YfLfq5/GyWCLc UyQw== X-Gm-Message-State: AO0yUKXMhHrwcyIt2gtsKkzulV2y6r4UNjxOD4oUiXwYIOiwd6bihRPo KdrJ69pj5o7r+UytYlAlMv0= X-Received: by 2002:a05:6402:274d:b0:4af:7bdc:18a5 with SMTP id z13-20020a056402274d00b004af7bdc18a5mr20098565edd.0.1678222868751; Tue, 07 Mar 2023 13:01:08 -0800 (PST) Received: from matrix-ESPRIMO-P710 (p57935146.dip0.t-ipconnect.de. [87.147.81.70]) by smtp.gmail.com with ESMTPSA id d5-20020a170906640500b008be0b7242d5sm6640808ejm.90.2023.03.07.13.01.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Mar 2023 13:01:08 -0800 (PST) Date: Tue, 7 Mar 2023 22:01:06 +0100 From: Philipp Hortmann To: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/2] staging: rtl8192e: Remove unused Array Rtl8192PciERadioC_Array Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: 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?1759745648107583049?= X-GMAIL-MSGID: =?utf-8?q?1759745648107583049?= The array Rtl8192PciERadioC_Array is only used in function rtl92e_config_rf_path which is only called in function rtl92e_config_rf. In function rtl92e_config_rf a termination condition for the loop is set to priv->num_total_rf_path = RTL819X_TOTAL_RF_PATH = 2. The loop is only executed with numbers 0 and 1 for eRFPath. So the function rtl92e_config_rf_path is only called with eRFPath for 0 and 1 and never with 2 that would make the "case RF90_PATH_C:" be called. Remove resulting dead code. Signed-off-by: Philipp Hortmann Reviewed-by: Dan Carpenter --- V1->V2: Changed argumentation in the description and subject --- drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 12 ------------ drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h | 2 -- drivers/staging/rtl8192e/rtl8192e/table.c | 3 --- drivers/staging/rtl8192e/rtl8192e/table.h | 2 -- 4 files changed, 19 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c index 35ca01ab65ff..fe0ef52c163a 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c @@ -649,18 +649,6 @@ u8 rtl92e_config_rf_path(struct net_device *dev, enum rf90_radio_path eRFPath) bMask12Bits, Rtl819XRadioB_Array[i+1]); - } - break; - case RF90_PATH_C: - for (i = 0; i < RadioC_ArrayLength; i += 2) { - if (Rtl819XRadioC_Array[i] == 0xfe) { - msleep(100); - continue; - } - rtl92e_set_rf_reg(dev, eRFPath, Rtl819XRadioC_Array[i], - bMask12Bits, - Rtl819XRadioC_Array[i+1]); - } break; case RF90_PATH_D: diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h index 561a4c874fe3..6772ed300591 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h @@ -14,7 +14,6 @@ #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_REG_1T2RArrayLength PHY_REG_1T2RArrayLengthPciE @@ -22,7 +21,6 @@ #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_REG_1T2RArray Rtl8192PciEPHY_REG_1T2RArray diff --git a/drivers/staging/rtl8192e/rtl8192e/table.c b/drivers/staging/rtl8192e/rtl8192e/table.c index d04608d99cbf..4e97ad4b8fd7 100644 --- a/drivers/staging/rtl8192e/rtl8192e/table.c +++ b/drivers/staging/rtl8192e/rtl8192e/table.c @@ -325,9 +325,6 @@ u32 Rtl8192PciERadioB_Array[RadioB_ArrayLengthPciE] = { 0x007, 0x00000700, }; -u32 Rtl8192PciERadioC_Array[RadioC_ArrayLengthPciE] = { - 0x0, }; - u32 Rtl8192PciERadioD_Array[RadioD_ArrayLengthPciE] = { 0x0, }; diff --git a/drivers/staging/rtl8192e/rtl8192e/table.h b/drivers/staging/rtl8192e/rtl8192e/table.h index 177fe2173430..981e8b57d3de 100644 --- a/drivers/staging/rtl8192e/rtl8192e/table.h +++ b/drivers/staging/rtl8192e/rtl8192e/table.h @@ -17,8 +17,6 @@ extern u32 Rtl8192PciEPHY_REG_1T2RArray[PHY_REG_1T2RArrayLengthPciE]; 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 From patchwork Tue Mar 7 21:01:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Hortmann X-Patchwork-Id: 65870 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2669954wrd; Tue, 7 Mar 2023 13:24:39 -0800 (PST) X-Google-Smtp-Source: AK7set/+6VN9pllKfd07FylLfVCFq4vi1GnOz8HJ7rDu/7fqK62bRW8R51pxV2bZ8XNf4KiFN6CM X-Received: by 2002:a17:906:2602:b0:839:74cf:7c4f with SMTP id h2-20020a170906260200b0083974cf7c4fmr14394155ejc.8.1678224279600; Tue, 07 Mar 2023 13:24:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678224279; cv=none; d=google.com; s=arc-20160816; b=cPUdb12c1g47Qp6RR5ENVWEDrfIitZl/4WvSjrwvYA0UMfohodrAUCz0MmIjET32PC z2dvQ/F2AGHSbIe4LF6l9tQwMNglFe0V0eb51gWbjUL7yUqhZyq+KdLGyy+hdKTOd6oS i779Yp/6v2WFKk8ll1K0ysb+2+k+MmWstYhcujkTJRMCxjseVGeJBxyLC6RHxuoTpkh6 w6pzwjcOvSpaHdGY2xUO2mr2mcSQaqTkLjHxq8ulkUfdncTcu7WrexQR4kc9f/dmgRMQ rvhkTFdxhs1mSHiaUfQpA3gjArkFXEPZA3u0a54nMaHXpoqsxaOxb0aFnaXk2jTV821a 5exw== 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=gIXSorTFAYKTNJM7z/IL0aUuWF162xbbFTav7RI/Z10=; b=bODHWCAN+WhEIzdyeMrLRCKNpNrUG4lCUS+0jepkq0DH3H9cohnKIWXr7oC0+dQ71K SfvdlDzGPHb5PVXGCGHwVbyc6U3cGsELEoQ0dBne8O8Ky2NC+ePtpD45sVUU/X8NGokH U7G/7VpswVKBTpp9Lwa20I7GMylNrNjty+dwujaIKifegld41mQ9Ynq7ZyKp+oJ8iYBy 0PaCpqa3BDV65XXh6l1dx5uJSzE0EVQImBs3FgU6QAAdNqXzT1b86xrxJNgCyC3Tp+L2 UwGOwrXLiwHHACiZ8yOTf/OaPy5UUrqjveVOrTHqlvo7NLnXMX9r2/L/D4anQNyLSmIe O+Dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=MnyFJBJS; 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 xc7-20020a170907074700b009149300bd03si5696115ejb.726.2023.03.07.13.24.16; Tue, 07 Mar 2023 13:24:39 -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=MnyFJBJS; 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 S230285AbjCGVBx (ORCPT + 99 others); Tue, 7 Mar 2023 16:01:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230374AbjCGVBp (ORCPT ); Tue, 7 Mar 2023 16:01:45 -0500 Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A5B4AD015 for ; Tue, 7 Mar 2023 13:01:31 -0800 (PST) Received: by mail-ed1-x534.google.com with SMTP id a25so57926043edb.0 for ; Tue, 07 Mar 2023 13:01:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678222888; 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=gIXSorTFAYKTNJM7z/IL0aUuWF162xbbFTav7RI/Z10=; b=MnyFJBJSxZ8i3I01ug1cTYZ7Q4PhmKGhRxGU9s3UK+ReZD7m2YF025j+KpvuUsjf1/ fibjuaTB41CjNezj/Xy3Ax2I3P187iOGXvmjZZaf8SWhyM8fQhIgv3Fm5VD+wU6o6rPn wEHb7ZxIciyVG9dBEU86jqTRLBKVcoOgAoRQoHIOyGmy2ckGHVhfGgKAeMzzHIjZqlpk Tmp/dGMdYr2NnapNtzdXv0xMxLcuBR5kD7QO/nUSMBFvtEdNFQScKusOxgjJG5BtANhW 58XuGwZDW4mW2WVHCy4v7RpQi5nO57cKoQfkuXiWeu7alz4Y5MuaqIPTyXkWDhMjhiZD 7g7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678222888; 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=gIXSorTFAYKTNJM7z/IL0aUuWF162xbbFTav7RI/Z10=; b=AmuXRyzL8ixzuu/JESPSYlbJst3LkcPlNC8anUsOIV6iFfPyZnwrhYX2zPF+4Gy6tP dl1i57ld3s9ufojm0mD7uHFcooJOPG6uC2H4bZb6O9RpPZko4g/G97jdhKOQM5YuR87u shPqPz+6Jht1EqmxK/KjnJs4cL8nGZSQolLPRMZOl6vGAsJsyOexuVEjvc1RqDgAX+Ug OH+G0h99VSMrEHMpg3A6b7+HB1dNWsa8sBwfpYDMrkeDI+Lf16mNR8xiJQr9sYmKgd2q Uf2ldrRr6DKxVsGkfawf7SBfVz9wH5iaRGsgUYorATP42is+mQkIgwSsfcx56kS3kfKE +AZg== X-Gm-Message-State: AO0yUKUgKt0hL/ldYsXGkkhdSUmt6u9abP9D9yhISvhCIbCzidz1sSIE 941/Q7Sj3dAkTENvvwWQdoA= X-Received: by 2002:a17:906:5199:b0:8ae:ea08:3842 with SMTP id y25-20020a170906519900b008aeea083842mr14275038ejk.7.1678222887993; Tue, 07 Mar 2023 13:01:27 -0800 (PST) Received: from matrix-ESPRIMO-P710 (p57935146.dip0.t-ipconnect.de. [87.147.81.70]) by smtp.gmail.com with ESMTPSA id r17-20020a50aad1000000b004bfa4f747d2sm7269585edc.54.2023.03.07.13.01.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Mar 2023 13:01:27 -0800 (PST) Date: Tue, 7 Mar 2023 22:01:25 +0100 From: Philipp Hortmann To: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/2] staging: rtl8192e: Remove unused Array Rtl8192PciERadioD_Array Message-ID: <608ced17b85ca321fdc0026c686e3c62a9d6d8cd.1678222487.git.philipp.g.hortmann@gmail.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: 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?1759745702686804187?= X-GMAIL-MSGID: =?utf-8?q?1759745702686804187?= The array Rtl8192PciERadioD_Array is only used in function rtl92e_config_rf_path which is only called in function rtl92e_config_rf. In function rtl92e_config_rf a termination condition for the loop is set to priv->num_total_rf_path = RTL819X_TOTAL_RF_PATH = 2. The loop is only executed with numbers 0 and 1 for eRFPath. So the function rtl92e_config_rf_path is only called with eRFPath for 0 and 1 and never with 3 that would make the "case RF90_PATH_D:" be called. Remove resulting dead code. Signed-off-by: Philipp Hortmann Reviewed-by: Dan Carpenter --- V1->V2: Changed argumentation in the description and subject --- drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 12 ------------ drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h | 2 -- drivers/staging/rtl8192e/rtl8192e/table.c | 3 --- drivers/staging/rtl8192e/rtl8192e/table.h | 2 -- 4 files changed, 19 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c index fe0ef52c163a..a9e83ba811b0 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c @@ -649,18 +649,6 @@ u8 rtl92e_config_rf_path(struct net_device *dev, enum rf90_radio_path eRFPath) bMask12Bits, Rtl819XRadioB_Array[i+1]); - } - break; - case RF90_PATH_D: - for (i = 0; i < RadioD_ArrayLength; i += 2) { - if (Rtl819XRadioD_Array[i] == 0xfe) { - msleep(100); - continue; - } - rtl92e_set_rf_reg(dev, eRFPath, Rtl819XRadioD_Array[i], - bMask12Bits, - Rtl819XRadioD_Array[i+1]); - } break; default: diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h index 6772ed300591..ac640033e843 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h @@ -14,14 +14,12 @@ #define RadioA_ArrayLength RadioA_ArrayLengthPciE #define RadioB_ArrayLength RadioB_ArrayLengthPciE #define MACPHY_Array_PGLength MACPHY_Array_PGLengthPciE -#define RadioD_ArrayLength RadioD_ArrayLengthPciE #define PHY_REG_1T2RArrayLength PHY_REG_1T2RArrayLengthPciE #define Rtl819XMACPHY_Array_PG Rtl8192PciEMACPHY_Array_PG #define Rtl819XMACPHY_Array Rtl8192PciEMACPHY_Array #define Rtl819XRadioA_Array Rtl8192PciERadioA_Array #define Rtl819XRadioB_Array Rtl8192PciERadioB_Array -#define Rtl819XRadioD_Array Rtl8192PciERadioD_Array #define Rtl819XAGCTAB_Array Rtl8192PciEAGCTAB_Array #define Rtl819XPHY_REG_1T2RArray Rtl8192PciEPHY_REG_1T2RArray diff --git a/drivers/staging/rtl8192e/rtl8192e/table.c b/drivers/staging/rtl8192e/rtl8192e/table.c index 4e97ad4b8fd7..7101061e3519 100644 --- a/drivers/staging/rtl8192e/rtl8192e/table.c +++ b/drivers/staging/rtl8192e/rtl8192e/table.c @@ -325,9 +325,6 @@ u32 Rtl8192PciERadioB_Array[RadioB_ArrayLengthPciE] = { 0x007, 0x00000700, }; -u32 Rtl8192PciERadioD_Array[RadioD_ArrayLengthPciE] = { - 0x0, }; - u32 Rtl8192PciEMACPHY_Array[] = { 0x03c, 0xffff0000, 0x00000f0f, 0x340, 0xffffffff, 0x161a1a1a, diff --git a/drivers/staging/rtl8192e/rtl8192e/table.h b/drivers/staging/rtl8192e/rtl8192e/table.h index 981e8b57d3de..b6d4e9696452 100644 --- a/drivers/staging/rtl8192e/rtl8192e/table.h +++ b/drivers/staging/rtl8192e/rtl8192e/table.h @@ -17,8 +17,6 @@ extern u32 Rtl8192PciEPHY_REG_1T2RArray[PHY_REG_1T2RArrayLengthPciE]; extern u32 Rtl8192PciERadioA_Array[RadioA_ArrayLengthPciE]; #define RadioB_ArrayLengthPciE 78 extern u32 Rtl8192PciERadioB_Array[RadioB_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