From: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Subject: [PATCH 2/3] rfkill: fix input event handling in rfkill conversion
Date: Thu, 21 May 2009 00:04:18 -0300 [thread overview]
Message-ID: <1242875059-9627-3-git-send-email-hmh@hmh.eng.br> (raw)
In-Reply-To: <1242875059-9627-1-git-send-email-hmh@hmh.eng.br>
Using break/continue inside a for() which is itself inside a do {} while,
is asking for trouble...
Instead of replacing the bogus "break" with "continue", use something far
more readable, instead.
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
---
net/rfkill/input.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/net/rfkill/input.c b/net/rfkill/input.c
index f708d74..a7295ad 100644
--- a/net/rfkill/input.c
+++ b/net/rfkill/input.c
@@ -123,14 +123,14 @@ static void rfkill_op_handler(struct work_struct *work)
continue;
for (i = 0; i < NUM_RFKILL_TYPES; i++) {
- if (!__test_and_clear_bit(i, rfkill_sw_pending))
- break;
- c = __test_and_clear_bit(i, rfkill_sw_state);
- spin_unlock_irq(&rfkill_op_lock);
+ if (__test_and_clear_bit(i, rfkill_sw_pending)) {
+ c = __test_and_clear_bit(i, rfkill_sw_state);
+ spin_unlock_irq(&rfkill_op_lock);
- __rfkill_handle_normal_op(i, c);
+ __rfkill_handle_normal_op(i, c);
- spin_lock_irq(&rfkill_op_lock);
+ spin_lock_irq(&rfkill_op_lock);
+ }
}
} while (rfkill_op_pending);
spin_unlock_irq(&rfkill_op_lock);
--
1.6.3.1
next prev parent reply other threads:[~2009-05-21 3:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-21 3:04 rfkill v9: fixes and thinkpad-acpi conversion Henrique de Moraes Holschuh
2009-05-21 3:04 ` [PATCH 1/3] rfkill: add missing static Henrique de Moraes Holschuh
2009-05-21 3:04 ` Henrique de Moraes Holschuh [this message]
2009-05-21 3:04 ` [PATCH 3/3] thinkpad-acpi: convert to new rfkill API Henrique de Moraes Holschuh
2009-05-21 10:52 ` rfkill v9: fixes and thinkpad-acpi conversion Johannes Berg
2009-05-21 19:57 ` Johannes Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1242875059-9627-3-git-send-email-hmh@hmh.eng.br \
--to=hmh@hmh.eng.br \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox