From patchwork Wed Jun 25 10:18:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jahnavi Meher X-Patchwork-Id: 4419091 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9E7CC9F26E for ; Wed, 25 Jun 2014 10:18:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 79C092038F for ; Wed, 25 Jun 2014 10:18:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5381520381 for ; Wed, 25 Jun 2014 10:18:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753055AbaFYKSZ (ORCPT ); Wed, 25 Jun 2014 06:18:25 -0400 Received: from mail-pb0-f54.google.com ([209.85.160.54]:62856 "EHLO mail-pb0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750851AbaFYKSY (ORCPT ); Wed, 25 Jun 2014 06:18:24 -0400 Received: by mail-pb0-f54.google.com with SMTP id un15so1531922pbc.27 for ; Wed, 25 Jun 2014 03:18:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id; bh=a5+5cR+yiH1kLzMV/8mmF/jwToSEZRCr+ukHTvQIorU=; b=AYVOsV8kwJe0Zf2IeJDCPmhqDHuVl9Zm50/xioU/32AFNozMu6aqJJdULNP/y5BFO9 4aJndyoM0CPU1mWCxj/vjd9sPOYTgV3yl2FTiDaavjwNQz1WBCbJcxKOutBAhds7DUzU +7uFHooNBvCAjDvsTt8jRqRQqWmGvObe/R+7Vjev1ybStHsLRTn8CBUJpJypbnvaQOL7 yzgxNsRXe3pV9lCEKXJO2lf/FSrWznvwFMyA+MBnKCPk1ei0qVqrjuGQ6c3SuRxk/JxZ 8dLAXBAhrDYBJpOKIGJyH6a/8Hov3znBHba6pM3jdilrcHFXyR9mL9UVeGcJ+4bQQFad DcAg== X-Received: by 10.68.137.193 with SMTP id qk1mr9882656pbb.155.1403691504134; Wed, 25 Jun 2014 03:18:24 -0700 (PDT) Received: from localhost.localdomain ([115.248.87.14]) by mx.google.com with ESMTPSA id be7sm15959605pad.9.2014.06.25.03.18.22 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 25 Jun 2014 03:18:23 -0700 (PDT) From: Jahnavi Meher To: Subject: [PATCH 2/2] rsi: Fixed warnings reported by static code analyzers. Date: Wed, 25 Jun 2014 15:48:15 +0530 Message-Id: <1403691495-5001-1-git-send-email-jahnavi.meher@gmail.com> X-Mailer: git-send-email 1.7.1 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.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, 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 Fixed a warning related to incorrect return type and removed an unnecessary semi colon. Signed-off-by: Jahnavi Meher --- drivers/net/wireless/rsi/rsi_91x_core.c | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/rsi/rsi_91x_core.c b/drivers/net/wireless/rsi/rsi_91x_core.c index 1cd0914..f3d3995 100644 --- a/drivers/net/wireless/rsi/rsi_91x_core.c +++ b/drivers/net/wireless/rsi/rsi_91x_core.c @@ -92,6 +92,7 @@ static u32 rsi_get_num_pkts_dequeue(struct rsi_common *common, u8 q_num) struct sk_buff *skb; u32 pkt_cnt = 0; s16 txop = common->tx_qinfo[q_num].txop * 32; + __le16 r_txop; struct ieee80211_rate rate; rate.bitrate = RSI_RATE_MCS0 * 5 * 10; /* Convert to Kbps */ @@ -104,10 +105,11 @@ static u32 rsi_get_num_pkts_dequeue(struct rsi_common *common, u8 q_num) return 0; do { - txop -= ieee80211_generic_frame_duration(adapter->hw, - adapter->vifs[0], - common->band, - skb->len, &rate); + r_txop = ieee80211_generic_frame_duration(adapter->hw, + adapter->vifs[0], + common->band, + skb->len, &rate); + txop -= le16_to_cpu(r_txop); pkt_cnt += 1; /*checking if pkts are still there*/ if (skb_queue_len(&common->tx_queue[q_num]) - pkt_cnt) @@ -191,7 +193,7 @@ get_queue_num: if (q_num == VO_Q || q_num == VI_Q) { common->pkt_cnt = rsi_get_num_pkts_dequeue(common, q_num); common->pkt_cnt -= 1; - }; + } return q_num; }