From: Bob Copeland <me@bobcopeland.com>
To: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCHv2 12/21] cw1200: sta.*, mac80211 STA callbacks.
Date: Sat, 28 Apr 2012 23:49:51 -0400 [thread overview]
Message-ID: <20120429034951.GA32368@localhost> (raw)
In-Reply-To: <1330720003-15866-13-git-send-email-dmitry.tarnyagin@stericsson.com>
Hello,
A couple of other quick notes as I read this code:
On Fri, Mar 02, 2012 at 09:26:34PM +0100, Dmitry Tarnyagin wrote:
> +static inline void __cw1200_free_event_queue(struct list_head *list)
> +{
> + while (!list_empty(list)) {
> + struct cw1200_wsm_event *event =
> + list_first_entry(list, struct cw1200_wsm_event,
> + link);
> + list_del(&event->link);
> + kfree(event);
> + }
I think perhaps you can use list_for_each_entry_safe() here...
> + LIST_HEAD(list);
[...]
> + spin_lock(&priv->event_queue_lock);
> + list_splice_init(&priv->event_queue, &list);
> + spin_unlock(&priv->event_queue_lock);
> + __cw1200_free_event_queue(&list);
...and then you won't need to do the above?
> + if (priv->listening ^ listening) {
That's a unusual (to me anyway) way to spell "a != b". On my
version of gcc, generated code is exactly the same.
--
Bob Copeland %% www.bobcopeland.com
next prev parent reply other threads:[~2012-04-29 3:51 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <983b0e2d75af161b8e4dec02fc3497926a0080df-submit>
2012-03-02 20:26 ` [PATCHv2 00/21] cw1200: ST-Ericsson cw1200 wlan device driver Dmitry Tarnyagin
2012-03-02 20:26 ` [PATCHv2 01/21] cw1200: cw1200.h, private driver data Dmitry Tarnyagin
2012-03-02 20:26 ` [PATCHv2 02/21] cw1200: cw1200_plat.h, definition of the driver'ss platform data Dmitry Tarnyagin
2012-03-02 20:26 ` [PATCHv2 03/21] cw1200: sbus.h, common device interface abstraction Dmitry Tarnyagin
2012-03-02 20:26 ` [PATCHv2 04/21] cw1200: cw1200_sdio.c, implementation of SDIO wrapper for the driver Dmitry Tarnyagin
2012-03-02 20:26 ` [PATCHv2 05/21] cw1200: hwio.*, device reg/mem map and low-level i/o primitives Dmitry Tarnyagin
2012-03-02 20:26 ` [PATCHv2 06/21] cw1200: fwio.*, firmware downloading code for the cw1200 driver Dmitry Tarnyagin
2012-03-02 20:26 ` [PATCHv2 07/21] cw1200: queue.*, implementation of TX queues of " Dmitry Tarnyagin
2012-03-02 20:26 ` [PATCHv2 08/21] cw1200: wsm.*, implementation of device high-level interface Dmitry Tarnyagin
2012-04-26 13:29 ` Bob Copeland
2012-03-02 20:26 ` [PATCHv2 09/21] cw1200: txrx.*, implementation of datapath Dmitry Tarnyagin
2012-03-02 20:26 ` [PATCHv2 10/21] cw1200: ht.h, small helper header with HT definitions Dmitry Tarnyagin
2012-03-02 20:26 ` [PATCHv2 11/21] cw1200: bh.*, device serving thread Dmitry Tarnyagin
2012-03-02 20:26 ` [PATCHv2 12/21] cw1200: sta.*, mac80211 STA callbacks Dmitry Tarnyagin
2012-04-29 3:49 ` Bob Copeland [this message]
2012-05-03 9:59 ` Dmitry Tarnyagin
2012-05-03 12:42 ` Bob Copeland
2012-03-02 20:26 ` [PATCHv2 13/21] cw1200: ap.*, mac80211 AP callbacks Dmitry Tarnyagin
2012-03-02 20:26 ` [PATCHv2 14/21] cw1200: scan.*, mac80211 hw_scan callback Dmitry Tarnyagin
2012-03-02 20:26 ` [PATCHv2 15/21] cw1200: debug.*, implementation of the driver's debugfs Dmitry Tarnyagin
2012-03-02 20:26 ` [PATCHv2 16/21] cw1200: itp.*, internal device test and calibration code Dmitry Tarnyagin
2012-03-02 20:26 ` [PATCHv2 17/21] cw1200: pm.*, power management code Dmitry Tarnyagin
2012-03-02 20:26 ` [PATCHv2 18/21] cw1200: main.c, core initialization code Dmitry Tarnyagin
2012-03-02 20:26 ` [PATCHv2 19/21] cw1200: TODO list Dmitry Tarnyagin
2012-03-02 20:26 ` [PATCHv2 20/21] cw1200: Credits Dmitry Tarnyagin
2012-03-02 20:26 ` [PATCHv2 21/21] cw1200: Kconfig + Makefile for the driver Dmitry Tarnyagin
2012-05-09 6:58 ` [PATCHv2 00/21] cw1200: ST-Ericsson cw1200 wlan device driver Dmitry Tarnyagin
2012-05-31 5:45 ` Janusz Dziedzic
2012-07-05 18:16 ` Steev Klimaszewski
2012-07-06 20:18 ` John W. Linville
2012-12-11 23:23 ` Solomon Peachy
2012-12-12 14:40 ` Kalle Valo
2012-12-12 15:13 ` Christian Lamparter
2012-12-12 16:18 ` Solomon Peachy
2012-12-12 16:20 ` Johannes Berg
2012-12-13 14:53 ` Solomon Peachy
2012-12-12 18:19 ` John W. Linville
2012-05-09 16:33 [PATCHv2 12/21] cw1200: sta.*, mac80211 STA callbacks Kevin Groeneveld
2012-05-09 18:13 ` Dmitry Tarnyagin
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=20120429034951.GA32368@localhost \
--to=me@bobcopeland.com \
--cc=dmitry.tarnyagin@stericsson.com \
--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;
as well as URLs for NNTP newsgroup(s).