Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2014410lqt; Sun, 21 Apr 2024 20:43:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVjSxuuy3xNwUnY3PmpZu/epydjx3ICbFysjz7r/gkXRG1AlJDyv0Yhd3C5vRmwA9rUoBgqKn89SvC0O9QHupmMAO/Ds3LdF4Ld3pJ5BQ== X-Google-Smtp-Source: AGHT+IFH008eDYYrvDaImh7pVlerdNxjRKNk+9gbqHb5d3mJCwJ8kn68sRKfFRAN2pMKz/kY9kH0 X-Received: by 2002:a17:907:9487:b0:a55:b3bb:e7c7 with SMTP id dm7-20020a170907948700b00a55b3bbe7c7mr1298695ejc.10.1713757410551; Sun, 21 Apr 2024 20:43:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713757410; cv=pass; d=google.com; s=arc-20160816; b=QUPhXmZNiXDDmX/9+rC3H2uskZeim2rktsgjJiy34RQCz4w6c2zktKm8HDjVU/yxSn ev+Wx51QfDal1BDFoUF0cUU+Ubm+0+PH2a1xgEFPkFV3+WIXOgh4b6D22aYH+Bj6dFhC HiJ1qjrQCFjHii9fXrQt3qUa28dXih3zB+pkJpfHVO3HBqFYCVCFcwVESYtK62jgVzYd /Aiq1j54NvMT6ACas9bP5Z3YHTM5odLS/FzpK+6t/tWmL9u3I9J9AyRfHJAg3Gep6I13 CvZui79HVU/8dqFhboI25XmmfacpSa8exhZPDTpAAPats04MGVSb9tuFMslSQL3irHSE N+eA== 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:message-id:date:subject:cc:to :from; bh=iEqiEiTLZVacdErxVFwk5krczRhZc+6qW1wqGnTKxyU=; fh=eRZnSwhYkLO4qIg8UlVEscQK2KXoEn6w7ZOexPMi4c4=; b=fzxyY7bl2zfXA8fc+PckMDl1CGPqDTrK4RS1/c/q5+3m/Kb2r5KQP6S6NhmH3vS+zG WeO5lLg2yKRlZgaaJahJVRRX9OFviZZeiH5sB6PRYlXPhU8J3yzWyly/IGmCy6ts1nW+ GfBKXiONkY/DIghKboH0d5I1J2QePScKS1vakLOUNSFv8f56+/RaSkQkBXgcrM6i6NRc KMWFd94pm61BE9rnmInQDO0aKiqJszjYaObmkuYJB5m7TCxYRaiXyWh/CMbo7HhRz2vf GBblUacZSSCWWTWtXUldVGlIvldmk++4vXOH0jG1/ljrIKAnY/0bvCCFhXu6guqpmbWl q9mQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=nfschina.com); spf=pass (google.com: domain of linux-wireless+bounces-6626-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-6626-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id bk9-20020a170906b0c900b00a524ff47704si5234340ejb.7.2024.04.21.20.43.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Apr 2024 20:43:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-6626-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=nfschina.com); spf=pass (google.com: domain of linux-wireless+bounces-6626-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-6626-linux.lists.archive=gmail.com@vger.kernel.org" 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 334721F2107C for ; Mon, 22 Apr 2024 03:43:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B747DF9DA; Mon, 22 Apr 2024 03:43:25 +0000 (UTC) X-Original-To: linux-wireless@vger.kernel.org Received: from mail.nfschina.com (unknown [42.101.60.195]) by smtp.subspace.kernel.org (Postfix) with SMTP id D7325E542; Mon, 22 Apr 2024 03:43:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=42.101.60.195 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713757405; cv=none; b=ecB1cGWTpwtvpANL3oG3ihHdBeqnibxO/Uv2ldP6jwzBpp4buYWvUUTLKyV6lLlTxzqZJrflfVan3734JCmYXnBYUMRpatXG/HHsKqxwoven7JaYr2nzQJqM1cahxXY8RTqxl1T2F06s19aR7S5vcK3EePuM7nuUy41xDF/ZnOQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713757405; c=relaxed/simple; bh=e+QErZfJ9ClPDRKItQODMeneFwkC3xRbbxekpjzvW0E=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=Mmn1w7dsiUxqRqA2RQnN0OS61KS1LGnxAVA+tNg2gxHB88pEzjwQBu2xvGmrWhGoun8GXO+QdIzGlijhDphc8VWaCPP3FsVEZnm+T+GeT45o3oDAYRY+aILquVbJYusFwpR+bwhOmq0VSxU7sRGPe31U8tX8CFauRZAJ51SYV/g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nfschina.com; spf=pass smtp.mailfrom=nfschina.com; arc=none smtp.client-ip=42.101.60.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nfschina.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nfschina.com Received: from localhost.localdomain (unknown [180.167.10.98]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPSA id A504260680957; Mon, 22 Apr 2024 11:43:19 +0800 (CST) X-MD-Sfrom: suhui@nfschina.com X-MD-SrcIP: 180.167.10.98 From: Su Hui To: quic_jjohnson@quicinc.com, kvalo@kernel.org, jjohnson@kernel.org, nathan@kernel.org, ndesaulniers@google.com, morbo@google.com, justinstitt@google.com Cc: Su Hui , c_mkenna@qti.qualcomm.com, linux-wireless@vger.kernel.org, ath10k@lists.infradead.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, kernel-janitors@vger.kernel.org Subject: [PATCH wireless v2] wifi: ath10k: Fix an error code problem in ath10k_dbg_sta_write_peer_debug_trigger() Date: Mon, 22 Apr 2024 11:42:44 +0800 Message-Id: <20240422034243.938962-1-suhui@nfschina.com> X-Mailer: git-send-email 2.30.2 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Clang Static Checker (scan-build) Warning: drivers/net/wireless/ath/ath10k/debugfs_sta.c:line 429, column 3 Value stored to 'ret' is never read. Return 'ret' rather than 'count' when 'ret' stores an error code. By the way, remove some useless code. Fixes: ee8b08a1be82 ("ath10k: add debugfs support to get per peer tids log via tracing") Signed-off-by: Su Hui --- v2: - remove the initializer change. drivers/net/wireless/ath/ath10k/debugfs_sta.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/debugfs_sta.c b/drivers/net/wireless/ath/ath10k/debugfs_sta.c index 394bf3c32abf..c1198e9027ae 100644 --- a/drivers/net/wireless/ath/ath10k/debugfs_sta.c +++ b/drivers/net/wireless/ath/ath10k/debugfs_sta.c @@ -432,14 +432,12 @@ ath10k_dbg_sta_write_peer_debug_trigger(struct file *file, ret = ath10k_wmi_peer_set_param(ar, arsta->arvif->vdev_id, sta->addr, ar->wmi.peer_param->debug, peer_debug_trigger); - if (ret) { + if (ret) ath10k_warn(ar, "failed to set param to trigger peer tid logs for station ret: %d\n", ret); - goto out; - } out: mutex_unlock(&ar->conf_mutex); - return count; + return ret ?: count; } static const struct file_operations fops_peer_debug_trigger = { -- 2.30.2