From patchwork Mon Jan 23 20:53:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 47393 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1811220wrn; Mon, 23 Jan 2023 12:56:48 -0800 (PST) X-Google-Smtp-Source: AMrXdXt1r9iUAHi9dfjITRoiCCYqT+vXEpVhHfrieDCRu1YiUYjfHzQiYD+DxM1uVG6ATBrmn4Yf X-Received: by 2002:a05:6a20:6a92:b0:b8:7ef5:4308 with SMTP id bi18-20020a056a206a9200b000b87ef54308mr24591942pzb.23.1674507408108; Mon, 23 Jan 2023 12:56:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674507408; cv=none; d=google.com; s=arc-20160816; b=NRr4fYkzG6vIPiTAIZ5E0wn8ToKBKKTv1OjISJCqzGUbJ9i32i9CqYt6LS/fxRCaR0 o1dtuZaCkt4fNrmI8JjV/KzTUyO2COKhLek056J5Fuq3UKF4YZkGn1RVsqZHx21LQDm2 mfMSNHA90KKBXKwS5tvbXN0wWuoeTLBsh5TY7iGaslk8F5sfdltgSzo52p0zd+VuYHOs JBeCn1j73VHL0mWxuCfNPqfsB4hUe4qfnHRPJLed/t2rnS2d5rXMiRbN9QI/SlZ6NXFu puNHK9VuESot10U9gBMaMlHAFuZ2AoPiq5VqcdYD3pmukciEKpBC1IN//q+TJzvGzkpq xOTg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=gIfxpUx4ShmJTqgUpEyNp5jIpKtGczbk1oX++51Ybvo=; b=r4PoAmwT+rFLRMmBODt/3GeecT2Tsw5yTDRsVZPJvosQDzlbUvV3KxatBbAVmJ7O+8 MpSa3fVQQ9oHbKv9tNFCX0laqWscCPz4dfsqzFIAGI+YbA69sEiUiEZzKEeVzqWvBOQY bNctWTRSFuOIP/sJj9ZApAtBr/3zab1shawhOdnDEAc2gBhvnpKMbd375UDGqGKNM5Iq DhjmLSPEZNy7zEVoEYXioq/T2YspJaabkJCBhh7yEDnWKVQJBRIsX9yLnKixRaYhnSiT z7XszZ/JMVgaZeLVwkVPt66oJvgd46ujBei5S/zSukTYCqoKec9aNpGtbIm0tkFWit1p 9llQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e129-20020a636987000000b0046b3ba2c806si20360608pgc.145.2023.01.23.12.56.35; Mon, 23 Jan 2023 12:56:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232312AbjAWUyc (ORCPT + 99 others); Mon, 23 Jan 2023 15:54:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232029AbjAWUyO (ORCPT ); Mon, 23 Jan 2023 15:54:14 -0500 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA8DE36085 for ; Mon, 23 Jan 2023 12:54:11 -0800 (PST) Received: from ipservice-092-217-089-134.092.217.pools.vodafone-ip.de ([92.217.89.134] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1pK3pN-0000Lk-GG; Mon, 23 Jan 2023 21:54:05 +0100 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , Pavel Skripkin , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 13/23] staging: r8188eu: make rtw_chk_hi_queue_cmd a void function Date: Mon, 23 Jan 2023 21:53:32 +0100 Message-Id: <20230123205342.229589-14-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230123205342.229589-1-martin@kaiser.cx> References: <20230123205342.229589-1-martin@kaiser.cx> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755848279854021855?= X-GMAIL-MSGID: =?utf-8?q?1755848279854021855?= Both callers of rtw_chk_hi_queue_cmd do not check the return value. Convert rtw_chk_hi_queue_cmd to a void function. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_cmd.c | 16 +++++----------- drivers/staging/r8188eu/include/rtw_cmd.h | 2 +- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_cmd.c b/drivers/staging/r8188eu/core/rtw_cmd.c index eb79435da355..d57360a68fb3 100644 --- a/drivers/staging/r8188eu/core/rtw_cmd.c +++ b/drivers/staging/r8188eu/core/rtw_cmd.c @@ -1197,24 +1197,20 @@ static void rtw_chk_hi_queue_hdl(struct adapter *padapter) } } -u8 rtw_chk_hi_queue_cmd(struct adapter *padapter) +void rtw_chk_hi_queue_cmd(struct adapter *padapter) { struct cmd_obj *ph2c; struct drvextra_cmd_parm *pdrvextra_cmd_parm; struct cmd_priv *pcmdpriv = &padapter->cmdpriv; - u8 res = _SUCCESS; ph2c = kzalloc(sizeof(*ph2c), GFP_ATOMIC); - if (!ph2c) { - res = _FAIL; - goto exit; - } + if (!ph2c) + return; pdrvextra_cmd_parm = kzalloc(sizeof(*pdrvextra_cmd_parm), GFP_ATOMIC); if (!pdrvextra_cmd_parm) { kfree(ph2c); - res = _FAIL; - goto exit; + return; } pdrvextra_cmd_parm->ec_id = CHECK_HIQ_WK_CID; @@ -1223,9 +1219,7 @@ u8 rtw_chk_hi_queue_cmd(struct adapter *padapter) init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm, GEN_CMD_CODE(_Set_Drv_Extra)); - res = rtw_enqueue_cmd(pcmdpriv, ph2c); -exit: - return res; + rtw_enqueue_cmd(pcmdpriv, ph2c); } u8 rtw_c2h_wk_cmd(struct adapter *padapter, u8 *c2h_evt) diff --git a/drivers/staging/r8188eu/include/rtw_cmd.h b/drivers/staging/r8188eu/include/rtw_cmd.h index 9df7d4bf441d..e8eecd52d1d8 100644 --- a/drivers/staging/r8188eu/include/rtw_cmd.h +++ b/drivers/staging/r8188eu/include/rtw_cmd.h @@ -743,7 +743,7 @@ u8 rtw_rpt_timer_cfg_cmd(struct adapter *padapter, u16 minRptTime); u8 rtw_antenna_select_cmd(struct adapter *padapter, u8 antenna, u8 enqueue); u8 rtw_ps_cmd(struct adapter *padapter); -u8 rtw_chk_hi_queue_cmd(struct adapter *padapter); +void rtw_chk_hi_queue_cmd(struct adapter *padapter); u8 rtw_set_chplan_cmd(struct adapter *padapter, u8 chplan);