From patchwork Sat Dec 20 16:46:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 5522931 X-Patchwork-Delegate: kvalo@adurom.com 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0F19FBEEA8 for ; Sat, 20 Dec 2014 16:44:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 409472015A for ; Sat, 20 Dec 2014 16:44:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5CA5720158 for ; Sat, 20 Dec 2014 16:44:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753290AbaLTQoJ (ORCPT ); Sat, 20 Dec 2014 11:44:09 -0500 Received: from mail-wg0-f47.google.com ([74.125.82.47]:48399 "EHLO mail-wg0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753164AbaLTQoH (ORCPT ); Sat, 20 Dec 2014 11:44:07 -0500 Received: by mail-wg0-f47.google.com with SMTP id n12so3671002wgh.20 for ; Sat, 20 Dec 2014 08:44:06 -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=SfWFMj/bnajgir7JEqtLj7rmy/+Q+TTcn3CiyPjBhiQ=; b=T8TOwHbBBD3ELGQYhDZFkHRwlVGR2GjP11HiGZjnW0tc628mr9bWy/9heoY/9U96hJ e08F9pjWqSuDS0bZ3+mO3RA7qCbhXQwqkBAWbC+91sKm79Sit4TuVPl8ilFVcNjSXza0 VUzQzKSOKuNnTsYfdFijRn1pPBmO0X5N3yaYNJU0y1JQrJxbPhLA1JTvDilC53uJTiX+ /nTs2NLTmKiUZUCFbZGjKv70tFbH37At8OR6CAwxowPpbDEyf33DQPJR2C1zwLEtVs9N aKgeBFlR2cKnRdzjRAFH3odTnH1w5viWqGAvKD5hcMbAK9deB46B60VOHzl52xyAcWvw LntA== X-Gm-Message-State: ALoCoQkjshcjaJT8y2nunsKC9tRUldXbcWAqUarOjcfKqkC0NuHD8xoUFUR6HuOBsV0wlDTNTxPb X-Received: by 10.194.110.69 with SMTP id hy5mr25715433wjb.121.1419093846702; Sat, 20 Dec 2014 08:44:06 -0800 (PST) Received: from localhost.localdomain (h-246-111.a218.priv.bahnhof.se. [85.24.246.111]) by mx.google.com with ESMTPSA id u1sm6496485wif.6.2014.12.20.08.44.05 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 20 Dec 2014 08:44:06 -0800 (PST) From: Rickard Strandqvist To: Solomon Peachy , "John W. Linville" Cc: Rickard Strandqvist , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] net: wireless: cw1200: queue.c: Remove unused function Date: Sat, 20 Dec 2014 17:46:54 +0100 Message-Id: <1419094014-8945-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=unavailable 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 Remove the function cw1200_queue_requeue_all() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist --- drivers/net/wireless/cw1200/queue.c | 27 --------------------------- drivers/net/wireless/cw1200/queue.h | 1 - 2 files changed, 28 deletions(-) diff --git a/drivers/net/wireless/cw1200/queue.c b/drivers/net/wireless/cw1200/queue.c index 9c3925f..0aaa0b4 100644 --- a/drivers/net/wireless/cw1200/queue.c +++ b/drivers/net/wireless/cw1200/queue.c @@ -415,33 +415,6 @@ int cw1200_queue_requeue(struct cw1200_queue *queue, u32 packet_id) return ret; } -int cw1200_queue_requeue_all(struct cw1200_queue *queue) -{ - struct cw1200_queue_item *item, *tmp; - struct cw1200_queue_stats *stats = queue->stats; - spin_lock_bh(&queue->lock); - - list_for_each_entry_safe_reverse(item, tmp, &queue->pending, head) { - --queue->num_pending; - ++queue->link_map_cache[item->txpriv.link_id]; - - spin_lock_bh(&stats->lock); - ++stats->num_queued; - ++stats->link_map_cache[item->txpriv.link_id]; - spin_unlock_bh(&stats->lock); - - ++item->generation; - item->packet_id = cw1200_queue_mk_packet_id(queue->generation, - queue->queue_id, - item->generation, - item - queue->pool); - list_move(&item->head, &queue->queue); - } - spin_unlock_bh(&queue->lock); - - return 0; -} - int cw1200_queue_remove(struct cw1200_queue *queue, u32 packet_id) { int ret = 0; diff --git a/drivers/net/wireless/cw1200/queue.h b/drivers/net/wireless/cw1200/queue.h index 119f9c7..45802ea 100644 --- a/drivers/net/wireless/cw1200/queue.h +++ b/drivers/net/wireless/cw1200/queue.h @@ -88,7 +88,6 @@ int cw1200_queue_get(struct cw1200_queue *queue, struct ieee80211_tx_info **tx_info, const struct cw1200_txpriv **txpriv); int cw1200_queue_requeue(struct cw1200_queue *queue, u32 packet_id); -int cw1200_queue_requeue_all(struct cw1200_queue *queue); int cw1200_queue_remove(struct cw1200_queue *queue, u32 packet_id); int cw1200_queue_get_skb(struct cw1200_queue *queue, u32 packet_id,