All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct use of
@ 2008-02-26 20:44 ` Julia Lawall
  0 siblings, 0 replies; 35+ messages in thread
From: Julia Lawall @ 2008-02-26 20:44 UTC (permalink / raw)
  To: yi.zhu, linux-wireless, ipw3945-devel, linux-kernel,
	kernel-janitors

From: Julia Lawall <julia@diku.dk>

In commit e6bafba5b4765a5a252f1b8d31cbf6d2459da337, a bug was fixed that
involved converting !x & y to !(x & y).  The code below shows the same
pattern, and thus should perhaps be fixed in the same way.

This is not tested and clearly changes the semantics, so it is only
something to consider.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@ expression E1,E2; @@
(
  !E1 & !E2
|
- !E1 & E2
+ !(E1 & E2)
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>

---

diff -u -p a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c 2008-02-05 20:56:01.000000000 +0100
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c 2008-02-26 08:09:12.000000000 +0100
@@ -4589,7 +4589,7 @@ static u8 iwl4965_is_fat_tx_allowed(stru
 
 	if (sta_ht_inf) {
 		if ((!sta_ht_inf->ht_supported) ||
-		   (!sta_ht_inf->cap & IEEE80211_HT_CAP_SUP_WIDTH))
+		   (!(sta_ht_inf->cap & IEEE80211_HT_CAP_SUP_WIDTH)))
 			return 0;
 	}
 

^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2008-03-05 12:37 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-26 20:44 [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct use of Julia Lawall
2008-02-26 20:44 ` [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct use of ! and & Julia Lawall
2008-02-26 22:47 ` [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct use of.and & Tomas Winkler
2008-02-26 22:47   ` [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct use of ! and & Tomas Winkler
2008-02-27  0:59   ` [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct John W. Linville
2008-02-27  0:59     ` [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct use of ! and & John W. Linville
     [not found] ` <Pine.LNX.4.64.0802262143570.18200-QfmoRoYWmW9knbxzx/v8hQ@public.gmane.org>
2008-03-05  6:38   ` [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct Ingo Molnar
2008-03-05  6:38     ` [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct use of ! and & Ingo Molnar
2008-03-05  6:38     ` Ingo Molnar
2008-03-05  6:49     ` [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct use of.and & Christopher Li
2008-03-05  6:49       ` [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct use of ! and & Christopher Li
2008-03-05  7:02       ` [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct Ingo Molnar
2008-03-05  7:02         ` [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct use of ! and & Ingo Molnar
     [not found]         ` <20080305070201.GA32434-X9Un+BFzKDI@public.gmane.org>
2008-03-05  7:09           ` [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct Harvey Harrison
2008-03-05  7:09             ` [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct use of ! and & Harvey Harrison
2008-03-05  7:09             ` Harvey Harrison
2008-03-05  8:19             ` [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct Ingo Molnar
2008-03-05  8:19               ` [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct use of ! and & Ingo Molnar
     [not found]               ` <20080305081904.GA17789-X9Un+BFzKDI@public.gmane.org>
2008-03-05 12:13                 ` [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct Derek M Jones
2008-03-05 12:13                   ` [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct use of ! and & Derek M Jones
2008-03-05 12:13                   ` Derek M Jones
2008-03-05  8:55           ` [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct Julia Lawall
2008-03-05  8:55             ` [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct use of ! and & Julia Lawall
2008-03-05  8:55             ` Julia Lawall
2008-03-05 12:20             ` [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct Ingo Molnar
2008-03-05 12:20               ` [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct use of ! and & Ingo Molnar
     [not found]               ` <20080305122010.GA999-X9Un+BFzKDI@public.gmane.org>
2008-03-05 12:30                 ` [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct use of.and & Bart Van Assche
2008-03-05 12:30                   ` [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct use of ! and & Bart Van Assche
2008-03-05 12:30                   ` Bart Van Assche
     [not found]                   ` <e2e108260803050430o317d3e0dyed50e86cc4569746-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-03-05 12:36                     ` [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct Ingo Molnar
2008-03-05 12:36                       ` [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct use of ! and & Ingo Molnar
2008-03-05 12:36                       ` Ingo Molnar
2008-03-05 12:35                 ` [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct Julia Lawall
2008-03-05 12:35                   ` [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct use of ! and & Julia Lawall
2008-03-05 12:35                   ` Julia Lawall

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.