2012-10-09 16:11:11

by Adil Mujeeb

[permalink] [raw]
Subject: [PATCH] Staging: winbond: wbusb: Fixed coding style issue

Repalces printk's with pr_debug

Signed-off-by: Adil Mujeeb <[email protected]>
---
linux-3.6-rc7/drivers/staging/winbond/wbusb.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/linux-3.6-rc7/drivers/staging/winbond/wbusb.c b/linux-3.6-rc7/drivers/staging/winbond/wbusb.c
index 0ca857a..48fe622 100644
--- a/linux-3.6-rc7/drivers/staging/winbond/wbusb.c
+++ b/linux-3.6-rc7/drivers/staging/winbond/wbusb.c
@@ -79,18 +79,18 @@ static int wbsoft_add_interface(struct ieee80211_hw *dev,
static void wbsoft_remove_interface(struct ieee80211_hw *dev,
struct ieee80211_vif *vif)
{
- printk("wbsoft_remove interface called\n");
+ pr_debug("wbsoft_remove interface called\n");
}

static void wbsoft_stop(struct ieee80211_hw *hw)
{
- printk(KERN_INFO "%s called\n", __func__);
+ pr_debug("%s called\n", __func__);
}

static int wbsoft_get_stats(struct ieee80211_hw *hw,
struct ieee80211_low_level_stats *stats)
{
- printk(KERN_INFO "%s called\n", __func__);
+ pr_debug("%s called\n", __func__);
return 0;
}

@@ -177,7 +177,7 @@ static void hal_set_current_channel_ex(struct hw_data *pHwData, struct chan_info
if (pHwData->SurpriseRemove)
return;

- printk("Going to channel: %d/%d\n", channel.band, channel.ChanNo);
+ pr_debug("Going to channel: %d/%d\n", channel.band, channel.ChanNo);

RFSynthesizer_SwitchingChannel(pHwData, channel); /* Switch channel */
pHwData->Channel = channel.ChanNo;
@@ -262,7 +262,7 @@ static int wbsoft_config(struct ieee80211_hw *dev, u32 changed)
struct wbsoft_priv *priv = dev->priv;
struct chan_info ch;

- printk("wbsoft_config called\n");
+ pr_debug("wbsoft_config called\n");

/* Should use channel_num, or something, as that is already pre-translated */
ch.band = 1;
@@ -280,7 +280,7 @@ static int wbsoft_config(struct ieee80211_hw *dev, u32 changed)

static u64 wbsoft_get_tsf(struct ieee80211_hw *dev, struct ieee80211_vif *vif)
{
- printk("wbsoft_get_tsf called\n");
+ pr_debug("wbsoft_get_tsf called\n");
return 0;
}

@@ -781,7 +781,7 @@ static int wb35_probe(struct usb_interface *intf,
endpoint = &interface->endpoint[0].desc;

if (endpoint[2].wMaxPacketSize == 512)
- printk("[w35und] Working on USB 2.0\n");
+ pr_debug("[w35und] Working on USB 2.0\n");

err = wb35_hw_init(dev);
if (err)
--
1.7.7.3


2012-10-09 16:22:21

by Joe Perches

[permalink] [raw]
Subject: Re: [PATCH] Staging: winbond: wbusb: Fixed coding style issue

On Tue, 2012-10-09 at 21:40 +0530, Adil Mujeeb wrote:
> Repalces printk's with pr_debug
[]
> diff --git a/linux-3.6-rc7/drivers/staging/winbond/wbusb.c b/linux-3.6-rc7/drivers/staging/winbond/wbusb.c
> index 0ca857a..48fe622 100644
> --- a/linux-3.6-rc7/drivers/staging/winbond/wbusb.c
> +++ b/linux-3.6-rc7/drivers/staging/winbond/wbusb.c
> @@ -79,18 +79,18 @@ static int wbsoft_add_interface(struct ieee80211_hw *dev,
> static void wbsoft_remove_interface(struct ieee80211_hw *dev,
> struct ieee80211_vif *vif)
> {
> - printk("wbsoft_remove interface called\n");
> + pr_debug("wbsoft_remove interface called\n");

It'd be more consistent to use
pr_debug("%s called\n", __func__);
everywhere.

It might be even nicer to remove almost all of these.

2012-10-09 16:49:26

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH] Staging: winbond: wbusb: Fixed coding style issue

On Tue, Oct 09, 2012 at 09:22:18AM -0700, Joe Perches wrote:
> On Tue, 2012-10-09 at 21:40 +0530, Adil Mujeeb wrote:
> > Repalces printk's with pr_debug
> []
> > diff --git a/linux-3.6-rc7/drivers/staging/winbond/wbusb.c b/linux-3.6-rc7/drivers/staging/winbond/wbusb.c
> > index 0ca857a..48fe622 100644
> > --- a/linux-3.6-rc7/drivers/staging/winbond/wbusb.c
> > +++ b/linux-3.6-rc7/drivers/staging/winbond/wbusb.c
> > @@ -79,18 +79,18 @@ static int wbsoft_add_interface(struct ieee80211_hw *dev,
> > static void wbsoft_remove_interface(struct ieee80211_hw *dev,
> > struct ieee80211_vif *vif)
> > {
> > - printk("wbsoft_remove interface called\n");
> > + pr_debug("wbsoft_remove interface called\n");
>
> It'd be more consistent to use
> pr_debug("%s called\n", __func__);
> everywhere.
>
> It might be even nicer to remove almost all of these.
>

Yes, "tracing" type debug calls like this should all be removed, now
that we have built-in function call tracing in the core kernel itself.

greg k-h

2012-10-09 18:02:54

by Adil Mujeeb

[permalink] [raw]
Subject: Re: [PATCH] Staging: winbond: wbusb: Fixed coding style issue

On Tue, Oct 9, 2012 at 10:16 PM, Greg KH <[email protected]> wrote:
> On Tue, Oct 09, 2012 at 09:22:18AM -0700, Joe Perches wrote:
>> On Tue, 2012-10-09 at 21:40 +0530, Adil Mujeeb wrote:
>> > Repalces printk's with pr_debug
>> []
>> > diff --git a/linux-3.6-rc7/drivers/staging/winbond/wbusb.c b/linux-3.6-rc7/drivers/staging/winbond/wbusb.c
>> > index 0ca857a..48fe622 100644
>> > --- a/linux-3.6-rc7/drivers/staging/winbond/wbusb.c
>> > +++ b/linux-3.6-rc7/drivers/staging/winbond/wbusb.c
>> > @@ -79,18 +79,18 @@ static int wbsoft_add_interface(struct ieee80211_hw *dev,
>> > static void wbsoft_remove_interface(struct ieee80211_hw *dev,
>> > struct ieee80211_vif *vif)
>> > {
>> > - printk("wbsoft_remove interface called\n");
>> > + pr_debug("wbsoft_remove interface called\n");
>>
>> It'd be more consistent to use
>> pr_debug("%s called\n", __func__);
>> everywhere.
>>
>> It might be even nicer to remove almost all of these.
>>
>
> Yes, "tracing" type debug calls like this should all be removed, now
> that we have built-in function call tracing in the core kernel itself.

Thanks Joe and Greg for your quick comments. I will remove such
tracing calls and resubmit the patch.

Regards,
Adil

>
> greg k-h