Re: [PATCH -iwlwifi] iwlwifi: make tx_cmd_pool kmem cache global
From: Guy, Wey-Yi <hidden>
Date: 2012-02-27 23:25:28
On Mon, 2012-02-27 at 22:20 +0200, Emmanuel Grumbach wrote:
On Mon, Feb 27, 2012 at 19:48, Guy, Wey-Yi [off-list ref] wrote:quoted
On Mon, 2012-02-27 at 19:55 +0200, Emmanuel Grumbach wrote:quoted
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