Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp5462464pxb; Sun, 7 Nov 2021 12:52:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJyQx3OBYV8rD1IOMCM4HBDC7Eo2D7WDyEmqXAYO6hEM3GpQN9K2zMJbraQhs1wQtMSxkAOC X-Received: by 2002:a6b:ee10:: with SMTP id i16mr9853137ioh.98.1636318374486; Sun, 07 Nov 2021 12:52:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636318374; cv=none; d=google.com; s=arc-20160816; b=l6SKBFluQZs/IvvnLXo9S/1OLjiXwpBAnr8c7FWskO3ndjmLo+wPx/GC7dzJ/ep0QR dB2u9INhFe94hhI9LYTIkJ7qzHYQeeD8To1/mQrbw1+KE4QUneugnLUsQSyMx4sfLMCU hhA2KGMW5kWoGFN8qOTfQ3Luv2uUeefaKS5DLmOcBi2JafgHRNnd31xy83711zygQ+m5 u9mdgCbJB5UOs8ONa2T467Q74EMqIdXWKVyaM5uXVOoEkjFuAKwudtgtZf8IgBzw8UM/ hT/9M1FDpzW3uvOe1+Za8qreRWy2swXTyYK6k6PEKZ4UDVRZ8Taayp25JkZFhElsT4Ai bHDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=mu53NIDDoFP2FNYr7iEB3rEkhW3EvAwGtudvbec6i1s=; b=iKz40kR7N33K/fazDFHo7y+NGFGCA7Ya+cFmgQtQm8YQwSXVa8FRukhhJaI+m719mu Va4k8SHbxAI4rlteD8ltArSufPMqJqeS47vgiavpVtEDYYgITxWgxo7lgrDnbxrO2RYu 8ovbS5ipNyZBRpj5aALvUX0C6FuNF8JVRv2QyFOH/THi3KlzB72a+cmr1cJDwyiDnUD2 7O8rTNi8It4+MEGD09IhM4/fKalN/ChjBSarHmKPs3+M0j9gpz39sd1ku0MDIxwJNg2j GgVatO8AnT5GqokAZF12fOpTJy6FEz+tiiGAsW/k1ngvWoXD8c818+NRrxurubXJGfIS G/FQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=k2ZgHcuz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h24si20639448ioe.67.2021.11.07.12.52.41; Sun, 07 Nov 2021 12:52:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=k2ZgHcuz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235238AbhKGQqI (ORCPT + 99 others); Sun, 7 Nov 2021 11:46:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233677AbhKGQqF (ORCPT ); Sun, 7 Nov 2021 11:46:05 -0500 Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8A47C061570 for ; Sun, 7 Nov 2021 08:43:22 -0800 (PST) Received: by mail-pl1-x633.google.com with SMTP id q17so2154994plr.11 for ; Sun, 07 Nov 2021 08:43:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=mu53NIDDoFP2FNYr7iEB3rEkhW3EvAwGtudvbec6i1s=; b=k2ZgHcuzmu3dJkqZh5WRCan3LLmt6CPEL9CG/WP+7azhJHgoaxi43uXwZCSg2ud6Q+ aR96OLZHJJDYjtqYuW/7ThVdSP2Glw6Ngfht3NcZ7JWDqWYq/f9lY1e8NYFF7GiCn26C KVEik7/k65JnkCYylfQ9iQn6juwo2bidmZE7duo4B57FL5ABq3QW4MsRapr2BEbjyoMV Vwrz/nFMauGaWSW7yyZoHkP+IJcwLOA2Iy4jZPLeSkCMyGDkE/IxryhHIhDRR0x6IDAH 3DSILQprrSSLWuGBTMP3mM2QZ7oGQs+iIaeJXAUhXR6h2JiGHLs19bGK06oDm5wRjUTx Fpbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=mu53NIDDoFP2FNYr7iEB3rEkhW3EvAwGtudvbec6i1s=; b=EQplo/GUWHy/pQI9gShbtmb2S2OCfaJV2DvPsLuf/2gXAjOUB4nZVuItD74QSZJsaA SiWw8OqOQtmsCjc7cQKw7NXa5ZzQQt0o3tuzKpEpu8r+yEKLJlsTl0cR1fFbQVNYP5Lh d/9Hd29xP0m1CDN5U465+EPzBXDegt7jQULDHPY9K2Bne/KVtCM0kBZa9mV4k5rt8TRU Nx3gUkb/4FrzWo9v9jzeld4fOGjOzfLES8vmxbgpXZncY+dJQy8ulnf0izMOwCai0JUx lABSt7k6SAMP016HFaAuoR7RG+vecgUffwcGKU4TxnAZWu2bZOAprSzSSwqGrcr6jfCZ dWwg== X-Gm-Message-State: AOAM533WxZ1SZ7dTHOZnEn2mw60dEH+DUymhua3X6YbE2vlao5go5MB6 yIS6PaP9IX8A3uyRoNkb9Qg= X-Received: by 2002:a17:90b:4a50:: with SMTP id lb16mr23987566pjb.147.1636303402305; Sun, 07 Nov 2021 08:43:22 -0800 (PST) Received: from Sauravs-MacBook-Air.local ([59.88.109.27]) by smtp.gmail.com with ESMTPSA id l17sm14003627pfc.94.2021.11.07.08.43.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Nov 2021 08:43:21 -0800 (PST) Date: Sun, 7 Nov 2021 22:13:10 +0530 From: Saurav Girepunje To: Larry.Finger@lwfinger.net, phil@philpotter.co.uk, gregkh@linuxfoundation.org, straube.linux@gmail.com, saurav.girepunje@gmail.com, martin@kaiser.cx, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Cc: saurav.girepunje@hotmail.com Subject: [PATCH] staging: r8188eu: os_dep: Change the return type of function Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Change the return type of rtw_init_default_value function from u8 to void. This function always return success. This is called from rtw_init_drv_sw where the return value from this function is assign to local variable but the local variable value is never checked. After change the return type to void remove the local variable ret8 in rtw_init_drv_sw function. Signed-off-by: Saurav Girepunje --- drivers/staging/r8188eu/os_dep/os_intfs.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/staging/r8188eu/os_dep/os_intfs.c b/drivers/staging/r8188eu/os_dep/os_intfs.c index ec96e837ab88..6b38b2d26d8b 100644 --- a/drivers/staging/r8188eu/os_dep/os_intfs.c +++ b/drivers/staging/r8188eu/os_dep/os_intfs.c @@ -398,7 +398,7 @@ void rtw_stop_drv_threads(struct adapter *padapter) _rtw_down_sema(&padapter->cmdpriv.terminate_cmdthread_sema); } -static u8 rtw_init_default_value(struct adapter *padapter) +static void rtw_init_default_value(struct adapter *padapter) { struct registry_priv *pregistrypriv = &padapter->registrypriv; struct xmit_priv *pxmitpriv = &padapter->xmitpriv; @@ -443,7 +443,6 @@ static u8 rtw_init_default_value(struct adapter *padapter) padapter->bRxRSSIDisplay = 0; padapter->bNotifyChannelChange = 0; padapter->bShowGetP2PState = 1; - return _SUCCESS; } u8 rtw_reset_drv_sw(struct adapter *padapter) @@ -478,8 +477,6 @@ u8 rtw_reset_drv_sw(struct adapter *padapter) u8 rtw_init_drv_sw(struct adapter *padapter) { - u8 ret8 = _SUCCESS; - if ((rtw_init_cmd_priv(&padapter->cmdpriv)) == _FAIL) return _FAIL; @@ -519,7 +516,7 @@ u8 rtw_init_drv_sw(struct adapter *padapter) rtw_init_pwrctrl_priv(padapter); - ret8 = rtw_init_default_value(padapter); + rtw_init_default_value(padapter); rtl8188e_init_dm_priv(padapter); rtl8188eu_InitSwLeds(padapter); @@ -528,7 +525,7 @@ u8 rtw_init_drv_sw(struct adapter *padapter) spin_lock_init(&padapter->br_ext_lock); - return ret8; + return _SUCCESS; } void rtw_cancel_all_timer(struct adapter *padapter) -- 2.33.0