[PATCH] staging: wlan-ng: remove unused debug macro

Gujulan Elango, Hari Prasath (H.) hgujulan at visteon.com
Thu Jun 18 05:51:03 UTC 2015


On Wed, Jun 17, 2015 at 09:40:42PM -0700, gregkh at linuxfoundation.org wrote:
> On Tue, Jun 16, 2015 at 05:09:35AM +0000, Gujulan Elango, Hari Prasath (H.) wrote:
> > On Mon, Jun 15, 2015 at 09:55:15PM -0700, gregkh at linuxfoundation.org wrote:
> > > On Mon, Jun 15, 2015 at 11:44:24AM +0000, Gujulan Elango, Hari Prasath (H.) wrote:
> > > > From: Hari Prasath Gujulan Elango <hgujulan at visteon.com>
> > > > 
> > > > Thi patch removes ununsed debug macro and its references in this
> > > > file.The macro is used around pr_debug which itself can be dynamically
> > > > enabled/disabled.
> > > > 
> > > > Signed-off-by: Hari Prasath Gujulan Elango <hgujulan at visteon.com>
> > > > ---
> > > >  drivers/staging/wlan-ng/p80211wep.c | 7 -------
> > > >  1 file changed, 7 deletions(-)
> > > > 
> > > > diff --git a/drivers/staging/wlan-ng/p80211wep.c b/drivers/staging/wlan-ng/p80211wep.c
> > > > index c4fabad..f1afd0e 100644
> > > > --- a/drivers/staging/wlan-ng/p80211wep.c
> > > > +++ b/drivers/staging/wlan-ng/p80211wep.c
> > > > @@ -53,7 +53,6 @@
> > > >  #include <linux/random.h>
> > > >  #include <linux/kernel.h>
> > > >  
> > > > -/* #define WEP_DEBUG	*/
> > > >  
> > > >  #include "p80211hdr.h"
> > > >  #include "p80211types.h"
> > > > @@ -133,10 +132,8 @@ int wep_change_key(wlandevice_t *wlandev, int keynum, u8 *key, int keylen)
> > > >  	if (keynum >= NUM_WEPKEYS)
> > > >  		return -1;
> > > >  
> > > > -#ifdef WEP_DEBUG
> > > >  	pr_debug("WEP key %d len %d = %*phC\n", keynum, keylen,
> > > >  			  8, key);
> > > > -#endif
> > > 
> > > You just added this to the driver now, not what you were saying you were
> > > doing :(
> > 
> > Greg,if my understanding is correct,do you mean to say that by 
> > removing the MACRO WEP_DEBUG which is not defined,this patch adds the
> > dynamic debug statements in the driver?
> 
> Yes.
> 
> > As we know that pr_debug is
> > something that can be dynamically enable/disable during runtime,then
> > why to have a MACRO which can enable/disable statically ?Please 
> > correct me I am wrong.
> 
> Why not just delete these as obviously they are not being used?
> 
> thanks,
> 
> greg k-h

Thanks Greg.Yes I will remove the macro as well as the debug prints
which aren't used and resend v2.

Regards
Hari Prasath


More information about the devel mailing list