From patchwork Fri Mar 31 21:28:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Hortmann X-Patchwork-Id: 77982 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp854421vqo; Fri, 31 Mar 2023 14:36:23 -0700 (PDT) X-Google-Smtp-Source: AKy350ZCRfu9WVDUpC8kDvoG0THohtAmXiA/aPCOIZtjl/d/uFslF658MW4MiE3PjSJTpMQ34Ndx X-Received: by 2002:aa7:cfd8:0:b0:4fd:1cf1:b7b0 with SMTP id r24-20020aa7cfd8000000b004fd1cf1b7b0mr24071264edy.7.1680298583557; Fri, 31 Mar 2023 14:36:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680298583; cv=none; d=google.com; s=arc-20160816; b=BT690o8s+Tk09yFtJYNEZoy+9nshw3DT/NmOYYAus34NHC7h1ghs7j9qUMUMFF/4Yp H7GsNlvt8bzyOcAPzTMUvguR8LLNOi2Hpd76NlVEUgc5kHmzsF0127zsaW6uri+tJVrS 4MBe7j/DpDAZdR/L/jVZJcLX9jQBCIfVLv+TFXmFTGbAfTnhhNTfHV108Jzx23TIpjlK iQ0PVqhtUIZR6UUKY4vOhU+d32APwvJaxsI10BcWAK2NeqbbVVhEX7UEgMMbA8L8YLsW Ov5GfassXImDy3zSUbN/Tmt/RinEVrm2k3LJzGIScmTNplIvDvC4pdoI/kjhtGEgy4N9 6FTg== 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=e9uZA67W0J8w9CI902YQgQUJeWdtlUq1O49C7+5+Pz8=; b=wN0nLq+3eS2zQNpVkK6ZtbHrklzIbV/PT3RKdbgG4R/0Hdg5p80mtoXqunXGTzVRgd uerXflvW7Eru0PVRqy/VxziZzNe1920D+OXcqSiyDJW3mlUKEBfpOIqXQg2WQF/Q8EAj GU2Re1Ej0Qtr3E5+HOEJuM25td91cR63ssFdu7sQ6GBWU4JhO6Dr3Z/zaifrF+18+eDg 0VkqAKYgLCuYe/cGxoHaMmxG0GbyF3ihPw+You3pvDU2kg5Midfz21RwIEovXrxEt4yM iRf2Vi37ARjpLpiz6RrEkSXPMQ35sBrlu96C+JAGYqddEoU6BKukqjrkrCKZV8oZbGwB LWNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=U1nS8FwP; 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 x26-20020aa7cd9a000000b0050270e743d4si441115edv.590.2023.03.31.14.35.58; Fri, 31 Mar 2023 14:36:23 -0700 (PDT) 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=U1nS8FwP; 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 S232470AbjCaV2L (ORCPT + 99 others); Fri, 31 Mar 2023 17:28:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231837AbjCaV2I (ORCPT ); Fri, 31 Mar 2023 17:28:08 -0400 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A34A122EA3 for ; Fri, 31 Mar 2023 14:28:07 -0700 (PDT) Received: by mail-ed1-x533.google.com with SMTP id cn12so94887848edb.4 for ; Fri, 31 Mar 2023 14:28:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680298086; x=1682890086; 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=e9uZA67W0J8w9CI902YQgQUJeWdtlUq1O49C7+5+Pz8=; b=U1nS8FwPD58ih3N7LbDn1tTS+raRgE8DI4T3z1JbCUvgfuCM4RlncHg2TlsQtQHCMI gr0qGfXdxErOiVLueD7Z1YE6Bx45IodE6fual4LiKeQp4DpkQgEr841oLAmpV9tuYC2Y LKfDo5F5mx/+CTj9S4WdpE1EkuF60X9ivDz2XbTvsEY6IrRXLa9ExRvlfaTPbLe8PopN KYsaQ5EGe8N3eJO2pR7VaS6XzOxAS6YNqKCYmtRg9dOP5NW3i28mTJB4gJiqIRD8SH4L fNpqrnUEVU+4f9Pm5yeqLJZaLCnhMh8YofkYZaeD1tQfLRWMM7goBLLTtPrAiT5oGiMP nSzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680298086; x=1682890086; 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=e9uZA67W0J8w9CI902YQgQUJeWdtlUq1O49C7+5+Pz8=; b=Qsqk+IyfxZOaBMiVYXElLdAynkRRIrOYVQ8OhgnpgVWnarV0bSb/qTFkal8VDLPWtz DJNZpokWtYdNBIsu7Ghv3KEmCrxve1Zv08d+DOiFfNL3+g/KPQ7BptgB5ED1653Lw61P SFo8pIYSWiQ8qdpUOGco0jDONp7Vol+vJ0r25FUV3dpg3pwf0GGhDvPE75ohbXlb1d0t 26oAF3XPL9szgasL4UsOCz10emOG0JaoA2EP855girYXoWbh9XINqJpYk3HfHSBqMKxS nQLbcOMT3v0ZZUCYiCYKpDg3uFOCoIn1RGzxExEKBvMkqi1nasnqhthst7tkDtcGBk47 LREQ== X-Gm-Message-State: AAQBX9egBksft0S93E1tiZM1bvazQCRLSZLtp2IPElSk+HNqMdGL+zsb NdN+WHLuBUWIW+OgpfSpbNk= X-Received: by 2002:a17:906:15c:b0:8f5:14ab:94bc with SMTP id 28-20020a170906015c00b008f514ab94bcmr24544306ejh.6.1680298086210; Fri, 31 Mar 2023 14:28:06 -0700 (PDT) Received: from matrix-ESPRIMO-P710 (p57935146.dip0.t-ipconnect.de. [87.147.81.70]) by smtp.gmail.com with ESMTPSA id tq24-20020a170907c51800b00947abb70c93sm1092989ejc.112.2023.03.31.14.28.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Mar 2023 14:28:05 -0700 (PDT) Date: Fri, 31 Mar 2023 23:28:03 +0200 From: Philipp Hortmann To: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 1/5] staging: rtl8192e: Remove enum RF_1T2R Message-ID: <97fef03c12dbc619aab749867fa20686af2b8e3b.1680297150.git.philipp.g.hortmann@gmail.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, 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 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?1761920767038139624?= X-GMAIL-MSGID: =?utf-8?q?1761920767038139624?= enum RF_1T2R is used to initialize a local variable that is then shifted. The result of the shift is zero. Remove code that has always the same result to increase readability. Signed-off-by: Philipp Hortmann --- drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 3 +-- drivers/staging/rtl8192e/rtllib.h | 4 ---- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c index b5f4d0230da7..2100d9d4e940 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c @@ -531,8 +531,7 @@ static void _rtl92e_dm_tx_power_tracking_callback_tssi(struct net_device *dev) priv->rtllib->bdynamic_txpower_enable = false; powerlevelOFDM24G = priv->pwr_track >> 24; - RF_Type = RF_1T2R; - Value = (RF_Type<<8) | powerlevelOFDM24G; + Value = powerlevelOFDM24G; for (j = 0; j <= 30; j++) { diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h index 197c0a44ebd6..7d83a4c322cf 100644 --- a/drivers/staging/rtl8192e/rtllib.h +++ b/drivers/staging/rtl8192e/rtllib.h @@ -433,10 +433,6 @@ enum led_ctl_mode { LED_CTL_START_TO_LINK = 8, }; -enum rt_rf_type_def { - RF_1T2R = 0, -}; - enum wireless_mode { WIRELESS_MODE_UNKNOWN = 0x00, WIRELESS_MODE_A = 0x01, From patchwork Fri Mar 31 21:28:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Hortmann X-Patchwork-Id: 77980 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp851481vqo; Fri, 31 Mar 2023 14:30:20 -0700 (PDT) X-Google-Smtp-Source: AKy350bI4YL0iwChm9u0WfOW52V+Xy+SeKVk/K/1y07+J+5gIffRvzFK/HSmZQBVoGklkUin6O1A X-Received: by 2002:a62:5fc2:0:b0:627:fc31:1de with SMTP id t185-20020a625fc2000000b00627fc3101demr24620386pfb.7.1680298220400; Fri, 31 Mar 2023 14:30:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680298220; cv=none; d=google.com; s=arc-20160816; b=iW56/3UNMBYUvBH01Apx0Ln4KVUdXWcaMeoqVrK1wqiCVsVEwtBFN9p4pmofKXY3fu NSjBbDao/Jc3Ic2FeR6EgizG4XyvnjLTWrs/3xaFdoSGUlfpYkvdEsOSF9GAjtBUbGlm tSMblHDbmkjciUeesFzcIQuZGg5XJexzQWnd/bWm3rDeSx96Sa1hOKe6/K4n41O2+KZr 3NhhhVoVProVBZrSleIq7jELgDjnPp11lVU+ZgNze2OPzzj54X7vJb4zCAdBwI3YFSaj yEHVRQkH9LvcjTwvKnwegneStXt5fIKj6F1xLnqhHQcvzitHtHP+whHZGvh7E1vyQ9kO EMWQ== 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=M6eeMO2fOkTmQFtQvQlgUDTMHxNMIRBK0p3MGXvUrqc=; b=FHSIqiGLjgvxxRnyyGrWpGenx2kRzR5hH5jGHj5G5FDx+fz86SvNnL8gqi+0oIAYfk YTIkO0NnPSTXhotJVPNHDtUW2/Sn76sp1bV35PPcYAUZLyeTxH+gttvmyb9zHcRbw+GV APLdAqjYvJqanGUAKHVWldWkUBWtEiwRXDwSDzOiQk8s5aVDjEw0NMHjQs8n8+d1AUmh vfGldATW6Ih6qZcRXW27cyM6BTfg4IZ/uVgkKr1n6ji9C5dgKYTnirPUFybkLJvKYBz9 rTDQGN9kuGze2BIgb9hgQ8niBRl9tdCwuCbtl90RMyOy3UJdDCyJ4VmL/2peHKavCpWF nBVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=NRmG9bnK; 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 d16-20020a621d10000000b0062a3f8af263si3401896pfd.381.2023.03.31.14.30.07; Fri, 31 Mar 2023 14:30:20 -0700 (PDT) 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=NRmG9bnK; 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 S232480AbjCaV2W (ORCPT + 99 others); Fri, 31 Mar 2023 17:28:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232508AbjCaV2T (ORCPT ); Fri, 31 Mar 2023 17:28:19 -0400 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D14A424430 for ; Fri, 31 Mar 2023 14:28:13 -0700 (PDT) Received: by mail-ed1-x52d.google.com with SMTP id eg48so94745444edb.13 for ; Fri, 31 Mar 2023 14:28:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680298092; x=1682890092; 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=M6eeMO2fOkTmQFtQvQlgUDTMHxNMIRBK0p3MGXvUrqc=; b=NRmG9bnKsan4+8PU/mmgHL/s1dDmkW2yglzBB9UpGMXu8E7Eud+uG7q76n03riVT5n ZBaVBw8+G+Uf1v/nzPiL+bweIUWFh3+TM4+y08A5xclaySnckVIJbI+8ENxfoNC6c+C0 VVf2iiG7Dat/Nt8hQr9/6+yTIxP3nJuwZCZerGycFBhJkAt2Nn6Z27XX+GeVB9pPQOFr R50JXql/vqgtalxz5EOlf0UI1WH5fEoJkVRQqmYWzT72KwX0M2xy8cC9Ox67XFAUywwg WlXD5C6GMfxBIiJdoN3TTx19KlTeuCR2gfNk6Ywp8JvI52KwVLODZU8i6aHzckstm6xu cPpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680298092; x=1682890092; 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=M6eeMO2fOkTmQFtQvQlgUDTMHxNMIRBK0p3MGXvUrqc=; b=YPJyev1peYkFAv25cVY47WADibBXfA7MjRNjqM76I9MwnlTh1W8fYfQ8MqC2H3l+/w iB1mG2r8efRLdF3hhC1qUixji4a00pQYw9G+hPUdDv9zXM8kWJyFAoZD186c7as9/TIc 2oyotnUK1ghF4jwGRcmZObupQMt3zn39M9AmSoe+dngO5c6OcrjU+m6pUihFAZ0D34OT l7C0fpX6i0inG/Kzfct8euk6elrIlBkYm7KCJRAYh7v+vFVMrUri6oxVpLEh/dQjzEsq SUt3hn0ojksmphu3Jhcs+rmhxYpCgwnvw7R/LrhbDKub/WHEU3gKzAR7GDNkIEjvO8TA /xGA== X-Gm-Message-State: AAQBX9dlXVEHUhGIo4rirWPRyJ7hOyhiqZf0AZ8UiTb6p7TJDkm6vr/L EeBF2PT8F4PzO9Y+/KlfywQ= X-Received: by 2002:a17:906:519d:b0:939:5398:768e with SMTP id y29-20020a170906519d00b009395398768emr25210213ejk.7.1680298092270; Fri, 31 Mar 2023 14:28:12 -0700 (PDT) Received: from matrix-ESPRIMO-P710 (p57935146.dip0.t-ipconnect.de. [87.147.81.70]) by smtp.gmail.com with ESMTPSA id t23-20020a1709060c5700b0093e23d03d72sm1381763ejf.177.2023.03.31.14.28.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Mar 2023 14:28:11 -0700 (PDT) Date: Fri, 31 Mar 2023 23:28:09 +0200 From: Philipp Hortmann To: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 2/5] staging: rtl8192e: Remove local variable Value and powerlevelOFDM24G Message-ID: <9b17cf3828915f541aa26b02973f4e9f9ddd1776.1680297150.git.philipp.g.hortmann@gmail.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, 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 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?1761920386804989516?= X-GMAIL-MSGID: =?utf-8?q?1761920386804989516?= powerlevelOFDM24G is set to priv->pwr_track. Then Value is set to powerlevelOFDM24G and then only once used. Remove both variables to increase readability. Signed-off-by: Philipp Hortmann --- drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c index 2100d9d4e940..a6ae76005d56 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c @@ -518,10 +518,8 @@ static void _rtl92e_dm_tx_power_tracking_callback_tssi(struct net_device *dev) struct r8192_priv *priv = rtllib_priv(dev); bool viviflag = false; struct dcmd_txcmd tx_cmd; - u8 powerlevelOFDM24G; int i = 0, j = 0, k = 0; u8 RF_Type, tmp_report[5] = {0, 0, 0, 0, 0}; - u32 Value; u8 Pwr_Flag; u16 Avg_TSSI_Meas, tssi_13dBm, Avg_TSSI_Meas_from_driver = 0; u32 delta = 0; @@ -530,14 +528,11 @@ static void _rtl92e_dm_tx_power_tracking_callback_tssi(struct net_device *dev) rtl92e_writeb(dev, FW_Busy_Flag, 0); priv->rtllib->bdynamic_txpower_enable = false; - powerlevelOFDM24G = priv->pwr_track >> 24; - Value = powerlevelOFDM24G; - for (j = 0; j <= 30; j++) { tx_cmd.op = TXCMD_SET_TX_PWR_TRACKING; tx_cmd.length = 4; - tx_cmd.value = Value; + tx_cmd.value = priv->pwr_track >> 24; rtl92e_send_cmd_pkt(dev, DESC_PACKET_TYPE_NORMAL, (u8 *)&tx_cmd, sizeof(struct dcmd_txcmd)); mdelay(1); From patchwork Fri Mar 31 21:28:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Hortmann X-Patchwork-Id: 77985 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp859110vqo; Fri, 31 Mar 2023 14:48:09 -0700 (PDT) X-Google-Smtp-Source: AKy350a4TF5/p8Ng3l4Ef4Wxh5s7zV/W1JQrXfTmA4bMMKY0GoCOcbNawPHd2lrNuiWyiXDMvEDg X-Received: by 2002:a17:907:d40c:b0:933:3a65:67ed with SMTP id vi12-20020a170907d40c00b009333a6567edmr34455380ejc.75.1680299289027; Fri, 31 Mar 2023 14:48:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680299289; cv=none; d=google.com; s=arc-20160816; b=TGqxuj3GBhn1cUZWgOchen5ENWKHCIiHEp3H25U8NcYHj0xGOXmn1ZdOOwamR/Ic99 nXBWENjd/sC58YQo+lQqv2OIREIHyVuuT2mS9X2ilzmCgZ0b7OrFxYXpN5oRiAgL6SYw SkUPs6NEbdIYRoPChfvCVDIy0OF5T2LiUZvHqaNh9yx4jA/hS5jns/RRkbIdvHd0H5PO XOlg99PbvrMenMmLJLQCGjVtm7HGYg76mHv1LaNmU5vIdWxXfbo/FnA24HKJK57nL1jQ EsHVLf8FTOaekBeWFBEOp7ZQY0qAtOQX7yiP0hhnE0SfAVla+qO+YDtY+qYm+mzV7dBC afmw== 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=J25hLV3FiWX9nakLLPh8ft08O4hV9weZdaVT2vmny5g=; b=cOhWzEUAFcUpUc6hpKr6iIdZl3lDK/b5+f2NpodlR71ofLKZfKK4EylQ4jyRVn06X8 JM4i7aF0sWQiLpJmSVfLyz9JJlLjelj4I2zIOh4lkVVfkQBwvFOWlkpJUkc/PWD7SSlu 4aml21fLPs26dQkPnRctfpWWSC68yC7V1+7RrLPP2KzY7mCMhJbu9p+ITcPPrwGRE4Q5 tkVu1bOI0+u74QQSa3sD+n8cJQudb/Q/At4ICB/ovOWr3+wkhXQZAF4l5HEeG75130xW 7SiL8cFWnbwOO7jvXusUbxLl2/Tv5NSkmJjhs5oUQq0GfMG7W9qg/EaEA50ld729nMHC qU1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="M3UB/OqF"; 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 p3-20020a170906140300b0093a36dc8966si2457228ejc.499.2023.03.31.14.47.45; Fri, 31 Mar 2023 14:48:09 -0700 (PDT) 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="M3UB/OqF"; 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 S232528AbjCaV2e (ORCPT + 99 others); Fri, 31 Mar 2023 17:28:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231929AbjCaV2b (ORCPT ); Fri, 31 Mar 2023 17:28: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 23DF923FFA for ; Fri, 31 Mar 2023 14:28:20 -0700 (PDT) Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-502507c7da4so244476a12.0 for ; Fri, 31 Mar 2023 14:28:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680298098; x=1682890098; 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=J25hLV3FiWX9nakLLPh8ft08O4hV9weZdaVT2vmny5g=; b=M3UB/OqFTUVzhx17Xvw+Y45bmYCpDuSluFqye4oH8pAVZzKlEdjAHdUodVOgQxKG1Z fXIpFv3hUsL7BcFFyQlrXQ/uFaUaCGNwF9wp9Ndjnxr2WAECurfze/BRn2p4KUivDLaY FakYt5rWdUSI54y3drY5DJ5b+WK3Q2wWGE+rQ0B41O/hHr55BsNtTr01VqR3YzlIpeUo 9S9fVJ3AIQnh/+5Ek46Ex6VuXchhQCpktWQ/GclR2Z+vCRjQx6U1iUXKyjD9jkOTlTF7 wxF8cbKsK43jGztMOlta5w96inDZnTjSca13SDOStO6d33C5ZypkarU7ssaEj+GLj/66 ZaEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680298098; x=1682890098; 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=J25hLV3FiWX9nakLLPh8ft08O4hV9weZdaVT2vmny5g=; b=bFFA3rwDPfXkeWSh9U1rEwlIn70NB/R+9X67XK5EbCqyH5CLabqcbqyiWEAYxuwCR1 KJix5LAX6EKLag87Zo+D0YXiKpbqyLh00jHBTFJ9JEXYuT4MDaBPtwEqY5xUoRhHRErP 9AqYMTEtyAiPE4HRxfF4w1P8a7zkYD0XfXZig7jNi5Z+++rySvTjqt5A2e6g0iwpkkH3 4MW1vjDARkDqmbG8TGIEN9YMdKkaKY/vpY++uir6vfwpr3B+G8kpMe7HCh1POngEzdXG WybcXuHB9ta/+gnDZFpNQPSEgAyFSUpPFZt+/V1oi9zIFGKhwP4HAUuh+hMViRTG+gSn WU7w== X-Gm-Message-State: AAQBX9dnOiC7jfSiCgezPI8o4FtCv4LSmC+RAx/Ubdg1I8vEtp0gZRXU pukUPCz5peJJ90FZZfBI6Z5J+atHaAA= X-Received: by 2002:a05:6402:524e:b0:500:3fd0:25a8 with SMTP id t14-20020a056402524e00b005003fd025a8mr7158816edd.0.1680298098261; Fri, 31 Mar 2023 14:28:18 -0700 (PDT) Received: from matrix-ESPRIMO-P710 (p57935146.dip0.t-ipconnect.de. [87.147.81.70]) by smtp.gmail.com with ESMTPSA id g8-20020a170906394800b008cafeec917dsm1378502eje.101.2023.03.31.14.28.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Mar 2023 14:28:17 -0700 (PDT) Date: Fri, 31 Mar 2023 23:28:15 +0200 From: Philipp Hortmann To: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 3/5] staging: rtl8192e: Remove case customer_id = RT_CID_DLINK Message-ID: <4786e89c7a394f0e7f4d17c35cda147b11162268.1680297150.git.philipp.g.hortmann@gmail.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, 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 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?1761921507025092791?= X-GMAIL-MSGID: =?utf-8?q?1761921507025092791?= customer_id is initialize to zero. Changing customer_id to RT_CID_DLINK would not change the program execution as there is no equation for RT_CID_DLINK. Remove useless code lines to increase readability. Signed-off-by: Philipp Hortmann --- drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 6 ------ drivers/staging/rtl8192e/rtl8192e/r8192E_hw.h | 1 - drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 1 - 3 files changed, 8 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c index 1da14e737aa4..cbe66b4a6ad9 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c @@ -431,9 +431,6 @@ static void _rtl92e_read_eeprom_info(struct net_device *dev) else priv->chnl_plan = priv->reg_chnl_plan; - if (priv->eeprom_vid == 0x1186 && priv->eeprom_did == 0x3304) - priv->customer_id = RT_CID_DLINK; - switch (priv->eeprom_customer_id) { case EEPROM_CID_DEFAULT: priv->customer_id = RT_CID_DEFAULT; @@ -460,9 +457,6 @@ static void _rtl92e_read_eeprom_info(struct net_device *dev) case EEPROM_CID_Pronet: priv->customer_id = RT_CID_PRONET; break; - case EEPROM_CID_DLINK: - priv->customer_id = RT_CID_DLINK; - break; case EEPROM_CID_WHQL: break; diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_hw.h b/drivers/staging/rtl8192e/rtl8192e/r8192E_hw.h index 99640c4779f7..706d024bcfd1 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_hw.h +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_hw.h @@ -37,7 +37,6 @@ enum baseband_config { #define EEPROM_CID_NetCore 0x5 #define EEPROM_CID_Nettronix 0x6 #define EEPROM_CID_Pronet 0x7 -#define EEPROM_CID_DLINK 0x8 #define EEPROM_CID_WHQL 0xFE enum _RTL8192PCI_HW { MAC0 = 0x000, diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h index 1e99eb833405..91d634f5d3e7 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h @@ -134,7 +134,6 @@ enum rt_customer_id { RT_CID_TOSHIBA = 9, RT_CID_819X_NETCORE = 10, RT_CID_Nettronix = 11, - RT_CID_DLINK = 12, RT_CID_PRONET = 13, }; From patchwork Fri Mar 31 21:28:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Hortmann X-Patchwork-Id: 77983 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp854796vqo; Fri, 31 Mar 2023 14:37:10 -0700 (PDT) X-Google-Smtp-Source: AKy350bO9uec1ZImrGDlVJaeoewZ3axWF/si9KEKodJ5OOboE7rPXretVRKUqi8PAbuH7OY2vjrr X-Received: by 2002:a05:6402:10ca:b0:502:74bf:e3c4 with SMTP id p10-20020a05640210ca00b0050274bfe3c4mr4928640edu.39.1680298630547; Fri, 31 Mar 2023 14:37:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680298630; cv=none; d=google.com; s=arc-20160816; b=jWexxM4UIlkFpubrDxPbHBa+4CO1XhvytQrqNPOEKHehEVCEvkQgd2KPag8nTOQrSY osWVkLAuqQ2qqdFE2OK6qofH+arReDCQRevguULamWR+Jt8p2hd4sZsQxaIRgA2mbrtu UHeFhyzT3aMLi0lutOFRGEdLT0b5ZKEC7yV9AvPDfPmNlTCbJ2RUS0CRlPQxGYi2lKVt NAbD+DfM00oNt6srtZI+Ps2XHLILqg8qc3UfUEuLi8J2iJIOWxBermtgPUxqVTpPTxsq zTETlquFbNWa+vOdZdVfDc9SlBNdivDnzo4LpuT0AFLak2uHvtif6KXi45Q8fteUGihq TslA== 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=JRCbMUje3cpH1xwjxBasK79dtrxHrD4T1n+xlf4Bj5I=; b=MXPjoIMAtZ3DQtO4xMx30sjVnFXKxior3TEomVjJTIna/D/mJOaFjZq3f+xCACRCDM 7PLaBRpoBxaPN+up6duZyWOcnS32ROxXNtSXQ5WmrAZmLWOEuxrIMuznvJ5HuxI8Cab7 mcdaMCP8xgN2eDjHZIcqDOwyzfaI7Bgas6KGZIBJCuNBy4dObMtd2B5mEPskfwO1LeeO dRHvsJsYokW8STUU2zLgmjkmpm8GWFK6Dk16vQOco2Ybd4Lth6HnaDbRLfofYwd53wB2 /EF8P/a1TxsuCFHJEFmgGOCqTxnAPKA3gz1W52Q8q+XalUFmOksUAY/HTMoWdwejgJja zIAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=AxlBnyKa; 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 n3-20020a05640206c300b005026eaec912si1235061edy.189.2023.03.31.14.36.47; Fri, 31 Mar 2023 14:37:10 -0700 (PDT) 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=AxlBnyKa; 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 S232464AbjCaV2n (ORCPT + 99 others); Fri, 31 Mar 2023 17:28:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232682AbjCaV2k (ORCPT ); Fri, 31 Mar 2023 17:28:40 -0400 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 925C223FD4 for ; Fri, 31 Mar 2023 14:28:25 -0700 (PDT) Received: by mail-ed1-x531.google.com with SMTP id h8so94868969ede.8 for ; Fri, 31 Mar 2023 14:28:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680298104; x=1682890104; 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=JRCbMUje3cpH1xwjxBasK79dtrxHrD4T1n+xlf4Bj5I=; b=AxlBnyKadKVXmu+QpVSZZZEYhaX7SSoipSLThw6HsUfjqAcYlzbcn7+qDJccZSIy+U pvTl2SSUF96wMQxL59VO408vvKscOORjJjYL7oSmbrEmnMOvr1axMJrU0PT09pakdYRV X4yUNIHJ1jDgZiUL8iWNkr2geIquyG9pAqjNMzoYonv6EYg3hId/djkk7AAjyR4l/bEV 2Alh3b7yiBeZbxheNSckQuBd+1ye+EDdxqPK2uJqusC2lUjS0825KZMxyCBQ+bB88elZ 0t7yxncOIDL6iBGuKlYQ/VSRJKauffS37WweRq5YBMnZAcR/08oTnK2J8OORyvO+ZohH 8E/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680298104; x=1682890104; 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=JRCbMUje3cpH1xwjxBasK79dtrxHrD4T1n+xlf4Bj5I=; b=KrSyz4pu2644ATZqc60QJHb7Fxn0PgyAMS/PSrbqmvYHps95tSwaAkVQUKl2aWYPVH tLZqs63aLyhqlnmNTMdUj2hH4ypNBGwlH22uc4IzaGWJ9avnRwfVFiEwxLiLmaFzL2k8 dRDa0MWLUzPfLBOT1lZPU5vAoeGDSfZoCplnqwFRE87p8HMLQnoipFll+hTU4n45y1Cr uW34HBTe9+i7zR9tWC6ie7ulBlvjKX3DX1j0LdEgKpNx/RSBiveuHRwWg+N6y1CkzE+d tbChj4nERC00wjg+G5sjQtfVI9FjU5Ohe4g5NDqg7tBCvgO9Sx8mNmWz0rncR4DlkWji gdkA== X-Gm-Message-State: AAQBX9cvk+jSKkPwWODuRpt/GvcPtNv0VYvupD1BBFZaGXGADKw7vkU3 C3As8WAh/RHIBhqEG5B6Pf0= X-Received: by 2002:a17:906:101c:b0:929:b101:937d with SMTP id 28-20020a170906101c00b00929b101937dmr5559316ejm.1.1680298103964; Fri, 31 Mar 2023 14:28:23 -0700 (PDT) Received: from matrix-ESPRIMO-P710 (p57935146.dip0.t-ipconnect.de. [87.147.81.70]) by smtp.gmail.com with ESMTPSA id v7-20020a170906564700b009447277c26fsm1372726ejr.72.2023.03.31.14.28.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Mar 2023 14:28:23 -0700 (PDT) Date: Fri, 31 Mar 2023 23:28:21 +0200 From: Philipp Hortmann To: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 4/5] staging: rtl8192e: Remove case customer_id = RT_CID_819x_CAMEO, .. Message-ID: <72d9c0325ecabc007234ac5d4dba27556168d8a9.1680297150.git.philipp.g.hortmann@gmail.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, 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 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?1761920816927633410?= X-GMAIL-MSGID: =?utf-8?q?1761920816927633410?= customer_id is initialize to zero. Changing customer_id to RT_CID_819x_CAMEO, RT_CID_819x_RUNTOP, RT_CID_Nettronix or RT_CID_PRONET would not change the program execution as there is no equation for RT_CID_819x_CAMEO, RT_CID_819x_RUNTOP, RT_CID_Nettronix or RT_CID_PRONET. Remove useless code lines to increase readability. Signed-off-by: Philipp Hortmann --- drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 12 ------------ drivers/staging/rtl8192e/rtl8192e/r8192E_hw.h | 4 ---- drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 4 ---- 3 files changed, 20 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c index cbe66b4a6ad9..df8de35cbe0e 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c @@ -435,12 +435,6 @@ static void _rtl92e_read_eeprom_info(struct net_device *dev) case EEPROM_CID_DEFAULT: priv->customer_id = RT_CID_DEFAULT; break; - case EEPROM_CID_CAMEO: - priv->customer_id = RT_CID_819x_CAMEO; - break; - case EEPROM_CID_RUNTOP: - priv->customer_id = RT_CID_819x_RUNTOP; - break; case EEPROM_CID_NetCore: priv->customer_id = RT_CID_819X_NETCORE; break; @@ -451,12 +445,6 @@ static void _rtl92e_read_eeprom_info(struct net_device *dev) else priv->chnl_plan = 0x0; break; - case EEPROM_CID_Nettronix: - priv->customer_id = RT_CID_Nettronix; - break; - case EEPROM_CID_Pronet: - priv->customer_id = RT_CID_PRONET; - break; case EEPROM_CID_WHQL: break; diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_hw.h b/drivers/staging/rtl8192e/rtl8192e/r8192E_hw.h index 706d024bcfd1..4ee78b7a558e 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_hw.h +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_hw.h @@ -31,12 +31,8 @@ enum baseband_config { #define EEPROM_TxPwIndex_OFDM_24G 0x3A #define EEPROM_CID_DEFAULT 0x0 -#define EEPROM_CID_CAMEO 0x1 -#define EEPROM_CID_RUNTOP 0x2 #define EEPROM_CID_TOSHIBA 0x4 #define EEPROM_CID_NetCore 0x5 -#define EEPROM_CID_Nettronix 0x6 -#define EEPROM_CID_Pronet 0x7 #define EEPROM_CID_WHQL 0xFE enum _RTL8192PCI_HW { MAC0 = 0x000, diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h index 91d634f5d3e7..2b2d8af4cf6e 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h @@ -129,12 +129,8 @@ enum dcmg_txcmd_op { enum rt_customer_id { RT_CID_DEFAULT = 0, - RT_CID_819x_CAMEO = 6, - RT_CID_819x_RUNTOP = 7, RT_CID_TOSHIBA = 9, RT_CID_819X_NETCORE = 10, - RT_CID_Nettronix = 11, - RT_CID_PRONET = 13, }; enum reset_type { From patchwork Fri Mar 31 21:28:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Hortmann X-Patchwork-Id: 77981 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp851978vqo; Fri, 31 Mar 2023 14:31:16 -0700 (PDT) X-Google-Smtp-Source: AK7set+TOEwjX5oKULRWgiismPyNMh7UuwdSHYHOtbsECS7uPpyRA9qiiMVRpI4tD4m0xhsb7lYz X-Received: by 2002:a05:6a20:1e5f:b0:d8:fd3b:f1ba with SMTP id cy31-20020a056a201e5f00b000d8fd3bf1bamr26454932pzb.3.1680298276664; Fri, 31 Mar 2023 14:31:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680298276; cv=none; d=google.com; s=arc-20160816; b=U7aP+woiLhS7ZwcHaO9HkDpAQkqCtxNc/Y40Baop2aeeaMl3Ajq5lp0cqLeqCQ2rG6 T0LE5sKBDpw1UIkWiIdjxNppDHigLF/23OUL/CVChI/LPMt4UETcDGf/QV68dhTmLl4D UcWLrGOS3A9b3NJ+gYNbokiHxxIkQnBvdc+KKt4Q539s7EEO11pMkPcfWGn1fMOzrYLe PeUJujfHGG8oNe1wAhGjQXpjVmsE+3jpdZ/Y/T6Y7K/uSp0CiEn0Y3r+5S5Ztwr3YRoB Yd4E8//6vvkQanx5RGhxvNsa/RHizZKci1sp1ttdsVRvI4T3irisjDnkt80s8j82I8Jz tKdA== 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=ou/EV0dTqA/jTIKJ3wQ2Lp2bM3Hd0avOtCVCqCD0Yds=; b=0cDr0dIhNJmKl6IpRK8uyc0J8iNzasEuneASpo1TCKchvc1GquRsK9Xj8CfL3p0nQm g4H0p4PWTIdQ8pPdrbvcx2q0PMD1WPDNiBhvva5IBxghQyuA51tYRFRPq0B/n/rO9y0G hKZTblsjWhXD49JgcySnHRAiReO3TJHIFGAUXT/Z7Wx5f3N7CNfZgca21RLbosXRx3lu b8dxxbPsX+iKDkYLuQztIXrqaIP0nrwB5c8k7t4hAFk3oakEF+dv/CDnbm3XMBGnIKTb A5vJ5OVPcE+wv4lAlnGwE0jSTMA3tXqACv1ye4QV3FxVJRSUkZiBnEmGKg5Lnu2WD4Be 2Adg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=PCSwtAhL; 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 r12-20020aa7962c000000b0062472f19191si3493980pfg.6.2023.03.31.14.31.03; Fri, 31 Mar 2023 14:31:16 -0700 (PDT) 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=PCSwtAhL; 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 S232671AbjCaV2t (ORCPT + 99 others); Fri, 31 Mar 2023 17:28:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232659AbjCaV2p (ORCPT ); Fri, 31 Mar 2023 17:28:45 -0400 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5AE8221A8E for ; Fri, 31 Mar 2023 14:28:30 -0700 (PDT) Received: by mail-ed1-x533.google.com with SMTP id cn12so94890617edb.4 for ; Fri, 31 Mar 2023 14:28:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680298110; x=1682890110; 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=ou/EV0dTqA/jTIKJ3wQ2Lp2bM3Hd0avOtCVCqCD0Yds=; b=PCSwtAhLBW+9hO7OghdXuhAPmZIkwabNBzILwMsID39DXlNu6UTjh/TjpbPlE2sNHD Bk9SN33zk/kBnLF9dKPBXL/DTitZwwCgomOEYvdVPVEoPJidoPvAG6N+CfokSHg6qFXD ntM3kur2dYBVsoTvFdv4XeUo+hRmhd2SfK4x16cxxSg1R5tiBodBIgxfHFLGt4RaNaiQ QvsTGwjFVlyv1AhPH6cqKi7+VHc/hCZcLjKTUGw5FoNBKUFiEBGo7HaPuPHWXb8I0yQQ 9h/MmSh9u4wTGXjCWcvOQ3LF6pzShKjDrZuV/xmNJjoZEX5kfnK1JcigQ8Hnlkdtnqoy vmHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680298110; x=1682890110; 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=ou/EV0dTqA/jTIKJ3wQ2Lp2bM3Hd0avOtCVCqCD0Yds=; b=UIWAMmJ9CNlNz5PFB1sUKE+c0ArX0jSd+o4REjmazGw/cyZchb7edv3Cc6yrSjEhSg aIo7nlExa0uFxS8YVRXHr+Dsr578v8oO+izHVCxYig+zjOwUCRijMi8J6rSSCk0Hm97y k8BxoIDrEcwbp6qQRkI5TparGDcmN3+AOr+qKPDBuBO3nRkcvi6z8RBqV60+cFCK1Yzd JaVf84fMhsDO/9IWluuJiqBE528/JGO5rWItleghFEDOClip1naRcsXf30AeNa7HuYMY zL6jFn6r3an/upv6dx7NYCf862kvsjUZ3SaUXiAJ85naFq7jvPRnwmoO1BTI3PH1HCV8 dc7g== X-Gm-Message-State: AAQBX9dvFJmQHxWnE9x8CeTjMtbPGjqxDcx1IGLSzIRaT3abOamp4WQF GXYSYzc8CqOJL8TzW0gRpl8= X-Received: by 2002:a17:906:28e:b0:947:404b:eb2 with SMTP id 14-20020a170906028e00b00947404b0eb2mr6603384ejf.0.1680298109788; Fri, 31 Mar 2023 14:28:29 -0700 (PDT) Received: from matrix-ESPRIMO-P710 (p57935146.dip0.t-ipconnect.de. [87.147.81.70]) by smtp.gmail.com with ESMTPSA id ce13-20020a170906b24d00b008e68d2c11d8sm1354003ejb.218.2023.03.31.14.28.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Mar 2023 14:28:29 -0700 (PDT) Date: Fri, 31 Mar 2023 23:28:27 +0200 From: Philipp Hortmann To: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 5/5] staging: rtl8192e: Remove case customer_id = RT_CID_DEFAULT, .. Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, 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 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?1761920445568187559?= X-GMAIL-MSGID: =?utf-8?q?1761920445568187559?= customer_id is initialize to zero. Changing customer_id to RT_CID_DEFAULT will not change customer_id as it is already zero. default and EEPROM_CID_WHQL contain only a break. Remove useless code lines to increase readability. Signed-off-by: Philipp Hortmann --- drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 8 -------- drivers/staging/rtl8192e/rtl8192e/r8192E_hw.h | 2 -- 2 files changed, 10 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c index df8de35cbe0e..aed53fedeb61 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c @@ -432,9 +432,6 @@ static void _rtl92e_read_eeprom_info(struct net_device *dev) priv->chnl_plan = priv->reg_chnl_plan; switch (priv->eeprom_customer_id) { - case EEPROM_CID_DEFAULT: - priv->customer_id = RT_CID_DEFAULT; - break; case EEPROM_CID_NetCore: priv->customer_id = RT_CID_819X_NETCORE; break; @@ -445,11 +442,6 @@ static void _rtl92e_read_eeprom_info(struct net_device *dev) else priv->chnl_plan = 0x0; break; - - case EEPROM_CID_WHQL: - break; - default: - break; } if (priv->chnl_plan > CHANNEL_PLAN_LEN - 1) diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_hw.h b/drivers/staging/rtl8192e/rtl8192e/r8192E_hw.h index 4ee78b7a558e..f4d4b01630a2 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_hw.h +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_hw.h @@ -30,10 +30,8 @@ enum baseband_config { #define EEPROM_TxPwIndex_CCK 0x2C #define EEPROM_TxPwIndex_OFDM_24G 0x3A -#define EEPROM_CID_DEFAULT 0x0 #define EEPROM_CID_TOSHIBA 0x4 #define EEPROM_CID_NetCore 0x5 -#define EEPROM_CID_WHQL 0xFE enum _RTL8192PCI_HW { MAC0 = 0x000, MAC4 = 0x004,