Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp4555920ybi; Mon, 15 Jul 2019 10:48:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqwAIjryken5AwUpxsRoiZsJ236lMRG+z0tClTX/IL8RnvsmsPa7PXoOdUJ8okaTzrDBr9la X-Received: by 2002:a17:90a:3651:: with SMTP id s75mr29964656pjb.13.1563212891523; Mon, 15 Jul 2019 10:48:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563212891; cv=none; d=google.com; s=arc-20160816; b=RwJ5x2pa/qADfqsffN0MsoaoDak3w+gDdrCuwma3beNNGVK+baLgstnJ63OHS1ry7h g6c5NVMALuCFC9j9EpmOJRw2P6oENitmhER3cGQxXbTWqoN3NqJQJ0LKsfEh+K7HPhU+ oghkW6oRRRM+PXgBR0jHdLCljXYCSgTlFKBq5auJaXDNnldmzsC2e+D3r/i3o63vpZWO u2+8kHpQFpn0go+gNH/UCiM0a0uWWqR88aDj39nWgko6vRPYWCPlqk1sC70JEOH0NcJs qhXLsfkwKUSGHPjGrDkPmD5DsCcs/6fzQxKe7UoODmY94q+OsdbDAoWB4XxcTItSvsS1 TlBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:to:from:date:dkim-signature; bh=FFqgSG9F031m7mlilYz1OsMw1AHlab2cWn77ylXznWQ=; b=JgyK2Z8X3LL4O0LiCVCLi1C2YjUr+95LDxlNVtTampwucZbyGa7rw6lGlcGB0vk1qA C4D1TpDL03aRtKMICiKV7WlYNi1WYxeSRsKmt3tqaQ2jiQGdGwKw7W8ewCj9OgXaLXKd JAt8zdiWLI76a336LujIqoyu9v7ZDMfUI5eEiTj/vn7//6Kndcc9qQSDD2jn1flBzMTu rJf0H36GBV82M9lSenhBg6pUgssOV7J37qtsnkHKdKRupXpen0b/LHqLHq3RmxEJpyxV CeNimAk0exNquFvvP2r6gJHdd0RS1iFsOHN3T1mkQzWMHWKM5a/hjbup4xP4YJhOqQfD JO1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uefMKJlV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id c17si15774771plo.46.2019.07.15.10.47.55; Mon, 15 Jul 2019 10:48:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uefMKJlV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1731903AbfGORq2 (ORCPT + 99 others); Mon, 15 Jul 2019 13:46:28 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:36699 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730235AbfGORq2 (ORCPT ); Mon, 15 Jul 2019 13:46:28 -0400 Received: by mail-pg1-f193.google.com with SMTP id l21so8064208pgm.3 for ; Mon, 15 Jul 2019 10:46:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=FFqgSG9F031m7mlilYz1OsMw1AHlab2cWn77ylXznWQ=; b=uefMKJlV21LOHRI6/JVyMde8pUMN/xGrUurNHabZhCTt3Gw7b3gFXxylWv7K/Ou1qR KRJCuiHuFlN0QWixwxJPO8zMZesdMk2kGqLPpFiK8jPjQ2xtHiIAg/vZwJgEMuiAJ0om X6QoyCAWVfuWaQBQlRTGNW6BEt2+0m0lXE/L5CHOQxonl1jjMDiLRvuFYY+cUNKj9+nl mf2IHz0qkNrKTBhVRuHyy2N3W8I/YxyNKCQ5/u3wodtHHcQN/UQfLIPxYDVU0nK9EN7a KvlIm+1yvpXID/T6ADwHhnvFq8hATQ9hOkDhriDYbrLbsUWmswdR8J2ep1ffb2UVICJs bSXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=FFqgSG9F031m7mlilYz1OsMw1AHlab2cWn77ylXznWQ=; b=eirWm7qgvxhBh4XcM6AN1XXxs4DIvN7HxRq0TzLv5jgjI6q0woX8uOpeiMdLXfZxSS s2Bs2SwMYmeR+Hv5RKIX1nFIX9CX/hV+ioGM+LDFj1DBiJXXqjECK9jMKq2mcygGjUNp 1vspp1IaNThRzUGUpOJ1yQ9/yoV2HxNZAC6Tzrn30IkweJPetCG2Pklu71aGTcGytrTi ZvUGVxAvdt+jQ3W3o+mhxEJ32qYsxSZM5Q9Et2P+hh4VgsedhxRz+tre4SlduRshywzZ YOiXuBPWPyzCrip6m+0y5aRiUf8syjr7oK9fEDcDf86fdmmjf3tPKVfQQsoDlcTne1hF MMbA== X-Gm-Message-State: APjAAAXTMcez3mP9jlphK3Qzf4MW61O7v1oGAqcNGrrGHRKO6PD+b+KW vE0veVGMVPd6v+HRrzMMcOQ= X-Received: by 2002:a63:4c14:: with SMTP id z20mr28098485pga.360.1563212787344; Mon, 15 Jul 2019 10:46:27 -0700 (PDT) Received: from hari-Inspiron-1545 ([183.83.86.126]) by smtp.gmail.com with ESMTPSA id 97sm17195643pjz.12.2019.07.15.10.46.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Jul 2019 10:46:26 -0700 (PDT) Date: Mon, 15 Jul 2019 23:16:18 +0530 From: Hariprasad Kelam To: Greg Kroah-Hartman , Vatsala Narang , Nishka Dasgupta , Emanuel Bennici , Hardik Singh Rathore , Madhumitha Prabakaran , Michael Straube , Hariprasad Kelam , Hans de Goede , Shobhit Kukreti , Paolo Abeni , Arnd Bergmann , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH] staging: rtl8723bs: core: Change return type of init_mlme_ext_priv Message-ID: <20190715174618.GA8947@hari-Inspiron-1545> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As init_mlme_ext_priv function always returns SUCCESS , We can change return type from int to void. Fixes below issue identified by coccicheck drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:464:5-8: Unneeded variable: "res". Return "_SUCCESS" on line 492 Signed-off-by: Hariprasad Kelam --- drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 6 +----- drivers/staging/rtl8723bs/include/rtw_mlme_ext.h | 2 +- drivers/staging/rtl8723bs/os_dep/os_intfs.c | 6 +----- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c index 4285844..0629117 100644 --- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c @@ -459,9 +459,8 @@ static u8 init_channel_set(struct adapter *padapter, u8 ChannelPlan, RT_CHANNEL_ return chanset_size; } -int init_mlme_ext_priv(struct adapter *padapter) +void init_mlme_ext_priv(struct adapter *padapter) { - int res = _SUCCESS; struct registry_priv *pregistrypriv = &padapter->registrypriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; @@ -488,9 +487,6 @@ int init_mlme_ext_priv(struct adapter *padapter) #ifdef DBG_FIXED_CHAN pmlmeext->fixed_chan = 0xFF; #endif - - return res; - } void free_mlme_ext_priv(struct mlme_ext_priv *pmlmeext) diff --git a/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h b/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h index 733bb94..70cd8c0 100644 --- a/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h +++ b/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h @@ -535,7 +535,7 @@ struct mlme_ext_priv }; void init_mlme_default_rate_set(struct adapter *padapter); -int init_mlme_ext_priv(struct adapter *padapter); +void init_mlme_ext_priv(struct adapter *padapter); int init_hw_mlme_ext(struct adapter *padapter); void free_mlme_ext_priv (struct mlme_ext_priv *pmlmeext); extern void init_mlme_ext_timer(struct adapter *padapter); diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c b/drivers/staging/rtl8723bs/os_dep/os_intfs.c index 544e799..d2decb3 100644 --- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c +++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c @@ -768,11 +768,7 @@ u8 rtw_init_drv_sw(struct adapter *padapter) goto exit; } - if (init_mlme_ext_priv(padapter) == _FAIL) { - RT_TRACE(_module_os_intfs_c_, _drv_err_, ("\n Can't init mlme_ext_priv\n")); - ret8 = _FAIL; - goto exit; - } + init_mlme_ext_priv(padapter); if (_rtw_init_xmit_priv(&padapter->xmitpriv, padapter) == _FAIL) { DBG_871X("Can't _rtw_init_xmit_priv\n"); -- 2.7.4