From patchwork Thu Feb 22 11:27:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Straube X-Patchwork-Id: 204686 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:aa16:b0:108:e6aa:91d0 with SMTP id by22csp186365dyb; Thu, 22 Feb 2024 03:28:59 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW+qd0kMH3JxCrrHL3K1o7HAVKBFkw7WxLLv1M2umKz9OYydTYTQQ1+/IK7SgSSHQbwqORMJTLB+t8MTb0mgdB5qypK0Q== X-Google-Smtp-Source: AGHT+IHkirnwyxpehP3ff3fwdpjk1a+jJktsGIW0fGecjqmJ7lDQ+4CfrN3b+Ge/3qzbKkSCJK9h X-Received: by 2002:a17:906:b0d9:b0:a3d:2243:29da with SMTP id bk25-20020a170906b0d900b00a3d224329damr14931705ejb.36.1708601339215; Thu, 22 Feb 2024 03:28:59 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708601339; cv=pass; d=google.com; s=arc-20160816; b=pYaQdQN8iUDVvWRi/YTgsatDLfuxUnD2U7Rt+lQJ7ZWpzZkF9UNgluvP8rBesE67Vf 43KIykOp83yFRD4x6Z4Do9PR7wHq/pP3NbBtui5oZoksa6e8u0cpzL0YUouVZM10uV8L n110k2p4obZPjPVEL+QJJqYAI+rl1Tybg4e5a6p9p+BtiK/I9fPKzr4iWCPREHpKZReA gV5sFJLG8COTyhdsTHiQWILNrDY769o6IEdvA5vxrzKXvAFudoMw5kIBnu1nIcamHrK+ fcL6hyc5bm6KTu4XQN74vpwX4fjbNWPz9/CU64dYwTNFBADA9ZKgqZ757CEpn1wmChS8 1yOA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=Do0TBWnjEnIoXDwl9l+y0DORBcXXcd9fc9eqtcity5g=; fh=1C1FI2VETlOarHwD5eoVhCPJn8Hcwa3OO/69SERDZog=; b=fu5XJVy33Wr7Bm1TeDT3QF63fNWG3apbye7wSwoYMHEr11MDfEhQAM4K2GWvK2cvJK YN7mfWQKMEf/Lfzms2xj9HQXorSFStJPQI3nvPWmeEB/KT9NgZkoB7sEENZDM4L/Uh5U Df9tGC/3sAkIKH1PB/N5uA8bx0ldOxfbzmKva3BkNyqty1VYRvNTwEfEAEnz56ICm6TW /+Y38Dxqo9XFaGAsy3kHGAiGX7fpPpxBt7r8wh9zFTfgMXJIK7MRXKraXkImlFxU9cc8 wW2uo10KINAzPPaYewAWQmgcD6VFF7P3MjrwDvUzaN1lA3q9ap3jJLhU1a7PyueWlCxj qnog==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=MNuq4QZX; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-76406-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76406-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id nb21-20020a1709071c9500b00a3ec8920cd2si3393530ejc.635.2024.02.22.03.28.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 03:28:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-76406-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=MNuq4QZX; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-76406-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76406-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 94C791F229D6 for ; Thu, 22 Feb 2024 11:28:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5EBA3481A8; Thu, 22 Feb 2024 11:27:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="MNuq4QZX" Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com [209.85.208.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ABCD145954 for ; Thu, 22 Feb 2024 11:27:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708601271; cv=none; b=eHrJ/RlZh2tmvNsMa34uCUevvNJAsER/VX+yxI7OiWunQAOsCjjq7fkeDiQ6g0aSlw6TtNEKCeGVfzrIwGBHp7tz8xsb9MNEwk6rK2dX54C9gKkfmXLlOyTk6lc3EugkbN7q9Nmg2l0U9IREzQpAxZvBoX5wmBYzDPgmo0hA6OM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708601271; c=relaxed/simple; bh=cOOD/LklXxoR0eMhE983UUMMSzNLG37BUxGl/wGbQDU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Sgeb6+Wh4+amlaCoX8dn4f6QGs/GctoGUbr3Ik4ascr/JVa60wrI/KA0q4XrAwGGz+BGwnap543E2cQDKfdaZhZLHGSzRE2EbNMziy6by0DG1LCrLi2rz0FoPhJCJxLSX7LtIIbkIuo3hygy44rDYbF2CvOZdz01o+30FepWvs4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=MNuq4QZX; arc=none smtp.client-ip=209.85.208.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ed1-f47.google.com with SMTP id 4fb4d7f45d1cf-564372fb762so2433676a12.0 for ; Thu, 22 Feb 2024 03:27:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708601268; x=1709206068; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Do0TBWnjEnIoXDwl9l+y0DORBcXXcd9fc9eqtcity5g=; b=MNuq4QZX9KtakTg87MgeqoWnpxClEL5LlpuhVIWELfe/7c4A8HTufiYeDeMg5KNaM2 glzTuCoPlSF13BKbQXTJWv3vx+7er0jL/5zJGI9AfintnBWBHeUWOYYSk2EPW06Xujfg fhJ+Z4+LVpFBSF3L6qbTvq9hlCbqoUHQj00TN5/qbuoTGvfdLWnQ+SdXbKqqm4zcso/t zQViWRj+EXn5X/skukC0a2HamGGFtUWSbT6QOWw8dejveZLhThuDS6Hl/f811nJFKv1O guWsx223uzNHXZmrWOXaGdkcDnEslUluLAzcwEqUJe+SKZzF+GiW5OoKPDGhN+qfKAYE dhHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708601268; x=1709206068; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Do0TBWnjEnIoXDwl9l+y0DORBcXXcd9fc9eqtcity5g=; b=CAhZIkPMMEvfY5TAADZLKHb6NcmpwDy99ptI8zv+inj8RTKJ1AXpk4l/ggF8JlsOKK B3wLGGNREzMHW/rwkHXrUySUbs+LQFVnrwgP7ofPJRJOy+gCqZY/ohuqAwbN4IYbZlVh QLa7sscJLvTdQBti97kLYf9xR+fnVudELqIQ8MoZ33hN/nFxj+Ez9ZgAVI1GuAwosUIX hOcGWGFrEltK7/cGlNGp7xe4ewBUcXjsi3xy8kubk47Wl7+BUQntqUBiLogMOPyGDahf JLoJ3i5vngDhlhu25mozHnQvjEO0ZCu6ykuzGrYS8NvJlEuLhAHpSMouktmIk2bwoc9R yojA== X-Forwarded-Encrypted: i=1; AJvYcCWO4nDTrFRYUn6wHc929q1OKXkO9+KMYpzQD/s0JiWijyQNqN+u0Tiz81+1YY4jAcXG+PulryfuUSau8h4gubPKoD0lTp7tye7pPLuB X-Gm-Message-State: AOJu0Yz3nww3s8B3Zw3efQEaVCx9dknFPpHT28caww1J+1//syDv7b6V z72aEal+4WZ7nsQ1qXInbBUw/G1s2yWgjnymnKbe+graERxtt8UC X-Received: by 2002:aa7:d455:0:b0:564:2519:5a74 with SMTP id q21-20020aa7d455000000b0056425195a74mr9130416edr.11.1708601267734; Thu, 22 Feb 2024 03:27:47 -0800 (PST) Received: from localhost.localdomain ([95.90.186.51]) by smtp.gmail.com with ESMTPSA id ck8-20020a0564021c0800b0056452477a5esm4338524edb.24.2024.02.22.03.27.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 03:27:47 -0800 (PST) From: Michael Straube To: gregkh@linuxfoundation.org Cc: philipp.g.hortmann@gmail.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Michael Straube Subject: [PATCH 1/3] staging: rtl8192e: rename rateIndex to rate_index Date: Thu, 22 Feb 2024 12:27:21 +0100 Message-ID: <20240222112723.18428-2-straube.linux@gmail.com> X-Mailer: git-send-email 2.43.1 In-Reply-To: <20240222112723.18428-1-straube.linux@gmail.com> References: <20240222112723.18428-1-straube.linux@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791598357885106083 X-GMAIL-MSGID: 1791598357885106083 Rename the variable rateIndex in the function _rtl92e_update_received_rate_histogram_stats() to avoid camel case. rateIndex -> rate_index Signed-off-by: Michael Straube --- .../staging/rtl8192e/rtl8192e/r8192E_dev.c | 64 +++++++++---------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c index b54dbc97d4ba..0a3c81e14951 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c @@ -1527,7 +1527,7 @@ static void _rtl92e_update_received_rate_histogram_stats( { struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv(dev); u32 rcvType = 1; - u32 rateIndex; + u32 rate_index; if (pstats->bCRC) rcvType = 2; @@ -1536,95 +1536,95 @@ static void _rtl92e_update_received_rate_histogram_stats( switch (pstats->rate) { case MGN_1M: - rateIndex = 0; + rate_index = 0; break; case MGN_2M: - rateIndex = 1; + rate_index = 1; break; case MGN_5_5M: - rateIndex = 2; + rate_index = 2; break; case MGN_11M: - rateIndex = 3; + rate_index = 3; break; case MGN_6M: - rateIndex = 4; + rate_index = 4; break; case MGN_9M: - rateIndex = 5; + rate_index = 5; break; case MGN_12M: - rateIndex = 6; + rate_index = 6; break; case MGN_18M: - rateIndex = 7; + rate_index = 7; break; case MGN_24M: - rateIndex = 8; + rate_index = 8; break; case MGN_36M: - rateIndex = 9; + rate_index = 9; break; case MGN_48M: - rateIndex = 10; + rate_index = 10; break; case MGN_54M: - rateIndex = 11; + rate_index = 11; break; case MGN_MCS0: - rateIndex = 12; + rate_index = 12; break; case MGN_MCS1: - rateIndex = 13; + rate_index = 13; break; case MGN_MCS2: - rateIndex = 14; + rate_index = 14; break; case MGN_MCS3: - rateIndex = 15; + rate_index = 15; break; case MGN_MCS4: - rateIndex = 16; + rate_index = 16; break; case MGN_MCS5: - rateIndex = 17; + rate_index = 17; break; case MGN_MCS6: - rateIndex = 18; + rate_index = 18; break; case MGN_MCS7: - rateIndex = 19; + rate_index = 19; break; case MGN_MCS8: - rateIndex = 20; + rate_index = 20; break; case MGN_MCS9: - rateIndex = 21; + rate_index = 21; break; case MGN_MCS10: - rateIndex = 22; + rate_index = 22; break; case MGN_MCS11: - rateIndex = 23; + rate_index = 23; break; case MGN_MCS12: - rateIndex = 24; + rate_index = 24; break; case MGN_MCS13: - rateIndex = 25; + rate_index = 25; break; case MGN_MCS14: - rateIndex = 26; + rate_index = 26; break; case MGN_MCS15: - rateIndex = 27; + rate_index = 27; break; default: - rateIndex = 28; + rate_index = 28; break; } - priv->stats.received_rate_histogram[0][rateIndex]++; - priv->stats.received_rate_histogram[rcvType][rateIndex]++; + priv->stats.received_rate_histogram[0][rate_index]++; + priv->stats.received_rate_histogram[rcvType][rate_index]++; } bool rtl92e_get_rx_stats(struct net_device *dev, struct rtllib_rx_stats *stats, From patchwork Thu Feb 22 11:27:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Straube X-Patchwork-Id: 204687 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:aa16:b0:108:e6aa:91d0 with SMTP id by22csp186467dyb; Thu, 22 Feb 2024 03:29:11 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXwNsokPXTptloE+9xOkzdKegLh+8gJUz+xaMszRi0iqls4netE21ZBu8G+n02xouhadrZT0ReTJG7tcTXOVQdXA2a9wA== X-Google-Smtp-Source: AGHT+IFblDt8c19p3WrEIl5xFZds98A/ceruOHGqlM7WiXtVZ1uzQH4ZQfQZ8RowioPyUvHsslJf X-Received: by 2002:a17:906:793:b0:a3f:2703:1c6a with SMTP id l19-20020a170906079300b00a3f27031c6amr3789321ejc.51.1708601350892; Thu, 22 Feb 2024 03:29:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708601350; cv=pass; d=google.com; s=arc-20160816; b=vVpeJe7n9cpPXLI8uAJz8Um9znqp08yYigEf4Kmwiga2qDrod0HMPGF1DU15UzrRAV W1D5h/97gHwZsrVppoX+D8/0zqnsLdNqxTjXvK851rKorU+OF5O+TNpNrYKe1t7NbI9t nOXM+Icq3TaTTpWS+l36hVsoIa3emrWKSEKiujkMzc5XAjQwAGMvLwrDMtdn4C8FKAw3 6cgGQ6rIsKK0oMtcoTKYpc0NPTSz5TKtnaZM5+Y0c8CisZnSFLmcd6WUJmIqlZ6Q7Ynq IbaRHgGuZX6eA+2MCD7eOf0vimtpqeBKYGRA6SXO76pJQgkWwMkzsIfz/Dx/OSd4K8Qg bzGA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=X1yfiraC5quW41p8ykFc76HAZ3CK1+m5zIrpNUz/QnU=; fh=jLiSRW1p21pt0NMO+9EiGqimLljGF19SbYmbCYodar0=; b=gOWk8bv0MK/Vw+TcpkBs77nlfCpnwVty5cpbTtOkJ5v6YMxrD5bqAUmDsGjhg1qS0/ CQXolOKeqtQ3q5iZZj7EobCVPlyyiGC1waMgrfetM/+n9hlHUw4DbvUe8VEIZB2gzOFz Dy/xUHuBeGv2gHYKGeaNyqOJsJNnf8qJ0khyb9TY1FaMHa9BawmT5rCx256bIbYzLU0Y b0E+p5PsOZrw2NKCZpbzgOcnOXgYO/9FjXEbX7wsG20DPbDr6mXzivFwNHKbZn2pbfgm NQenzb34Pvhh1lsz2apF8vjTWXW4dNO8OlyCChr8wdKWBx+JIKgvUnbERGzmYfuGP3/c McJA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=eWMvq4Hq; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-76408-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76408-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id m10-20020a17090607ca00b00a3ec892acf9si2953267ejc.743.2024.02.22.03.29.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 03:29:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-76408-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=eWMvq4Hq; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-76408-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76408-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 4A8291F23A2D for ; Thu, 22 Feb 2024 11:29:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5BB0E482DA; Thu, 22 Feb 2024 11:27:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="eWMvq4Hq" Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0755D45BE7 for ; Thu, 22 Feb 2024 11:27:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708601272; cv=none; b=VDkmiH6gtxeY35moASmlRXwyZ+pPH6VhiCg3/vYwA6+EFWMdgpzhFtBQ2lHK3CcdqwCGJcnVOyLgiaMuqgLlFcH7D5ks3Ok38W16EvnwKUaHXRLjJ81Di9intt3HRKr+yGUG+8SefK3PuIQCF5u3iW2LrIY/I7UuMF/i4UuH4s4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708601272; c=relaxed/simple; bh=s1HPqz0qh7gqcih0FvEIaSC2XVzpCndQCg9E2w4lGCo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=QboJrtb5IGFKOwqj0nk7UgHeao+fqUnSZihEY87l5OTKQQ3xMRi3zL0QFVhCBkzlmxSb8WgOvSJc3WjiuLdcjbClqHW+6ZYWRwr+d2EffWxEXNafkQiEzhAUGalY7N07QR0YCYwvkAgqz/I7XlGb4aH/Lu/Bdgt6UcDafq/q+kI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=eWMvq4Hq; arc=none smtp.client-ip=209.85.167.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lf1-f42.google.com with SMTP id 2adb3069b0e04-512bb2ed1f7so5452607e87.3 for ; Thu, 22 Feb 2024 03:27:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708601269; x=1709206069; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=X1yfiraC5quW41p8ykFc76HAZ3CK1+m5zIrpNUz/QnU=; b=eWMvq4Hq9jTDVsEXVaZ3iki5TNRWMaQvgwqR0V5NUx4cjG9VwDNb38PigMuXCQYiWR qJyiUUWAnuVKvYpT4qNb1hBUTJt2tOQdbg4xFd+EOrKs7ZtGiB2U4wU8vJPiySOtTO7D 87YNi1EoxV+yPnSNbUWTsvg5eFL+lwfQmn4e9FiUOSO2TXIh7DFje9SsVntpbS9xi3G6 19si0s8XrbjWZ5gsHWfi3elXfHJ0cpYrntVSWo4U69QXP1wOeEouFkP+HBi8AIvcCFW/ iEQ9VP+B3F3OYlOh6FgDGdC8pgCYH+v6qsQAUZ9NRX8OsLRF6NVHSjdKllx5zIWNoHiI CKaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708601269; x=1709206069; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=X1yfiraC5quW41p8ykFc76HAZ3CK1+m5zIrpNUz/QnU=; b=uFhxTx/wsix6GHbtG7f7jw2ksgeUT1k1XPaq8h1uXf8qW04q1BGK5XuZaKYotHb0p9 qkWUwUG/giRXkkcbEnOyRJVqJIEbGYWTLCRMpS7zxuGsCMRtfFAF/F7j8pg4QW3Jyf/j aJARv3Hq1j9pgCstEUKERi9DleELmna7Z85XIJOxLkKqfNgVnGBf+VvBd3LjBTHmlLDy wf673FCrKZ6THAceuqmhsZY0vmD//SP+MdzGsPtTY7Nm+5tHZdpQxOe2toM1saW+MnWd P8b5pOQLYPAFoK59xpvmiGPS/Q9s/wfLxBS7uttkRRggQjucxOVi7+MWw/6KXs5aMx2U uahA== X-Forwarded-Encrypted: i=1; AJvYcCUHjUA0V+tMVTfk5BJFpbMfxlCipqnkG/p8cVvZ+uy3OtWGT++ElFvSxQATdl5vW9qrjadpcFNmjkZEuL/PnGmlOgpzeMsDUvAbLy0V X-Gm-Message-State: AOJu0Yz+zqaQSfnwMCww1BUe6ABlaDCr4JUZbJcIGnaonfQElnKalN8n xBzx5TxHA4re1dVl0Fjz8iFVT4BrF2dXDrQqXXYfQ5kBfSOH4nU9 X-Received: by 2002:ac2:5191:0:b0:512:ab73:d2d4 with SMTP id u17-20020ac25191000000b00512ab73d2d4mr7478165lfi.16.1708601268844; Thu, 22 Feb 2024 03:27:48 -0800 (PST) Received: from localhost.localdomain ([95.90.186.51]) by smtp.gmail.com with ESMTPSA id ck8-20020a0564021c0800b0056452477a5esm4338524edb.24.2024.02.22.03.27.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 03:27:48 -0800 (PST) From: Michael Straube To: gregkh@linuxfoundation.org Cc: philipp.g.hortmann@gmail.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Michael Straube Subject: [PATCH 2/3] staging: rtl8192e: remove empty cases from switch statements Date: Thu, 22 Feb 2024 12:27:22 +0100 Message-ID: <20240222112723.18428-3-straube.linux@gmail.com> X-Mailer: git-send-email 2.43.1 In-Reply-To: <20240222112723.18428-1-straube.linux@gmail.com> References: <20240222112723.18428-1-straube.linux@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791598369999299753 X-GMAIL-MSGID: 1791598369999299753 Rmove empty cases from switch statements to improve readability. All of these empty cases are covered by a default case already. Signed-off-by: Michael Straube --- drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c index 57e1a361a7c9..4b622ad4c534 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c @@ -1725,7 +1725,6 @@ static void _rtl92e_dm_check_fsync(struct net_device *dev) _rtl92e_dm_start_hw_fsync(dev); priv->rtllib->fsync_state = HW_Fsync; break; - case HW_Fsync: default: break; } @@ -1740,7 +1739,6 @@ static void _rtl92e_dm_check_fsync(struct net_device *dev) _rtl92e_dm_start_sw_fsync(dev); priv->rtllib->fsync_state = SW_Fsync; break; - case SW_Fsync: default: break; } @@ -1760,7 +1758,6 @@ static void _rtl92e_dm_check_fsync(struct net_device *dev) _rtl92e_dm_end_sw_fsync(dev); priv->rtllib->fsync_state = Default_Fsync; break; - case Default_Fsync: default: break; } From patchwork Thu Feb 22 11:27:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Straube X-Patchwork-Id: 204688 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:aa16:b0:108:e6aa:91d0 with SMTP id by22csp186473dyb; Thu, 22 Feb 2024 03:29:12 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVLOAQleg1lPlxFRoGdyYzKnYCxJNIXaJSxwKNE58K4Ka+pZNetCypcf1XFwgRvutveQ4UredGcmhX9SbuW2yEstGRxMA== X-Google-Smtp-Source: AGHT+IEBW+32IRHzjifPWGzzsY3I9A/oe1KvNcqGl9Msy4cqBsX61Dxsp/qr0egRGbe8qAxGIIwz X-Received: by 2002:a54:4187:0:b0:3c0:72bb:2389 with SMTP id 7-20020a544187000000b003c072bb2389mr19210631oiy.49.1708601352625; Thu, 22 Feb 2024 03:29:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708601352; cv=pass; d=google.com; s=arc-20160816; b=TJaJaNru/dGsAI0eRXrDHfNgpfyOPYtRfv9JTpiUeMlHIoja18hwBETgRuygNc793G S1W0Tm8jVmWeGvglg75VrFyLG434rYmPfFVdAXkxj2NjiKSeaUcdKpaWFTCdn9b1qFbO W+nFijM0FA8wxY5k5MtQ6F6x/CLiWuUS+GaTCCyXukoHa7Qt08qMriGsuXeiIBX+d1iS cHaYn2oPz7yOjEVleRNOhAoFsF7t3lmb+YYf/h6zCrFjqeMhno8rypwsC2azFHoGLvz9 K7eT1GEEfWT5y1OxU9hDF/AAjYsvLnFZ9y3PnGlA5Br3lN8UhwoFc/o0IY+Dna75Zxo+ DYIA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=VmUhYWRsoRWZAmukiCSIuLg/ZdC/ToO+ch53EbnA+RQ=; fh=IyPAHjPQad/4rNxTgVqSGqeGCcbPR2dvKiSu4/rhWU4=; b=nX/cXyQSLt2f+Tcbbp+tkeK+kT2RGc//eMB+VpeLw6OydF+jkzXYKpQIk+lslUXL3b HIWLkCgw0eAl8azfb63z0BCnvO1vIqXVyjx42oJcclCh2r+JNT1dZWBuNfpchFLPtfAh ZdfdwOn67PzrUaTevvpWKBO6fP7Ggj1MFqtr7iujJGcV1VFmqYh5/BB52zmAwOP6qLOK PV6kcfaRGXPfmT3vCfb+wJ3NiMv5gckaO5IpORyN1Qg3gnVl8zMg7W7k3N5MwdkUNWVm xfjXTbAHK4eOj+UcRdm9LzrTeYxJ/oCZawGL9RqKso0kcqGwAjkAqzVV1p1cLQ4mM8eb qOWw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=RFxATkeZ; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-76407-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76407-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id gv8-20020a056214262800b0068f6580893dsi9612244qvb.134.2024.02.22.03.29.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 03:29:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-76407-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=RFxATkeZ; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-76407-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76407-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 57AFF1C23348 for ; Thu, 22 Feb 2024 11:29:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9BE65482EF; Thu, 22 Feb 2024 11:27:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="RFxATkeZ" Received: from mail-ed1-f42.google.com (mail-ed1-f42.google.com [209.85.208.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0A61B45BEF for ; Thu, 22 Feb 2024 11:27:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708601272; cv=none; b=fplvxp54hVkL+fWNnZDjDX91o15Uu6QXvWPRt2G3eL/fVEFO2T/s4Ve+Mta4skXF2y7ACAaFz3rYnCwZCLG4zu43IrdvKnyZqHbO41wtTB7plJIiJNVCPqbbL0xV9lba1xNrzumv2LqbHViVjW/SzL86d7BC1e6eOwssbHd/5Oo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708601272; c=relaxed/simple; bh=ODk9fkgS7BYWU+Gg1SjEmAFub5dXjOyUVZ3wrCXNqm4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=uCGkvnglzICfRZbf9wFuA0tD5oD3CBOiTYxeMNKkTpMFSqavc7o9GB72ODiXTioNoZ0E/wGM5VnBYMQ2Z9+z9oudBeqp42KWoYiuk/Ovx20bdEnaIW0kqbHNVQ9a6LU2HEruDQnfx0O9qGf7j9N/i4RWDyConM8SlsXNzJvARjc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=RFxATkeZ; arc=none smtp.client-ip=209.85.208.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ed1-f42.google.com with SMTP id 4fb4d7f45d1cf-563c403719cso8257904a12.2 for ; Thu, 22 Feb 2024 03:27:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708601269; x=1709206069; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VmUhYWRsoRWZAmukiCSIuLg/ZdC/ToO+ch53EbnA+RQ=; b=RFxATkeZFRoRpLTs4v1pDf1EMdRUk1ZURXc9evQLcD8CPv97ZoHZYbXYRTObJNQjsT x7v1IRcX77Y5CFi4X1x63WWhSJwYD0y5/6kmTs+fOkYBSWkk59VeIzAs5sikWeI53BR8 Gflk3aNJn+JeRUkBbZzh30IMhGHRZ2zAaeECRBYGYnQ8S5nn1wRrGubNEbo/5JS/fzyh 0O8BVa7E691HZmFpCVovpK0pqPJRcskt/oKsCYayRc1tfTRKkC1ov1sJHw4l+VfZlvMe 5M+XDXIQqiSMmpm3uKFfkiSlgwd1mkKVXclZLuky147mqxThsdnScrCAhXM9PYunzsNb iv2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708601269; x=1709206069; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VmUhYWRsoRWZAmukiCSIuLg/ZdC/ToO+ch53EbnA+RQ=; b=UuFImyZywRkEmFiya1Q7GR6nwFqgi2DhScH8vlQbJfMFFMb1nhvHrakdOjuunHuZOV Xu2LwHImmvXnA6UAAf6ImnV0gFfoVWEFHNyN0Cwh29ietrshWHlUB/eRM3ZAbzrmfjJ1 Up5BY/EI5mFD9Y60LxtwFW66CGM0Ci9bNbYcs/JDIHJrgfW3l1e0DXvCGHj9D4xt6vDS OsLeTwes3tGqJJOzeNHfxNB75MUWEJpDUQOo69L8Jev6jSzIXLDJ0KB4XLGTcQBEb8d8 5jvu1ah62axJWQ3rRX17OfPbdtJxdBuowWzKFbsC8ssX9NVzGiQN9jerNKTzH+Hor5A3 JQAQ== X-Forwarded-Encrypted: i=1; AJvYcCW1T+ui4lGhQjjN7m9dPwfeZkicK27RaXShfhcbhVPNEinzQIZdvu4+2lGUSFzi50e5KZttIyQAbABSq8++dV/CSMMcNC1G26dPz0TF X-Gm-Message-State: AOJu0YyYxYhicLGnLog8Rv574/1Efqh4IHJUHngkhqB52WgJZ0IIbBbE W3jW2mFKlrfmPGUzHGvqXVlmZstEHX1zXRN4cRxSMg7wXvFnSG4q/xtBqi1N X-Received: by 2002:a05:6402:22ef:b0:565:3907:be45 with SMTP id dn15-20020a05640222ef00b005653907be45mr1149547edb.37.1708601269376; Thu, 22 Feb 2024 03:27:49 -0800 (PST) Received: from localhost.localdomain ([95.90.186.51]) by smtp.gmail.com with ESMTPSA id ck8-20020a0564021c0800b0056452477a5esm4338524edb.24.2024.02.22.03.27.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 03:27:49 -0800 (PST) From: Michael Straube To: gregkh@linuxfoundation.org Cc: philipp.g.hortmann@gmail.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Michael Straube Subject: [PATCH 3/3] staging: rtl8192e: rename enum members to upper case Date: Thu, 22 Feb 2024 12:27:23 +0100 Message-ID: <20240222112723.18428-4-straube.linux@gmail.com> X-Mailer: git-send-email 2.43.1 In-Reply-To: <20240222112723.18428-1-straube.linux@gmail.com> References: <20240222112723.18428-1-straube.linux@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791598371828046917 X-GMAIL-MSGID: 1791598371828046917 Enum members are usually named all upper case. Rename the members of the enum fsync_state to improve readability and follow the common kernel coding style. Default_Fsync -> DEFAULT_FSYNC HW_Fsync -> HW_FSYNC SW_Fsync -> SW_FSYNC Signed-off-by: Michael Straube --- drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 26 +++++++++++----------- drivers/staging/rtl8192e/rtllib.h | 6 ++--- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c index 4b622ad4c534..bf695b61ca8b 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c @@ -1523,7 +1523,7 @@ static void _rtl92e_dm_init_fsync(struct net_device *dev) priv->rtllib->fsync_multiple_timeinterval = 3; priv->rtllib->fsync_firstdiff_ratethreshold = 100; priv->rtllib->fsync_seconddiff_ratethreshold = 200; - priv->rtllib->fsync_state = Default_Fsync; + priv->rtllib->fsync_state = DEFAULT_FSYNC; timer_setup(&priv->fsync_timer, _rtl92e_dm_fsync_timer_callback, 0); } @@ -1716,28 +1716,28 @@ static void _rtl92e_dm_check_fsync(struct net_device *dev) priv->rtllib->ht_info->iot_peer == HT_IOT_PEER_BROADCOM) { if (priv->rtllib->bfsync_enable == 0) { switch (priv->rtllib->fsync_state) { - case Default_Fsync: + case DEFAULT_FSYNC: _rtl92e_dm_start_hw_fsync(dev); - priv->rtllib->fsync_state = HW_Fsync; + priv->rtllib->fsync_state = HW_FSYNC; break; - case SW_Fsync: + case SW_FSYNC: _rtl92e_dm_end_sw_fsync(dev); _rtl92e_dm_start_hw_fsync(dev); - priv->rtllib->fsync_state = HW_Fsync; + priv->rtllib->fsync_state = HW_FSYNC; break; default: break; } } else { switch (priv->rtllib->fsync_state) { - case Default_Fsync: + case DEFAULT_FSYNC: _rtl92e_dm_start_sw_fsync(dev); - priv->rtllib->fsync_state = SW_Fsync; + priv->rtllib->fsync_state = SW_FSYNC; break; - case HW_Fsync: + case HW_FSYNC: _rtl92e_dm_end_hw_fsync(dev); _rtl92e_dm_start_sw_fsync(dev); - priv->rtllib->fsync_state = SW_Fsync; + priv->rtllib->fsync_state = SW_FSYNC; break; default: break; @@ -1750,13 +1750,13 @@ static void _rtl92e_dm_check_fsync(struct net_device *dev) } } else { switch (priv->rtllib->fsync_state) { - case HW_Fsync: + case HW_FSYNC: _rtl92e_dm_end_hw_fsync(dev); - priv->rtllib->fsync_state = Default_Fsync; + priv->rtllib->fsync_state = DEFAULT_FSYNC; break; - case SW_Fsync: + case SW_FSYNC: _rtl92e_dm_end_sw_fsync(dev); - priv->rtllib->fsync_state = Default_Fsync; + priv->rtllib->fsync_state = DEFAULT_FSYNC; break; default: break; diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h index c18169725452..ac6c52b58894 100644 --- a/drivers/staging/rtl8192e/rtllib.h +++ b/drivers/staging/rtl8192e/rtllib.h @@ -1031,9 +1031,9 @@ struct rx_reorder_entry { }; enum fsync_state { - Default_Fsync, - HW_Fsync, - SW_Fsync + DEFAULT_FSYNC, + HW_FSYNC, + SW_FSYNC }; enum ips_callback_function {