linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Arend van Spriel" <arend@broadcom.com>
To: "Rafał Miłecki" <zajec5@gmail.com>
Cc: "gregkh@suse.de" <gregkh@suse.de>,
	"devel@linuxdriverproject.org" <devel@linuxdriverproject.org>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"Henry Ptasinski" <henryp@broadcom.com>
Subject: Re: [PATCH 01/14] staging: brcm80211: use wait queues instead of semaphores in wl_cfg80211.c
Date: Fri, 12 Aug 2011 20:55:24 +0200	[thread overview]
Message-ID: <4E45771C.7090400@broadcom.com> (raw)
In-Reply-To: <4E455877.6090901@broadcom.com>

On 08/12/2011 06:44 PM, Arend van Spriel wrote:
> On 08/12/2011 04:07 PM, Rafał Miłecki wrote:
>> 2011/8/12 Arend van Spriel<arend@broadcom.com>:
>>> @@ -3537,27 +3544,39 @@ static s32 brcmf_event_handler(void *data)
>>>                          (struct brcmf_cfg80211_priv *)data;
>>>          struct sched_param param = {.sched_priority = MAX_RT_PRIO - 1 };
>>>          struct brcmf_cfg80211_event_q *e;
>>> +       DECLARE_WAITQUEUE(wait, current);
>>>
>>>          sched_setscheduler(current, SCHED_FIFO,&param);
>>>          allow_signal(SIGTERM);
>>> -       while (likely(!down_interruptible(&cfg_priv->event_sync))) {
>>> +       add_wait_queue(&cfg_priv->event_waitq,&wait);
>>> +       while (1) {
>>> +               prepare_to_wait(&cfg_priv->event_waitq,&wait,
>>> +                               TASK_INTERRUPTIBLE);
>>> +
>>> +               schedule();
>>> +
>>>                  if (kthread_should_stop())
>>>                          break;
>>> +
>>>                  e = brcmf_deq_event(cfg_priv);
>>>                  if (unlikely(!e)) {
>>>                          WL_ERR("event queue empty...\n");
>>> -                       BUG();
>>> +                       continue;
>>>                  }
>>> -               WL_INFO("event type (%d)\n", e->etype);
>>> -               if (cfg_priv->el.handler[e->etype])
>>> -                       cfg_priv->el.handler[e->etype](cfg_priv,
>>> -                                                      cfg_to_ndev(cfg_priv),
>>> -&e->emsg, e->edata);
>>> -               else
>>> -                       WL_INFO("Unknown Event (%d): ignoring\n", e->etype);
>>>
>>> -               brcmf_put_event(e);
>>> +               do {
>>> +                       WL_INFO("event type (%d)\n", e->etype);
>>> +                       if (cfg_priv->el.handler[e->etype])
>>> +                               cfg_priv->el.handler[e->etype](cfg_priv,
>>> +                                       cfg_to_ndev(cfg_priv),
>>> +&e->emsg, e->edata);
>>> +                       else
>>> +                               WL_INFO("Unknown Event (%d): ignoring\n",
>>> +                                       e->etype);
>>> +                       brcmf_put_event(e);
>>> +               } while ((e = brcmf_deq_event(cfg_priv)));
>> if (((((care_coding_style)))))
>> fix();
>>
>> :-)
>>
> I assume you refer to the indents above. Not sure what exactly happened
> there, but the patch email as I received it looks. Could it be a mail
> reader issue?
>
> Gr. AvS

A colleague pointed out you probably meant the while condition. The 
extra braces may be there because an assignment is done, but in this 
case it does not make much sense.

I will fix it.

Gr. AvS

-- 
Almost nobody dances sober, unless they happen to be insane.
-- H.P. Lovecraft --



  reply	other threads:[~2011-08-12 18:55 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-12 13:34 [PATCH 00/14] staging: brcm80211: brcmfmac driver cleanup Arend van Spriel
2011-08-12 13:34 ` [PATCH 01/14] staging: brcm80211: use wait queues instead of semaphores in wl_cfg80211.c Arend van Spriel
2011-08-12 14:07   ` Rafał Miłecki
2011-08-12 16:44     ` Arend van Spriel
2011-08-12 18:55       ` Arend van Spriel [this message]
2011-08-12 18:59         ` Johannes Berg
2011-08-12 18:59       ` Franky Lin
2011-08-12 19:08         ` Larry Finger
2011-08-12 19:10           ` Arend van Spriel
2011-08-16 20:27         ` Rafał Miłecki
2011-08-12 19:05   ` [PATCHv2 " Arend van Spriel
2011-08-12 19:07     ` Arend van Spriel
2011-08-12 19:09       ` Arend van Spriel
2011-08-16 17:56         ` Dan Carpenter
2011-08-12 13:34 ` [PATCH 02/14] staging: brcm80211: remove iovar IOV_BLOCKSIZE in brcmfmac Arend van Spriel
2011-08-12 14:12   ` Rafał Miłecki
2011-08-12 16:37     ` Arend van Spriel
2011-08-12 20:02       ` Rafał Miłecki
2011-08-12 13:34 ` [PATCH 03/14] staging: brcm80211: remove struct sdioh_info from brcmfmac Arend van Spriel
2011-08-12 13:34 ` [PATCH 04/14] staging: brcm80211: remove global var gInstance " Arend van Spriel
2011-08-12 13:34 ` [PATCH 05/14] staging: brcm80211: remove wext traces in fullmac Arend van Spriel
2011-08-12 13:34 ` [PATCH 06/14] staging: brcm80211: absorb brcmf_sdioh_iovar_op into brcmf_sdcard_iovar_op Arend van Spriel
2011-08-12 13:34 ` [PATCH 07/14] staging: brcm80211: absorb brcmf_sdioh_interrupt_register into brcmf_sdcard_intr_reg Arend van Spriel
2011-08-12 14:31   ` Rafał Miłecki
2011-08-12 13:34 ` [PATCH 08/14] staging: brcm80211: absorb brcmf_sdioh_interrupt_deregister into brcmf_sdcard_intr_dereg Arend van Spriel
2011-08-12 13:34 ` [PATCH 09/14] staging: brcm80211: absorb brcmf_sdioh_abort into brcmf_sdcard_abort Arend van Spriel
2011-08-12 13:34 ` [PATCH 10/14] staging: brcm80211: remove dead code from dhd_sdio.c Arend van Spriel
2011-08-12 13:34 ` [PATCH 11/14] staging: brcm80211: remove wrapper functions in bcmsdh_sdmmc.c Arend van Spriel
2011-08-12 13:34 ` [PATCH 12/14] staging: brcm80211: remove unused parameter from data interface in fullmac Arend van Spriel
2011-08-12 13:35 ` [PATCH 13/14] staging: brcm80211: remove dead SDTEST code from fullmac Arend van Spriel
2011-08-12 13:35 ` [PATCH 14/14] staging: brcm80211: remove unused func parameter in wl_cfg80211 of fullmac Arend van Spriel
2011-08-12 14:02 ` [PATCH 00/14] staging: brcm80211: brcmfmac driver cleanup Rafał Miłecki
2011-08-12 15:14   ` Hauke Mehrtens
2011-08-12 15:43     ` Rafał Miłecki
2011-08-12 16:32   ` Arend van Spriel
2011-08-12 20:04     ` Rafał Miłecki
2011-08-13  7:47       ` Arend van Spriel
2011-08-13  8:30         ` Rafał Miłecki
2011-08-26  9:20       ` Rafał Miłecki
2011-08-26 17:31         ` Henry Ptasinski
2011-08-26 17:38           ` Jason
2011-08-26 17:44             ` Henry Ptasinski
2011-08-26 20:00               ` Jason
2011-08-26 20:15                 ` Henry Ptasinski
2011-08-23 20:07 ` Greg KH

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=4E45771C.7090400@broadcom.com \
    --to=arend@broadcom.com \
    --cc=devel@linuxdriverproject.org \
    --cc=gregkh@suse.de \
    --cc=henryp@broadcom.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=zajec5@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).