From patchwork Tue Sep 12 19:28:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Hortmann X-Patchwork-Id: 138422 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9ecd:0:b0:3f2:4152:657d with SMTP id t13csp663664vqx; Tue, 12 Sep 2023 13:31:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEVJVYnzgcQs1a5DmT9rM28eipcgMsWnlEQNO3dYbcnEVKZIEtI7ig4BKa2Uefi9uFGy6Hg X-Received: by 2002:a17:90a:8c4:b0:263:ebab:a152 with SMTP id 4-20020a17090a08c400b00263ebaba152mr381420pjn.19.1694550694548; Tue, 12 Sep 2023 13:31:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694550694; cv=none; d=google.com; s=arc-20160816; b=aEO0qvHXwzjVaVJyMXrEaLaMf/PX1cryfECYdJ86cNy02CsuYfy9ECZ2UWyADzlaKt NfePV3OtJcrHY2pnsoQNhti/LNAScZdIQFJ4CdhH92d5EM86hIVcw/gGE1RJlm4Ip4b2 uRaM0XRFMtY5Gq0Hl7bwjEBJDUeaKT9NO8ugSEBGOXDTggwnk9lDdqMxrhZElCzkj0Ni Ynm1se7JHIyMMl7flBNQEQd6tS4h2kUFLX04wm4HncBqmVfP3t+waHTa8KcZamq3vmlk /uhMZPGGtCgBATKJW80BOd62PKy49oPIHCvqWG5UCN1sT9xF/UhRa3tUoUI58607c7Ee Gv6g== 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=hAqNl41hKkSBMm9EVB1yezgOtRcp8ANCKow1rmKoN+M=; fh=Sw1rtAM+hKyOoOQVYiiLzcdjc4spg79Z/tN6UmWUAKs=; b=kW25PuEhAMnnPbC0SxzUPiwOTWSbx08C18HXXeLYTk+WPoO90AT/Utt1M5w6poB+Pf 5DomT+hspPe/0hsbsFCO6I4D+me9m2oHHoEYWDdve4+ZLNuhF00+FnO8HQcIgEeqMkYF Nzw4pNu26z7LE2Lm0dYYY0pUSdxxBqWWf+eSXbgbU/NPEo6xxcl4db6PSF8f0PuZgcBN 8LlMUvWPIF2jgNaX+qQo1j2fxzO6QrdWCU8qLMkJNaQdxVa4ggtm937TbNjB4QelI5uo zkXeGdVK2uJBOMKvNXEgmywoWBZACSixyGfpTNwLxnwN51CUp0Wo1mrTayWgg9AoXFCR jlCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=K1qKbX3w; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id nh18-20020a17090b365200b0027400759b2fsi36145pjb.31.2023.09.12.13.31.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 13:31:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=K1qKbX3w; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 1C5618051ABC; Tue, 12 Sep 2023 12:28:24 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235056AbjILT2O (ORCPT + 36 others); Tue, 12 Sep 2023 15:28:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233722AbjILT2N (ORCPT ); Tue, 12 Sep 2023 15:28:13 -0400 Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82C8BE4B for ; Tue, 12 Sep 2023 12:28:09 -0700 (PDT) Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-31c49de7a41so898051f8f.1 for ; Tue, 12 Sep 2023 12:28:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694546888; x=1695151688; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=hAqNl41hKkSBMm9EVB1yezgOtRcp8ANCKow1rmKoN+M=; b=K1qKbX3whTuI+m2Ch4HVSfWwzCZCbx50QsxocsLC+wbmxLPUSepEQNIsYQgC0Rwmjc u8kM3zDfv30XZTq9OdXCEaD6ZZaOrO5LzeC47qaLHIV5GUtvdFdKjZocGiRZiBVx/mlI bFRlr20m2+7n/thJROjZKluaOXoalREQTgcDFNG520PANzDkkOqNyY1ANFVDlyneQewE zNoYPVwd0cq/bCZAUw4uy6vVJpzD8yQ5kjNRsKLdEHBGaAqxK+uU4IODCrth5P74I9AV vNUI8Eu/mbuW8VYki5sLszB7X11WJD+iFB32/+TbWy5AgypSVeL+MMJ49nK5mrUXQh4s 5Y4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694546888; x=1695151688; 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=hAqNl41hKkSBMm9EVB1yezgOtRcp8ANCKow1rmKoN+M=; b=usdfiIc/be6Mq9nawFG8qZh9CUKd8xtkWgM3Frt8KR0SvScap+Bnjl0TWqdWslP9C5 xDzLdOjaIFXVhUVjNQZ1BNFX8VKcpNcz2XR8egk6Cb3cZf3zYxCrU3yQm8Ke3iq6UJzH 8MASd7g6FYuXhHxaef3YIyEuEHqebWwTKtGgFIQ9zpcUKBzUQ65LRdJiq43gyeWk626Q Xz7VaCz0fN+VibFHDf3l24ObdQWhsyL4hfQuYaMesXrdbUSn9cSjdNtb1fiyMkcAJIU7 XzjWWYvBsLKEXVJDUYA+LFaCdkjrc9QWqKhtRom8P2j2cDWdmTXMcf3RtB5ENwpuMqww 1tqg== X-Gm-Message-State: AOJu0YwIZO1ZBCqhpDOFwkJEHUxnoRxd6ElW2C5YYHfvWlB8+RX4WMxk A+SEBZK+PkfVL+JuQgiSo+/foVSl8W/RCw== X-Received: by 2002:a5d:4001:0:b0:31a:e772:ddf9 with SMTP id n1-20020a5d4001000000b0031ae772ddf9mr301620wrp.4.1694546887726; Tue, 12 Sep 2023 12:28:07 -0700 (PDT) Received: from matrix-ESPRIMO-P710 (p579356c7.dip0.t-ipconnect.de. [87.147.86.199]) by smtp.gmail.com with ESMTPSA id o14-20020adfeace000000b003197869bcd7sm13517861wrn.13.2023.09.12.12.28.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 12:28:07 -0700 (PDT) Date: Tue, 12 Sep 2023 21:28:05 +0200 From: Philipp Hortmann To: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/8] staging: rtl8192e: Remove useless equation in debug output Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Tue, 12 Sep 2023 12:28:24 -0700 (PDT) X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1776865189119266070 X-GMAIL-MSGID: 1776865189119266070 When "switch (WLAN_FC_GET_STYPE(le16_to_cpu(header->frame_ctl)))" results in "case RTLLIB_STYPE_BEACON:" there is no need to calculate this again inside "case" and when a frame is a beacon there is no need to print the frame identifier again as it is explicit. Same for PROBE RESPONSE and PROBE REQUEST. Remove dead code. Signed-off-by: Philipp Hortmann --- v1->v2: Unchanged --- drivers/staging/rtl8192e/rtllib_rx.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c index 0e695b144b36..9f944eefa41e 100644 --- a/drivers/staging/rtl8192e/rtllib_rx.c +++ b/drivers/staging/rtl8192e/rtllib_rx.c @@ -2652,8 +2652,7 @@ static void rtllib_rx_mgt(struct rtllib_device *ieee, switch (WLAN_FC_GET_STYPE(le16_to_cpu(header->frame_ctl))) { case RTLLIB_STYPE_BEACON: - netdev_dbg(ieee->dev, "received BEACON (%d)\n", - WLAN_FC_GET_STYPE(le16_to_cpu(header->frame_ctl))); + netdev_dbg(ieee->dev, "received BEACON\n"); rtllib_process_probe_response( ieee, (struct rtllib_probe_response *)header, stats); @@ -2666,14 +2665,12 @@ static void rtllib_rx_mgt(struct rtllib_device *ieee, break; case RTLLIB_STYPE_PROBE_RESP: - netdev_dbg(ieee->dev, "received PROBE RESPONSE (%d)\n", - WLAN_FC_GET_STYPE(le16_to_cpu(header->frame_ctl))); + netdev_dbg(ieee->dev, "received PROBE RESPONSE\n"); rtllib_process_probe_response(ieee, (struct rtllib_probe_response *)header, stats); break; case RTLLIB_STYPE_PROBE_REQ: - netdev_dbg(ieee->dev, "received PROBE REQUEST (%d)\n", - WLAN_FC_GET_STYPE(le16_to_cpu(header->frame_ctl))); + netdev_dbg(ieee->dev, "received PROBE REQUEST\n"); if ((ieee->softmac_features & IEEE_SOFTMAC_PROBERS) && (ieee->iw_mode == IW_MODE_ADHOC && ieee->link_state == MAC80211_LINKED))