Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1820306rdd; Thu, 11 Jan 2024 10:06:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IGWbF+f9unhV3G7MRgLXZzrz+QkHrE/IAN80mT2nhfaDJ5zU5RSw0cMbwHpBvPsWzoXTae9 X-Received: by 2002:a67:f88c:0:b0:468:ff:d7e3 with SMTP id h12-20020a67f88c000000b0046800ffd7e3mr203934vso.33.1704996371821; Thu, 11 Jan 2024 10:06:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704996371; cv=none; d=google.com; s=arc-20160816; b=X21Xr7YI/vN2dHpwOTglEhRaAIzRyrJfaYLakApRk3s94XCZvnuYPP1zESpRf0ashM XAZCC1ckzPBrGVxV6YGGb5tDpF6cuillfpTaLDy1OUEtkKqVmhAEEOCVaIuRa8s+Wses uLL5pTVBQ/QUxp/l/PnFOjRMLMuC1AyWpZxw+fdeSfc2hTb2d59Sk1FsBrJobF8fb2ms bL85VmUXwQ41DymgpRfSuGd5k9Mh1a9iA1lDt1caqLPSztFyn2vjPqjzfnR+140s1Uii x2CTwbefBrKOkJ2pDp7nOfG60SHo1Nhe3NpoMFFxDoKlX1ZLYPJMwOS9tkswEZQZLsV8 bVjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=hh/tRNJ5XrL+rWWHTNtLhbWKFUswhrmv1cBQS4WQcJE=; fh=zk45RCUja+fG2qErTrzKZbReie8ti2xK63kQZtZdEuk=; b=DdGLJGi+5tqJjVrLCFH0yuTYv3W0WW6ObgkhCCpYIV502RuBOqGAercvOmoBHkVh8Y cx6H6nNQiYMLSiC3x3qQQYNC1Hrh3u+vKY26IxtW9MfXlNadWu/LBTKxmeflzMWkMlts yzqARiFk80l4TagqKqbCITCU2+J1PxKe/L6ZwV6NEann6RyH9KZbfOwVQlb1O394RlpZ m6n8p5ZE2/wjR4labA4FMiKFT5GeBa84NWiLwcrg1KnUHQUmdpiYOOP4RyMfn0iOei7i Uz3m88NV3F6kfb1Ua6iAzsuZV3J3kJ8PnurVYA9ovPdM7BtuvejecUwqiW4hU7gYDwan WXNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=XlvdxguI; spf=pass (google.com: domain of linux-wireless+bounces-1747-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-1747-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id jg20-20020a056102181400b00466ea80b3bcsi279128vsb.44.2024.01.11.10.06.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 10:06:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-1747-linux.lists.archive=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=@quicinc.com header.s=qcppdkim1 header.b=XlvdxguI; spf=pass (google.com: domain of linux-wireless+bounces-1747-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-1747-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.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 8D5C01C246AA for ; Thu, 11 Jan 2024 18:06:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B800053E3D; Thu, 11 Jan 2024 18:05:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="XlvdxguI" X-Original-To: linux-wireless@vger.kernel.org Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 62E6752F7B; Thu, 11 Jan 2024 18:05:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40BD06LU002874; Thu, 11 Jan 2024 18:05:43 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:date:subject:mime-version:content-type :content-transfer-encoding:message-id:references:in-reply-to:to :cc; s=qcppdkim1; bh=hh/tRNJ5XrL+rWWHTNtLhbWKFUswhrmv1cBQS4WQcJE =; b=XlvdxguIi4bwdXi+QfQXHeLdgKPMPldUr2/N1VLCV+tFh8Kn2GSEib4ORTP cDKONsYqo3sXzXPMvX45falZgLiS4mJFrw81o3lZf1QNS5NzLQrw8qviDn4Tuk64 iMFtcNR8n6nvjkrn3DGrF06jN4HZYKFDh41Wk/7jpL4njO4qsQO5gEqEwIDXjCBt Uymo2GW0imsPzFi7TYyYVeniJdVyifd/ERD9TwQyaaHAv6EkKtEp68TnoJcMvhnx DOcUULVAkUd90/tbnVS8kR+u57NIpIrxw4rf2a2/w4HK0l119JjDBTfrL71v0Icv lxQtP9yMgapcKw3jOsHST2YlS+w== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vjgtjgq7t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 11 Jan 2024 18:05:43 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 40BI5gVT018207 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 11 Jan 2024 18:05:42 GMT Received: from [169.254.0.1] (10.49.16.6) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Thu, 11 Jan 2024 10:05:42 -0800 From: Jeff Johnson Date: Thu, 11 Jan 2024 10:05:30 -0800 Subject: [PATCH v2 1/3] wifi: ath12k: Remove unnecessary struct qmi_txn initializers Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-ID: <20240111-qmi-cleanup-v2-1-53343af953d5@quicinc.com> References: <20240111-qmi-cleanup-v2-0-53343af953d5@quicinc.com> In-Reply-To: <20240111-qmi-cleanup-v2-0-53343af953d5@quicinc.com> To: Kalle Valo , Jeff Johnson CC: , , X-Mailer: b4 0.12.3 X-ClientProxiedBy: nalasex01a.na.qualcomm.com (10.47.209.196) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: YaBNPeqwNgiwKuID-T_txlVtZPDJIBua X-Proofpoint-ORIG-GUID: YaBNPeqwNgiwKuID-T_txlVtZPDJIBua X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-09_01,2023-12-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 phishscore=0 suspectscore=0 bulkscore=0 clxscore=1015 priorityscore=1501 lowpriorityscore=0 spamscore=0 impostorscore=0 malwarescore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2401110142 Currently most of the ath12k QMI messaging functions define their struct qmi_txn variables with a {} initializer. However, all of these functions subsequently call qmi_txn_init(), and the very first thing that function does is zero the struct. Hence, the initializers are unnecessary. Since these consume code space and cpu cycles, remove them. No functional changes, compile tested only. Signed-off-by: Jeff Johnson --- drivers/net/wireless/ath/ath12k/qmi.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/net/wireless/ath/ath12k/qmi.c b/drivers/net/wireless/ath/ath12k/qmi.c index 536856234f3b..180e86c2a10c 100644 --- a/drivers/net/wireless/ath/ath12k/qmi.c +++ b/drivers/net/wireless/ath/ath12k/qmi.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: BSD-3-Clause-Clear /* * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved. */ #include @@ -1921,7 +1921,7 @@ static int ath12k_qmi_host_cap_send(struct ath12k_base *ab) { struct qmi_wlanfw_host_cap_req_msg_v01 req; struct qmi_wlanfw_host_cap_resp_msg_v01 resp; - struct qmi_txn txn = {}; + struct qmi_txn txn; int ret = 0; memset(&req, 0, sizeof(req)); @@ -2069,7 +2069,7 @@ static int ath12k_qmi_respond_fw_mem_request(struct ath12k_base *ab) { struct qmi_wlanfw_respond_mem_req_msg_v01 *req; struct qmi_wlanfw_respond_mem_resp_msg_v01 resp; - struct qmi_txn txn = {}; + struct qmi_txn txn; int ret = 0, i; bool delayed; @@ -2210,7 +2210,7 @@ static int ath12k_qmi_request_target_cap(struct ath12k_base *ab) { struct qmi_wlanfw_cap_req_msg_v01 req; struct qmi_wlanfw_cap_resp_msg_v01 resp; - struct qmi_txn txn = {}; + struct qmi_txn txn; unsigned int board_id = ATH12K_BOARD_ID_DEFAULT; int ret = 0; int r; @@ -2311,7 +2311,7 @@ static int ath12k_qmi_load_file_target_mem(struct ath12k_base *ab, { struct qmi_wlanfw_bdf_download_req_msg_v01 *req; struct qmi_wlanfw_bdf_download_resp_msg_v01 resp; - struct qmi_txn txn = {}; + struct qmi_txn txn; const u8 *temp = data; int ret; u32 remaining = len; @@ -2547,7 +2547,7 @@ static int ath12k_qmi_wlanfw_m3_info_send(struct ath12k_base *ab) struct m3_mem_region *m3_mem = &ab->qmi.m3_mem; struct qmi_wlanfw_m3_info_req_msg_v01 req; struct qmi_wlanfw_m3_info_resp_msg_v01 resp; - struct qmi_txn txn = {}; + struct qmi_txn txn; int ret = 0; memset(&req, 0, sizeof(req)); @@ -2598,7 +2598,7 @@ static int ath12k_qmi_wlanfw_mode_send(struct ath12k_base *ab, { struct qmi_wlanfw_wlan_mode_req_msg_v01 req; struct qmi_wlanfw_wlan_mode_resp_msg_v01 resp; - struct qmi_txn txn = {}; + struct qmi_txn txn; int ret = 0; memset(&req, 0, sizeof(req)); @@ -2651,7 +2651,7 @@ static int ath12k_qmi_wlanfw_wlan_cfg_send(struct ath12k_base *ab) struct qmi_wlanfw_wlan_cfg_resp_msg_v01 resp; struct ce_pipe_config *ce_cfg; struct service_to_pipe *svc_cfg; - struct qmi_txn txn = {}; + struct qmi_txn txn; int ret = 0, pipe_num; ce_cfg = (struct ce_pipe_config *)ab->qmi.ce_cfg.tgt_ce; -- 2.42.0