]> git.baikalelectronics.ru Git - kernel.git/commit
drivers/net/wireless/iwlwifi/iwl-4965.c: correct use of ! and &
authorJulia Lawall <julia@diku.dk>
Tue, 4 Mar 2008 22:58:59 +0000 (14:58 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 27 Mar 2008 18:51:39 +0000 (14:51 -0400)
commit91296f21d23016bc72393f979a31b47ef2eff819
tree606480b7f4160629c05d7e739f2e9baf17d4c76f
parentc22af5c3050cc6913c542184bf6f90f247942247
drivers/net/wireless/iwlwifi/iwl-4965.c: correct use of ! and &

In commit fbb1ccd43b0dfa2ef851295f09c104022e4e2c88, 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>
Cc: Tomas Winkler <tomas.winkler@intel.com>
Cc: Guy Cohen <guy.cohen@intel.com>
Cc: Reinette Chatre <reinette.chatre@intel.com>
Cc: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-4965.c