linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Guy, Wey-Yi" <wey-yi.w.guy@intel.com>
To: Emmanuel Grumbach <egrumbach@gmail.com>
Cc: Stanislaw Gruszka <sgruszka@redhat.com>,
	Intel Linux Wireless <ilw@linux.intel.com>,
	linux-wireless@vger.kernel.org
Subject: Re: [PATCH -iwlwifi] iwlwifi: make tx_cmd_pool kmem cache global
Date: Mon, 27 Feb 2012 14:14:16 -0800	[thread overview]
Message-ID: <1330380856.12612.20.camel@wwguy-huron> (raw)
In-Reply-To: <CANUX_P3JObf0OzAT4L5w7ksry89Ovz2QyAde+DZZUMR6eBt5Hw@mail.gmail.com>

On Mon, 2012-02-27 at 22:20 +0200, Emmanuel Grumbach wrote:
> On Mon, Feb 27, 2012 at 19:48, Guy, Wey-Yi <wey-yi.w.guy@intel.com> wrote:
> > On Mon, 2012-02-27 at 19:55 +0200, Emmanuel Grumbach wrote:
> >> I guess that Sanislaw patch is defining one single pool for all the
> >> devices, which means that we won't try to allocate a few pools with
> >> the same name, which leads to this warning.
> >>
> > That I got it, but is really the "only" way to do it, I am really not a
> > fan of global variable.
> >
> I guess we can have a pool for "iwl_dev_cmd_<PCI_DEV_ID>" or something
> like this. But I don't see what is the problem with the global
> variable besides the namespace pollution which is not very problematic
> since we don't export this variable. It is a singleton in terms of
> "Software design pattern" (I hate these buzzwords), and this is the
> way to implement this in C AFAICT.

it is not a problem, just "global" is not something what I prefer, but
it is ok if it is the most easy way to address the problem and not
having side-effect.

Thanks
Wey


  reply	other threads:[~2012-02-27 23:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-27 13:52 [PATCH -iwlwifi] iwlwifi: make tx_cmd_pool kmem cache global Stanislaw Gruszka
2012-02-27 14:30 ` Guy, Wey-Yi
2012-02-27 17:55   ` Emmanuel Grumbach
2012-02-27 17:48     ` Guy, Wey-Yi
2012-02-27 20:20       ` Emmanuel Grumbach
2012-02-27 22:14         ` Guy, Wey-Yi [this message]
2012-02-29  9:00 ` Johannes Berg
2012-02-29 15:00   ` Guy, Wey-Yi

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=1330380856.12612.20.camel@wwguy-huron \
    --to=wey-yi.w.guy@intel.com \
    --cc=egrumbach@gmail.com \
    --cc=ilw@linux.intel.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=sgruszka@redhat.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).