linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Arend van Spriel" <arend@broadcom.com>
To: "Joe Perches" <joe@perches.com>
Cc: "John W. Linville" <linville@tuxdriver.com>,
	"Linux Wireless List" <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH v2 08/18] brcmfmac: define pr_fmt in one place
Date: Wed, 2 Jan 2013 21:52:03 +0100	[thread overview]
Message-ID: <50E49DF3.60503@broadcom.com> (raw)
In-Reply-To: <1357158897.25181.5.camel@joe-AO722>

On 01/02/2013 09:34 PM, Joe Perches wrote:
> On Wed, 2013-01-02 at 21:20 +0100, Arend van Spriel wrote:
>> Several source files (but not all) define the pr_fmt() macro in exactly
>> the same way. Instead this commit defines it in a header file so driver
>> logging is consistent.
>>
>> Cc: Joe Perches <joe@perches.com>
>> Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
>> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
>> Signed-off-by: Arend van Spriel <arend@broadcom.com>
>> ---
>> Hi John,
>>
>> Joe caught this so here is the replacement patch for previous patch with
>> message id: <1357136572-18273-9-git-send-email-arend@broadcom.com>
>>
>> Regards,
>> Arend
>> ---
>>  drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c       |    2 --
>>  drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c |    2 --
>>  drivers/net/wireless/brcm80211/brcmfmac/dhd_cdc.c      |    2 --
>>  drivers/net/wireless/brcm80211/brcmfmac/dhd_common.c   |    2 --
>>  drivers/net/wireless/brcm80211/brcmfmac/dhd_dbg.h      |    4 ++++
>>  drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c    |    2 --
>>  drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c     |    2 --
>>  drivers/net/wireless/brcm80211/brcmfmac/sdio_chip.c    |    2 --
>>  drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c  |    2 --
>>  9 files changed, 4 insertions(+), 16 deletions(-)
>>
>> diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
>> index be35a2f..11fd1c7 100644
>> --- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
>> +++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
>> @@ -15,8 +15,6 @@
>>   */
>>  /* ****************** SDIO CARD Interface Functions **************************/
>>  
>> -#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
>> -
>>  #include <linux/types.h>
>>  #include <linux/netdevice.h>
>>  #include <linux/export.h>
>> diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c
>> index d33e559..d92d373 100644
>> --- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c
>> +++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c
>> @@ -14,8 +14,6 @@
>>   * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
>>   */
>>  
>> -#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
>> -
>>  #include <linux/types.h>
>>  #include <linux/netdevice.h>
>>  #include <linux/mmc/sdio.h>
>> diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_cdc.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_cdc.c
>> index 8392355..0c83998 100644
>> --- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_cdc.c
>> +++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_cdc.c
>> @@ -19,8 +19,6 @@
>>   * For certain dcmd codes, the dongle interprets string data from the host.
>>   ******************************************************************************/
>>  
>> -#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
>> -
>>  #include <linux/types.h>
>>  #include <linux/netdevice.h>
>>  
>> diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_common.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_common.c
>> index f8b52e5..4544342 100644
>> --- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_common.c
>> +++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_common.c
>> @@ -14,8 +14,6 @@
>>   * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
>>   */
>>  
>> -#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
>> -
>>  #include <linux/kernel.h>
>>  #include <linux/string.h>
>>  #include <linux/netdevice.h>
>> diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_dbg.h b/drivers/net/wireless/brcm80211/brcmfmac/dhd_dbg.h
>> index f2ab01c..ea3f5f5 100644
>> --- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_dbg.h
>> +++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_dbg.h
>> @@ -34,6 +34,10 @@
>>  #define BRCMF_SCAN_VAL	0x4000
>>  #define BRCMF_CONN_VAL	0x8000
>>  
>> +/* set default print format */
>> +#undef pr_fmt
>> +#define pr_fmt(fmt)		KBUILD_MODNAME ": " fmt
>> +
> 
> The only negative I see to this is that
> any pr_<level> in any include file like:
> 
> include/linux/netdevice.h:1892:              pr_info("netif_stop_queue() cannot be called before register_netdev()\n");
> 
> may not be prefixed.
> 
> I expect that one day all these 
> #define pr_fmt(fmt) KBUILD_MODNAME etc...
> will be made unnecessary as kernel.h should
> be eventually changed to make it the default.
> 
> Something like:
> 
> https://lkml.org/lkml/2012/3/27/247

Got my vote for that.

Regards,
Arend



  reply	other threads:[~2013-01-02 20:52 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-02 14:22 [PATCH 00/18] brcm80211: cleanup work Arend van Spriel
2013-01-02 14:22 ` [PATCH 01/18] brcmsmac: increase timer reference count for new timers only Arend van Spriel
2013-01-02 14:22 ` [PATCH 02/18] brcmsmac: use perimeter lock in add_interface() callback Arend van Spriel
2013-01-02 14:22 ` [PATCH 03/18] brcmsmac: allow user-space setting of interface address Arend van Spriel
2013-01-02 14:22 ` [PATCH 04/18] brcmsmac: remove dead code Arend van Spriel
2013-01-02 14:22 ` [PATCH 05/18] brcmfmac: do not reconfigure refill rx on 0-length packet Arend van Spriel
2013-01-02 14:22 ` [PATCH 06/18] brcmfmac: removed deprecated set_bitrate_mask support Arend van Spriel
2013-01-02 14:22 ` [PATCH 07/18] brcmfmac: assure USB dongle firmware is reset upon module unload Arend van Spriel
2013-01-02 14:22 ` [PATCH 08/18] brcmfmac: define pr_fmt in one place Arend van Spriel
2013-01-02 17:52   ` Joe Perches
2013-01-02 20:07     ` Arend van Spriel
2013-01-02 20:20   ` [PATCH v2 " Arend van Spriel
2013-01-02 20:34     ` Joe Perches
2013-01-02 20:52       ` Arend van Spriel [this message]
2013-01-02 14:22 ` [PATCH 09/18] brcmfmac: remove rx helper function from bus interface Arend van Spriel
2013-01-02 14:22 ` [PATCH 10/18] brcmfmac: remove brcmf_proto_hdrpull() " Arend van Spriel
2013-01-02 14:22 ` [PATCH 11/18] brcmfmac: Use dedicated trace level for CDC Arend van Spriel
2013-01-02 14:22 ` [PATCH 12/18] brcmfmac: remove unused event related definitions Arend van Spriel
2013-01-02 14:22 ` [PATCH 13/18] brcmfmac: cleanup netdev transmit callback Arend van Spriel
2013-01-02 14:22 ` [PATCH 14/18] brcmfmac: remove unnecessary curly braces in dhd_attach() Arend van Spriel
2013-01-02 14:22 ` [PATCH 15/18] brcmfmac: Remove unused caching dongle error Arend van Spriel
2013-01-02 14:22 ` [PATCH 16/18] brcmfmac: Return correct error on netdev xmit Arend van Spriel
2013-01-02 14:22 ` [PATCH 17/18] brcmfmac: Removing obsolete variables and inline functions Arend van Spriel
2013-01-02 14:22 ` [PATCH 18/18] brcmfmac: Update init code routines from interface up Arend van Spriel

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=50E49DF3.60503@broadcom.com \
    --to=arend@broadcom.com \
    --cc=joe@perches.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.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).