From patchwork Fri Jan 15 13:09:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 8040161 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 5DD4BBEEE5 for ; Fri, 15 Jan 2016 13:10:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 691192041A for ; Fri, 15 Jan 2016 13:10:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 875F1201B9 for ; Fri, 15 Jan 2016 13:10:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754824AbcAONJa (ORCPT ); Fri, 15 Jan 2016 08:09:30 -0500 Received: from mout.web.de ([212.227.15.3]:61245 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751002AbcAONJ2 (ORCPT ); Fri, 15 Jan 2016 08:09:28 -0500 Received: from [192.168.1.2] ([78.53.181.97]) by smtp.web.de (mrweb002) with ESMTPSA (Nemesis) id 0MXHoz-1ahLaj3uFB-00WIgH; Fri, 15 Jan 2016 14:09:09 +0100 Subject: [PATCH v3 1/3] rsi: Delete unnecessary variable initialisations in rsi_send_mgmt_pkt() To: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, Fariya Fatima , Jahnavi Meher , Kalle Valo References: <566ABCD9.1060404@users.sourceforge.net> <5687E169.4070704@users.sourceforge.net> <5698EE65.7010607@users.sourceforge.net> Cc: LKML , kernel-janitors@vger.kernel.org, Julia Lawall , "John W. Linville" From: SF Markus Elfring Message-ID: <5698EF71.7060102@users.sourceforge.net> Date: Fri, 15 Jan 2016 14:09:05 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <5698EE65.7010607@users.sourceforge.net> X-Provags-ID: V03:K0:5oMlgM2c0usTbZ5669egUA3e8hKjUpkn/Y+07cTy7LuiDLNf/js mnGcUD9MBSoPLlUoxmeAd/5yQZwhGzoomlOTCOgaCCK9P7xr35zLQpKtTSoLSwX4waLT/a+ 0WBXVcvemE2qDGeYDf0EqNcfrnruVp0yAzo2YttP/FXyn+1hhLExVMJrzJxqNrc+B06br/1 S3be3KyPnBz1QhM/vi1hw== X-UI-Out-Filterresults: notjunk:1; V01:K0:+qKc/m9ptJg=:BqlpLTEBSerpQ+g5ic3Fn+ GvsuDlM1iscK46K/8hsc09nr7GiBT5eGdpqy7BdQERuQX5BmH3d/7XwlxPftcz1CrLnDBMaKS LL5PRx+TlGFyAkV24UEOXCuPaKpC9kxqWVkonLqp42cIcYk8ytKZrL/3mUDOdDtwpqZR5dlVs nrU6GcCS+O8ZxzFAuXSIcNIWngly9DKr9r1xrOZlXEl2REMgtoOlhw3tjbb250QEhisVwCnyb VMoR/jm5SNjGqOdTFR6jDGFol5kjXxM3fCXQuMi2Yx3qZ5uNOXZymV42TVWpPZ+SnMmkaqJh8 pc3643M1ZsR1vFTT076EIzdQZVR7ve1o0O7FxDZawFZaJcz5RLH/E86vshe4neg8OaavK7WfA GfCvElr068Umr+QpJWE6y27mKaoTma667lL90DEkN+aXtYnhoInaRq8rgBsBSIJKG9pCY5GII hoQ5Cv8Nxdq0zI55VufDFTB4eTBywlpjTJ2rhj37J2IybEi/+/E0wlllK/ny4FouCqQ9PZx+s dIbq6GCFdjgmulJ3vvr4w5OifRweXPqyP6SVPU3qliiX1M7XZtqmO8uALgwes4fOKIwmHh4sL Rg3RVp54FBOkrm6hYBGtqPHep2l/8KikWI121rjLLP7WJgsvuWI+hU0+gjlkyV8I19GYvD5co UZxKfqYuAXpaGDgQKhccckolzrnPrZ96oNdgWAtEkycgRVRhFW9gSICoduYPxGa1hoZZb7tXz t43WWTSMGUT1IJgk4BYdVywMAYd1J//mxKX6qakRHOektl16fgsZjWZgNi8vIRPaI0yKDdEex xQRjrQE 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, 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 From: Markus Elfring Date: Fri, 15 Jan 2016 13:30:39 +0100 Omit explicit initialisation at the beginning for four local variables which are redefined before their first use. Signed-off-by: Markus Elfring --- drivers/net/wireless/rsi/rsi_91x_pkt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/rsi/rsi_91x_pkt.c b/drivers/net/wireless/rsi/rsi_91x_pkt.c index 702593f..571eaba 100644 --- a/drivers/net/wireless/rsi/rsi_91x_pkt.c +++ b/drivers/net/wireless/rsi/rsi_91x_pkt.c @@ -123,15 +123,15 @@ int rsi_send_mgmt_pkt(struct rsi_common *common, struct sk_buff *skb) { struct rsi_hw *adapter = common->priv; - struct ieee80211_hdr *wh = NULL; + struct ieee80211_hdr *wh; struct ieee80211_tx_info *info; - struct ieee80211_bss_conf *bss = NULL; + struct ieee80211_bss_conf *bss; struct ieee80211_hw *hw = adapter->hw; struct ieee80211_conf *conf = &hw->conf; struct skb_info *tx_params; int status = -E2BIG; - __le16 *msg = NULL; - u8 extnd_size = 0; + __le16 *msg; + u8 extnd_size; u8 vap_id = 0; info = IEEE80211_SKB_CB(skb); From patchwork Fri Jan 15 13:10:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 8040181 X-Patchwork-Delegate: kvalo@adurom.com 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2E4629F859 for ; Fri, 15 Jan 2016 13:11:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6B0122044B for ; Fri, 15 Jan 2016 13:11:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 87A2A2041A for ; Fri, 15 Jan 2016 13:11:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161015AbcAONKr (ORCPT ); Fri, 15 Jan 2016 08:10:47 -0500 Received: from mout.web.de ([212.227.15.3]:62140 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754824AbcAONKp (ORCPT ); Fri, 15 Jan 2016 08:10:45 -0500 Received: from [192.168.1.2] ([78.53.181.97]) by smtp.web.de (mrweb002) with ESMTPSA (Nemesis) id 0MAdX1-1aRRc60hAJ-00BrsV; Fri, 15 Jan 2016 14:10:29 +0100 Subject: [PATCH v3 2/3] rsi: Delete unnecessary variable initialisations in rsi_send_data_pkt() To: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, Fariya Fatima , Jahnavi Meher , Kalle Valo References: <566ABCD9.1060404@users.sourceforge.net> <5687E169.4070704@users.sourceforge.net> <5698EE65.7010607@users.sourceforge.net> Cc: LKML , kernel-janitors@vger.kernel.org, Julia Lawall , "John W. Linville" From: SF Markus Elfring Message-ID: <5698EFC4.7000308@users.sourceforge.net> Date: Fri, 15 Jan 2016 14:10:28 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <5698EE65.7010607@users.sourceforge.net> X-Provags-ID: V03:K0:D067DdEh1vLejbwqO8u9b5CihXYpbzdjgMiH14yUm4Z1g1WgSRp 8Znuh447UZyuWvBP3JbE2kQS/7gAqU+lICM3GwIjy/H6KnbzSgXphVKeHTALVcspqGebTfB 3EkMAkapBsSNx8OA+ejmqRj4fu/dX5UsAJvMxJO/GcLWj6c7ZJRwFHU1dsNElb/jhAI7Uso s/HUhe+kRcA2WYh7GwE8A== X-UI-Out-Filterresults: notjunk:1; V01:K0:ic+W007aIHM=:2S2cdA9NpEB++ipcLpe6Vf VMWfbGaxW/WZHoUvhn24Yu3MBSEW1mH2tW480xYEHNbo6RhfGScbx6pG5ZCDyJ4FbE9wyU+3y G5eK+hEEtA6XXwGuarjDp3ToWxTGS/PUBVBNMLw6TvE/OZ6+faaAN64/UUgToHO+v+Q2e5tVm 23DMbQr2BNQlWR6/7wSKU+BRxNYc9kQhCCZeumL6j5pWTGxKpNq/OhJybdKKjuUeFC+xbpFch uPsDhIlr0T4I/6oLATu/n+JQYJPwDuQHApYJG+QvO+o7woV8yR07+15dZPEBpssXindG5tMty gp5Ly6DnadkcVHcX7oT6kEQ4XaKyijeMGkFNLqty3kLkxseXeRf4M3pjcSmD2ybiBuHW/sGeH WVFx50JzoxhTTDHS1tqlZY70htChp/nPrTIeDVdOYUhXtPBnuCthcKCcb0tuOtWrYYvWccN+Q 9h7AeEsJSkqAbSv4a8/+qaS+jSM2lDtNBiwE0sFsQMGTloqvJnAgBn636kEkk1Uu1VSdu7Cuv ssH0MSwDrC05uZIv4uSXVN+H4dzqX5YBtLnv/dYiR4URFlNn9Poys1MYHcFEQr3qriUvar4OG W4WotUL5NnIWCgCK6IEzobDF8yUhK3eORo9+Ee1qC5Jam0oxDlElXEML3vaOxoLJr1boISWRd YhDGpqJQMPZ0mSKdJmoAIWnad+LvZXYj5ROLKxJmckhJPALbH46eVT/bm6R5TDMtejQ2QLQPM zSFAnNDAe3ObE1uYF6/P3kp8k5wUF55zygaAmVl+95teJj0Tglqar3qvOFzaOfDwcsSiHaAxG 5wuaIbQ 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, 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 From 017d1bb49f46266ffeb33178ddd3022d6b341d71 Mon Sep 17 00:00:00 2001 From: Markus Elfring Date: Fri, 15 Jan 2016 13:35:47 +0100 Subject: [PATCH 2/3] rsi: Delete unnecessary variable initialisations in rsi_send_data_pkt() Omit explicit initialisation at the beginning for four local variables which are redefined before their first use. Signed-off-by: Markus Elfring --- drivers/net/wireless/rsi/rsi_91x_pkt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/rsi/rsi_91x_pkt.c b/drivers/net/wireless/rsi/rsi_91x_pkt.c index 571eaba..4322df1 100644 --- a/drivers/net/wireless/rsi/rsi_91x_pkt.c +++ b/drivers/net/wireless/rsi/rsi_91x_pkt.c @@ -27,15 +27,15 @@ int rsi_send_data_pkt(struct rsi_common *common, struct sk_buff *skb) { struct rsi_hw *adapter = common->priv; - struct ieee80211_hdr *tmp_hdr = NULL; + struct ieee80211_hdr *tmp_hdr; struct ieee80211_tx_info *info; struct skb_info *tx_params; - struct ieee80211_bss_conf *bss = NULL; + struct ieee80211_bss_conf *bss; int status = -EINVAL; u8 ieee80211_size = MIN_802_11_HDR_LEN; - u8 extnd_size = 0; + u8 extnd_size; __le16 *frame_desc; - u16 seq_num = 0; + u16 seq_num; info = IEEE80211_SKB_CB(skb); bss = &info->control.vif->bss_conf;