Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp792754rdg; Fri, 13 Oct 2023 00:48:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF2ccMvbe5Q5aLEV76BXxS/mOCIynWufqcuXJQ2a1pWjwe54f4OuUBqfHBI2zPRfZiE4mJX X-Received: by 2002:a05:6a00:190d:b0:68f:dfda:1814 with SMTP id y13-20020a056a00190d00b0068fdfda1814mr29020767pfi.18.1697183302931; Fri, 13 Oct 2023 00:48:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697183302; cv=none; d=google.com; s=arc-20160816; b=hcVNrymGh0k8xTg77hI20XYKopq9VxC/Oifv2h9dECSs6XC5NntwnJsi/f2faBrpKl TB32SwDgzXNWgWLRL9cmk++g7CEJhadTJarNmcgPUx8Du7z0yUL/l2F0rQ3S3nSA7kVB hrrl+ZjwMDp6T433fyTX1llZetFfOu0rADyH+8d8wnQ92dC4Kf+v47XjriEkiXNhblLF tjA+BB3RmHTkk8IHO0wEiFugaeq0XFFdy+YEnIIi73kOVjUCsIbgBIB6ZH+Ew2HjaeWC nOT1fN27yE6MU+OakjsbhjsyJgJLRXZCehVE8LKKCGMgxTaQVEldz/vyTYnbAcZJbdl5 RHjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=2FP/I2HYvAdTtXOXfAHhCpnshFB9PypJYAVg1wtwkRU=; fh=3W7sDXgGx5OcQAVKTHoxk9AfwLBmJEOHobnut2lP3pU=; b=Jb9296TLyytBc2PuGWBatixbnUzMICExe70+MvJ8jsWiEoJO7YMxIwTFpea91+8rYR 3bRwlSVoykIcmyRuTuaq5Us91am/byR9yvBISr1nYklcHjHFlFzw4vuwQXwWn1e2gAzQ NHtDc3k5MxODAKhsv5EdQ8lqK9JnF8bEBf/g8hqDUtD/PaSS9HLF/P8MkAFSQM/wR/JY iWbITN7NcyUugNLcjLllEYRrTlllfKT6C5scqTbnYoT9rL7UqlPFWjEXPhudgRkQqP2a t3fJ7jTgdVUULQWC29U3UTUHFHexQRRy9aQXfopGlXvpp+Ps3A7zX/v8Br1NF8d9394Y QSnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=YWvQlSrh; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id p17-20020a056a000a1100b006901387b0b3si9020558pfh.9.2023.10.13.00.48.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 00:48:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=YWvQlSrh; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 8EE9B81B1780; Fri, 13 Oct 2023 00:48:20 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230050AbjJMHsQ (ORCPT + 52 others); Fri, 13 Oct 2023 03:48:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230131AbjJMHsA (ORCPT ); Fri, 13 Oct 2023 03:48:00 -0400 Received: from m12.mail.163.com (m12.mail.163.com [220.181.12.198]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BB5FF130; Fri, 13 Oct 2023 00:47:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=2FP/I 2HYvAdTtXOXfAHhCpnshFB9PypJYAVg1wtwkRU=; b=YWvQlSrhLrGqgUFYLb9bj Dzv6ST3gElzGD9PRpj+6XgdJvz9Gl9TLaRTWJa7s7f8cS/ttCxJb9xJxKatgeQ7v pv/0Sg5DDrie8nwFklTgNDPbb9FsV+bWlKStqA91iNQ6j6eCGtYM98sMjEGHeZOg LMQQijj5ttImm9/za4suso= Received: from icess-ProLiant-DL380-Gen10.. (unknown [183.174.60.14]) by zwqz-smtp-mta-g4-4 (Coremail) with SMTP id _____wDHb8cB9ihl+PW5AQ--.20384S4; Fri, 13 Oct 2023 15:47:25 +0800 (CST) From: Ma Ke To: kvalo@kernel.org, quic_jjohnson@quicinc.com Cc: ath12k@lists.infradead.org, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, Ma Ke Subject: [PATCH] wifi: ath12k: drop NULL pointer check in ath12k_update_per_peer_tx_stats() Date: Fri, 13 Oct 2023 15:47:11 +0800 Message-Id: <20231013074711.2202850-1-make_ruc2021@163.com> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: _____wDHb8cB9ihl+PW5AQ--.20384S4 X-Coremail-Antispam: 1Uf129KBjvdXoWruF45Xr1kGrWkGw4DJF4kCrg_yoW3Krc_Ga 12vF4xXFs3Gws8Kr47ZF42qrWqvasrJFZ5JF4qqrWfCrW7JrWUAr98Zw1kAryq93WDArna 9wsrJF4UX39YgjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7xRMeHqJUUUUU== X-Originating-IP: [183.174.60.14] X-CM-SenderInfo: 5pdnvshuxfjiisr6il2tof0z/1tbivggIC1ZcjGu80wAAs3 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 agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Fri, 13 Oct 2023 00:48:20 -0700 (PDT) Since 'user_stats' is a fixed-size array of 'struct htt_ppdu_user_stats' in 'struct htt_ppdu_stats', any of its member can't be NULL and so relevant check may be dropped. Signed-off-by: Ma Ke --- drivers/net/wireless/ath/ath12k/dp_rx.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath12k/dp_rx.c b/drivers/net/wireless/ath/ath12k/dp_rx.c index e6e64d437c47..a38a239669a8 100644 --- a/drivers/net/wireless/ath/ath12k/dp_rx.c +++ b/drivers/net/wireless/ath/ath12k/dp_rx.c @@ -1339,9 +1339,6 @@ ath12k_update_per_peer_tx_stats(struct ath12k *ar, u8 tid = HTT_PPDU_STATS_NON_QOS_TID; bool is_ampdu = false; - if (!usr_stats) - return; - if (!(usr_stats->tlv_flags & BIT(HTT_PPDU_STATS_TAG_USR_RATE))) return; -- 2.37.2