From patchwork Sun Jan 18 00:59:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 5652661 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id BCFF3C058D for ; Sun, 18 Jan 2015 00:56:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B8B922038F for ; Sun, 18 Jan 2015 00:56:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A84712038A for ; Sun, 18 Jan 2015 00:56:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751414AbbARA4D (ORCPT ); Sat, 17 Jan 2015 19:56:03 -0500 Received: from mail-wi0-f169.google.com ([209.85.212.169]:58809 "EHLO mail-wi0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751267AbbARA4B (ORCPT ); Sat, 17 Jan 2015 19:56:01 -0500 Received: by mail-wi0-f169.google.com with SMTP id bs8so10543914wib.0 for ; Sat, 17 Jan 2015 16:56:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=SnNsyXCZBZgC8CKPhUfu21KqXWYmq8ZFXPYoNYBMSBc=; b=KqVbsvTvpIdURDEmwqIQ2zwL3PdXjAWFAR7s6O3n+//TC71SjRB/u8deJgpr7+4WEH AeILTEkOOFlZDuPBIi7+SjK3x3kJSgebVVV9y2L1AimtfCljDk8vXR5grZG5+tHf6tzw SbGPc1WSqFZNU1hXR3qrOD9R3jS3nGOH1rkC/pDfcFfCbQzZEkEqO0hC8lakmIRF9I8g iFBVjbgf3Z8exoZKkOOGGQIWC/QrL2t6j3tb6/Q8AQEqf7MgP2y0besTT5Vyl/VNW9go U/O/uxRbHc77fyhE7aHu3+/bSiZuC0xTExTKzjtir4bkvfXn8IxPXpfiBrp8U1YC6FAY ZTIA== X-Gm-Message-State: ALoCoQkJ/TyucGRwPIwmndyfzNLirPzMEEqa3x93I2MHcHVWEIzsmFs7W4R9F8GEuJoFw6PTDLj2 X-Received: by 10.194.201.103 with SMTP id jz7mr32607433wjc.14.1421542560769; Sat, 17 Jan 2015 16:56:00 -0800 (PST) Received: from localhost.localdomain (h-246-111.a218.priv.bahnhof.se. [85.24.246.111]) by mx.google.com with ESMTPSA id a1sm11552884wjx.28.2015.01.17.16.55.59 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 17 Jan 2015 16:55:59 -0800 (PST) From: Rickard Strandqvist To: Larry Finger , Jes Sorensen Cc: Rickard Strandqvist , Greg Kroah-Hartman , Tina Ruchandani , linux-wireless@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] staging: rtl8723au: core: rtw_cmd: Remove unused functions Date: Sun, 18 Jan 2015 01:59:09 +0100 Message-Id: <1421542749-17843-1-git-send-email-rickard_strandqvist@spectrumdigital.se> X-Mailer: git-send-email 1.7.10.4 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Removes some functions that are not used anywhere: rtw_set_ch_cmd23a() rtw_cmd_clr_isr23a() This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist --- drivers/staging/rtl8723au/core/rtw_cmd.c | 61 --------------------------- drivers/staging/rtl8723au/include/rtw_cmd.h | 2 - 2 files changed, 63 deletions(-) diff --git a/drivers/staging/rtl8723au/core/rtw_cmd.c b/drivers/staging/rtl8723au/core/rtw_cmd.c index 60e0ded..2447a56 100644 --- a/drivers/staging/rtl8723au/core/rtw_cmd.c +++ b/drivers/staging/rtl8723au/core/rtw_cmd.c @@ -245,11 +245,6 @@ exit: return res; } -void rtw_cmd_clr_isr23a(struct cmd_priv *pcmdpriv) -{ - pcmdpriv->cmd_done_cnt++; -} - void rtw_free_cmd_obj23a(struct cmd_obj *pcmd) { @@ -852,62 +847,6 @@ exit: return res; } -/* - * This is only ever called from on_action_spct23a_ch_switch () which isn't - * called from anywhere itself - */ -int rtw_set_ch_cmd23a(struct rtw_adapter *padapter, u8 ch, u8 bw, u8 ch_offset, - u8 enqueue) -{ - struct cmd_obj *pcmdobj; - struct set_ch_parm *set_ch_parm; - struct cmd_priv *pcmdpriv = &padapter->cmdpriv; - int res = _SUCCESS; - - DBG_8723A("%s(%s): ch:%u, bw:%u, ch_offset:%u\n", __func__, - padapter->pnetdev->name, ch, bw, ch_offset); - - /* check input parameter */ - - /* prepare cmd parameter */ - set_ch_parm = kzalloc(sizeof(*set_ch_parm), GFP_KERNEL); - if (!set_ch_parm) { - res = _FAIL; - goto exit; - } - set_ch_parm->ch = ch; - set_ch_parm->bw = bw; - set_ch_parm->ch_offset = ch_offset; - - if (enqueue) { - /* need enqueue, prepare cmd_obj and enqueue */ - pcmdobj = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL); - if (!pcmdobj) { - kfree(set_ch_parm); - res = _FAIL; - goto exit; - } - - init_h2fwcmd_w_parm_no_rsp(pcmdobj, set_ch_parm, - GEN_CMD_CODE(_SetChannel)); - res = rtw_enqueue_cmd23a(pcmdpriv, pcmdobj); - } else { - /* no need to enqueue, do the cmd hdl directly and - free cmd parameter */ - if (H2C_SUCCESS != set_ch_hdl23a(padapter, (u8 *)set_ch_parm)) - res = _FAIL; - - kfree(set_ch_parm); - } - - /* do something based on res... */ -exit: - - DBG_8723A("%s(%s): res:%u\n", __func__, padapter->pnetdev->name, res); - - return res; -} - static void traffic_status_watchdog(struct rtw_adapter *padapter) { u8 bEnterPS; diff --git a/drivers/staging/rtl8723au/include/rtw_cmd.h b/drivers/staging/rtl8723au/include/rtw_cmd.h index 7104410..204c10d 100644 --- a/drivers/staging/rtl8723au/include/rtw_cmd.h +++ b/drivers/staging/rtl8723au/include/rtw_cmd.h @@ -99,7 +99,6 @@ int rtw_init_cmd_priv23a(struct cmd_priv *pcmdpriv); u32 rtw_init_evt_priv23a (struct evt_priv *pevtpriv); void rtw_free_evt_priv23a (struct evt_priv *pevtpriv); -void rtw_cmd_clr_isr23a(struct cmd_priv *pcmdpriv); void rtw_evt_notify_isr(struct evt_priv *pevtpriv); enum rtw_drvextra_cmd_id @@ -713,7 +712,6 @@ int rtw_ps_cmd23a(struct rtw_adapter*padapter); int rtw_chk_hi_queue_cmd23a(struct rtw_adapter*padapter); #endif -int rtw_set_ch_cmd23a(struct rtw_adapter*padapter, u8 ch, u8 bw, u8 ch_offset, u8 enqueue); int rtw_set_chplan_cmd(struct rtw_adapter*padapter, u8 chplan, u8 enqueue); int rtw_led_blink_cmd(struct rtw_adapter*padapter, struct led_8723a *pLed); int rtw_set_csa_cmd(struct rtw_adapter*padapter, u8 new_ch_no);