Return-path: Received: from mail-gx0-f16.google.com ([209.85.217.16]:47690 "EHLO mail-gx0-f16.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754343AbYJBNsY (ORCPT ); Thu, 2 Oct 2008 09:48:24 -0400 Received: by gxk9 with SMTP id 9so1341739gxk.13 for ; Thu, 02 Oct 2008 06:48:22 -0700 (PDT) Message-ID: (sfid-20081002_154834_220380_D03B2C13) Date: Thu, 2 Oct 2008 16:48:22 +0300 From: "Rami Rosen" To: "Johannes Berg" Subject: Re: [PATCH] [RESEND] mac80211: remove redundant check in ieee80211_master_start_xmit (net/mac80211/tx.c) Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org In-Reply-To: <1222954031.24551.51.camel@johannes.berg> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_2860_2035525.1222955302544" References: <1222954031.24551.51.camel@johannes.berg> Sender: linux-wireless-owner@vger.kernel.org List-ID: ------=_Part_2860_2035525.1222955302544 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, - This patch (against the linux-wireless-next git tree) removes a redundant check in ieee80211_master_start_xmit (net/mac80211/tx.c) and adjust indentation in this method accordingly. In this method, there is no need to call again the ieee80211_is_data() method; this is checked immediately before, in the "if" command (we will not enter this block unless ieee80211_is_data() is true, so that the "and" (&&) condition in that "if" command will be fullfilled ). Regards, Rami Rosen Signed-off-by: Rami Rosen On Thu, Oct 2, 2008 at 4:27 PM, Johannes Berg wrote: > On Thu, 2008-10-02 at 15:56 +0300, Rami Rosen wrote: >> Hi, >> >> - This patch (against the linux-wireless-next git tree) removes a >> redundant check in ieee80211_master_start_xmit (net/mac80211/tx.c). >> >> In this method, there is no need to call again the >> ieee80211_is_data() method; this is checked immediately before, in the >> "if" command (we will not enter this block unless ieee80211_is_data() >> is true, so that the "and" (&&) condition in that "if" command will be >> fullfilled ). > > You should un-indent the code accordingly. > > johannes > ------=_Part_2860_2035525.1222955302544 Content-Type: text/plain; name=patch.txt Content-Transfer-Encoding: base64 X-Attachment-Id: f_fltfy7w41 Content-Disposition: attachment; filename=patch.txt ZGlmZiAtLWdpdCBhL25ldC9tYWM4MDIxMS90eC5jIGIvbmV0L21hYzgwMjExL3R4LmMKaW5kZXgg MGNjMmUyMy4uNjY3MzI1MiAxMDA2NDQKLS0tIGEvbmV0L21hYzgwMjExL3R4LmMKKysrIGIvbmV0 L21hYzgwMjExL3R4LmMKQEAgLTEyOTYsMTYgKzEyOTYsMTQgQEAgaW50IGllZWU4MDIxMV9tYXN0 ZXJfc3RhcnRfeG1pdChzdHJ1Y3Qgc2tfYnVmZiAqc2tiLAogCiAJaWYgKGllZWU4MDIxMV92aWZf aXNfbWVzaCgmb3NkYXRhLT52aWYpICYmCiAJICAgIGllZWU4MDIxMV9pc19kYXRhKGhkci0+ZnJh bWVfY29udHJvbCkpIHsKLQkJaWYgKGllZWU4MDIxMV9pc19kYXRhKGhkci0+ZnJhbWVfY29udHJv bCkpIHsKLQkJCWlmIChpc19tdWx0aWNhc3RfZXRoZXJfYWRkcihoZHItPmFkZHIzKSkKLQkJCQlt ZW1jcHkoaGRyLT5hZGRyMSwgaGRyLT5hZGRyMywgRVRIX0FMRU4pOwotCQkJZWxzZQotCQkJCWlm IChtZXNoX25leHRob3BfbG9va3VwKHNrYiwgb3NkYXRhKSkKLQkJCQkJcmV0dXJuICAwOwotCQkJ aWYgKG1lbWNtcChvZGV2LT5kZXZfYWRkciwgaGRyLT5hZGRyNCwgRVRIX0FMRU4pICE9IDApCi0J CQkJSUVFRTgwMjExX0lGU1RBX01FU0hfQ1RSX0lOQygmb3NkYXRhLT51Lm1lc2gsCi0JCQkJCQkJ ICAgICBmd2RlZF9mcmFtZXMpOwotCQl9CisJCWlmIChpc19tdWx0aWNhc3RfZXRoZXJfYWRkciho ZHItPmFkZHIzKSkKKwkJCW1lbWNweShoZHItPmFkZHIxLCBoZHItPmFkZHIzLCBFVEhfQUxFTik7 CisJCWVsc2UKKw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