diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2008-02-06 04:36:06 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-06 13:40:59 -0500 |
commit | eaa0ff15c30dc9799eb4d12660edb73aeb6d32c5 (patch) | |
tree | 592ea2010b2e6fb2951e78c21dafc4c2e6fe2134 /drivers/isdn/act2000 | |
parent | 551e4fb2465b87de9d4aa1669b27d624435443bb (diff) |
fix ! versus & precedence in various places
Fix various instances of
if (!expr & mask)
which should probably have been
if (!(expr & mask))
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Peter Osterlund <petero2@telia.com>
Cc: Karsten Keil <kkeil@suse.de>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: Mark Fasheh <mark.fasheh@oracle.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/isdn/act2000')
-rw-r--r-- | drivers/isdn/act2000/module.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/isdn/act2000/module.c b/drivers/isdn/act2000/module.c index ee2b0b9f8f46..8325022e2bed 100644 --- a/drivers/isdn/act2000/module.c +++ b/drivers/isdn/act2000/module.c | |||
@@ -310,7 +310,7 @@ act2000_command(act2000_card * card, isdn_ctrl * c) | |||
310 | } | 310 | } |
311 | break; | 311 | break; |
312 | case ISDN_CMD_DIAL: | 312 | case ISDN_CMD_DIAL: |
313 | if (!card->flags & ACT2000_FLAGS_RUNNING) | 313 | if (!(card->flags & ACT2000_FLAGS_RUNNING)) |
314 | return -ENODEV; | 314 | return -ENODEV; |
315 | if (!(chan = find_channel(card, c->arg & 0x0f))) | 315 | if (!(chan = find_channel(card, c->arg & 0x0f))) |
316 | break; | 316 | break; |
@@ -339,7 +339,7 @@ act2000_command(act2000_card * card, isdn_ctrl * c) | |||
339 | } | 339 | } |
340 | return ret; | 340 | return ret; |
341 | case ISDN_CMD_ACCEPTD: | 341 | case ISDN_CMD_ACCEPTD: |
342 | if (!card->flags & ACT2000_FLAGS_RUNNING) | 342 | if (!(card->flags & ACT2000_FLAGS_RUNNING)) |
343 | return -ENODEV; | 343 | return -ENODEV; |
344 | if (!(chan = find_channel(card, c->arg & 0x0f))) | 344 | if (!(chan = find_channel(card, c->arg & 0x0f))) |
345 | break; | 345 | break; |
@@ -347,11 +347,11 @@ act2000_command(act2000_card * card, isdn_ctrl * c) | |||
347 | actcapi_select_b2_protocol_req(card, chan); | 347 | actcapi_select_b2_protocol_req(card, chan); |
348 | return 0; | 348 | return 0; |
349 | case ISDN_CMD_ACCEPTB: | 349 | case ISDN_CMD_ACCEPTB: |
350 | if (!card->flags & ACT2000_FLAGS_RUNNING) | 350 | if (!(card->flags & ACT2000_FLAGS_RUNNING)) |
351 | return -ENODEV; | 351 | return -ENODEV; |
352 | return 0; | 352 | return 0; |
353 | case ISDN_CMD_HANGUP: | 353 | case ISDN_CMD_HANGUP: |
354 | if (!card->flags & ACT2000_FLAGS_RUNNING) | 354 | if (!(card->flags & ACT2000_FLAGS_RUNNING)) |
355 | return -ENODEV; | 355 | return -ENODEV; |
356 | if (!(chan = find_channel(card, c->arg & 0x0f))) | 356 | if (!(chan = find_channel(card, c->arg & 0x0f))) |
357 | break; | 357 | break; |
@@ -366,7 +366,7 @@ act2000_command(act2000_card * card, isdn_ctrl * c) | |||
366 | } | 366 | } |
367 | return 0; | 367 | return 0; |
368 | case ISDN_CMD_SETEAZ: | 368 | case ISDN_CMD_SETEAZ: |
369 | if (!card->flags & ACT2000_FLAGS_RUNNING) | 369 | if (!(card->flags & ACT2000_FLAGS_RUNNING)) |
370 | return -ENODEV; | 370 | return -ENODEV; |
371 | if (!(chan = find_channel(card, c->arg & 0x0f))) | 371 | if (!(chan = find_channel(card, c->arg & 0x0f))) |
372 | break; | 372 | break; |
@@ -386,7 +386,7 @@ act2000_command(act2000_card * card, isdn_ctrl * c) | |||
386 | actcapi_listen_req(card); | 386 | actcapi_listen_req(card); |
387 | return 0; | 387 | return 0; |
388 | case ISDN_CMD_CLREAZ: | 388 | case ISDN_CMD_CLREAZ: |
389 | if (!card->flags & ACT2000_FLAGS_RUNNING) | 389 | if (!(card->flags & ACT2000_FLAGS_RUNNING)) |
390 | return -ENODEV; | 390 | return -ENODEV; |
391 | if (!(chan = find_channel(card, c->arg & 0x0f))) | 391 | if (!(chan = find_channel(card, c->arg & 0x0f))) |
392 | break; | 392 | break; |
@@ -394,14 +394,14 @@ act2000_command(act2000_card * card, isdn_ctrl * c) | |||
394 | actcapi_listen_req(card); | 394 | actcapi_listen_req(card); |
395 | return 0; | 395 | return 0; |
396 | case ISDN_CMD_SETL2: | 396 | case ISDN_CMD_SETL2: |
397 | if (!card->flags & ACT2000_FLAGS_RUNNING) | 397 | if (!(card->flags & ACT2000_FLAGS_RUNNING)) |
398 | return -ENODEV; | 398 | return -ENODEV; |
399 | if (!(chan = find_channel(card, c->arg & 0x0f))) | 399 | if (!(chan = find_channel(card, c->arg & 0x0f))) |
400 | break; | 400 | break; |
401 | chan->l2prot = (c->arg >> 8); | 401 | chan->l2prot = (c->arg >> 8); |
402 | return 0; | 402 | return 0; |
403 | case ISDN_CMD_SETL3: | 403 | case ISDN_CMD_SETL3: |
404 | if (!card->flags & ACT2000_FLAGS_RUNNING) | 404 | if (!(card->flags & ACT2000_FLAGS_RUNNING)) |
405 | return -ENODEV; | 405 | return -ENODEV; |
406 | if ((c->arg >> 8) != ISDN_PROTO_L3_TRANS) { | 406 | if ((c->arg >> 8) != ISDN_PROTO_L3_TRANS) { |
407 | printk(KERN_WARNING "L3 protocol unknown\n"); | 407 | printk(KERN_WARNING "L3 protocol unknown\n"); |
@@ -524,7 +524,7 @@ if_writecmd(const u_char __user *buf, int len, int id, int channel) | |||
524 | act2000_card *card = act2000_findcard(id); | 524 | act2000_card *card = act2000_findcard(id); |
525 | 525 | ||
526 | if (card) { | 526 | if (card) { |
527 | if (!card->flags & ACT2000_FLAGS_RUNNING) | 527 | if (!(card->flags & ACT2000_FLAGS_RUNNING)) |
528 | return -ENODEV; | 528 | return -ENODEV; |
529 | return (len); | 529 | return (len); |
530 | } | 530 | } |
@@ -539,7 +539,7 @@ if_readstatus(u_char __user * buf, int len, int id, int channel) | |||
539 | act2000_card *card = act2000_findcard(id); | 539 | act2000_card *card = act2000_findcard(id); |
540 | 540 | ||
541 | if (card) { | 541 | if (card) { |
542 | if (!card->flags & ACT2000_FLAGS_RUNNING) | 542 | if (!(card->flags & ACT2000_FLAGS_RUNNING)) |
543 | return -ENODEV; | 543 | return -ENODEV; |
544 | return (act2000_readstatus(buf, len, card)); | 544 | return (act2000_readstatus(buf, len, card)); |
545 | } | 545 | } |
@@ -554,7 +554,7 @@ if_sendbuf(int id, int channel, int ack, struct sk_buff *skb) | |||
554 | act2000_card *card = act2000_findcard(id); | 554 | act2000_card *card = act2000_findcard(id); |
555 | 555 | ||
556 | if (card) { | 556 | if (card) { |
557 | if (!card->flags & ACT2000_FLAGS_RUNNING) | 557 | if (!(card->flags & ACT2000_FLAGS_RUNNING)) |
558 | return -ENODEV; | 558 | return -ENODEV; |
559 | return (act2000_sendbuf(card, channel, ack, skb)); | 559 | return (act2000_sendbuf(card, channel, ack, skb)); |
560 | } | 560 | } |