linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] Staging: winbond: wbusb: Fixed coding style issue
@ 2012-11-07 18:49 Adil Mujeeb
  2012-11-07 18:50 ` [PATCH 1/4] " Adil Mujeeb
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Adil Mujeeb @ 2012-11-07 18:49 UTC (permalink / raw)
  To: pavel; +Cc: gregkh, devel, linux-kernel

winbond directory files have lots of coding style issues. 
The patch set tries to remove *most* (if not all) of the coding style issues. 
checkpatch.pl script can still complain but major part of the serious coding style issues have been rectified.

 


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/4] Staging: winbond: wbusb: Fixed coding style issue
  2012-11-07 18:49 [PATCH 0/4] Staging: winbond: wbusb: Fixed coding style issue Adil Mujeeb
@ 2012-11-07 18:50 ` Adil Mujeeb
  2012-11-07 18:50 ` [PATCH 2/4] Staging: winbond: mds: Fixed coding style issues Adil Mujeeb
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Adil Mujeeb @ 2012-11-07 18:50 UTC (permalink / raw)
  To: pavel; +Cc: gregkh, devel, linux-kernel, Adil Mujeeb

Removed unnecessary printk and pr_debug tracing calls

Signed-off-by: Adil Mujeeb <mujeeb.adil@gmail.com>
---
 drivers/staging/winbond/wbusb.c |   14 --------------
 1 file changed, 14 deletions(-)

diff --git a/drivers/staging/winbond/wbusb.c b/drivers/staging/winbond/wbusb.c
index 48aa136..3fa1ae4 100644
--- a/drivers/staging/winbond/wbusb.c
+++ b/drivers/staging/winbond/wbusb.c
@@ -79,18 +79,15 @@ 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");
 }
 
 static void wbsoft_stop(struct ieee80211_hw *hw)
 {
-	printk(KERN_INFO "%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__);
 	return 0;
 }
 
@@ -179,12 +176,9 @@ 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);
-
 	RFSynthesizer_SwitchingChannel(pHwData, channel); /* Switch channel */
 	pHwData->Channel = channel.ChanNo;
 	pHwData->band = channel.band;
-	pr_debug("Set channel is %d, band =%d\n", pHwData->Channel, pHwData->band);
 	reg->M28_MacControl &= ~0xff;	/* Clean channel information field */
 	reg->M28_MacControl |= channel.ChanNo;
 	Wb35Reg_WriteWithCallbackValue(pHwData, 0x0828, reg->M28_MacControl,
@@ -264,8 +258,6 @@ 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");
-
 	/* Should use channel_num, or something, as that is already pre-translated */
 	ch.band = 1;
 	ch.ChanNo = 1;
@@ -282,7 +274,6 @@ 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");
 	return 0;
 }
 
@@ -716,7 +707,6 @@ static int wb35_hw_init(struct ieee80211_hw *hw)
 	}
 
 	priv->sLocalPara.bAntennaNo = hal_get_antenna_number(pHwData);
-	pr_debug("Driver init, antenna no = %d\n", priv->sLocalPara.bAntennaNo);
 	hal_get_hw_radio_off(pHwData);
 
 	/* Waiting for HAL setting OK */
@@ -782,9 +772,6 @@ static int wb35_probe(struct usb_interface *intf,
 	interface = intf->cur_altsetting;
 	endpoint = &interface->endpoint[0].desc;
 
-	if (endpoint[2].wMaxPacketSize == 512)
-		printk("[w35und] Working on USB 2.0\n");
-
 	err = wb35_hw_init(dev);
 	if (err)
 		goto error_free_hw;
@@ -836,7 +823,6 @@ static void wb35_hw_halt(struct wbsoft_priv *adapter)
 {
 	/* Turn off Rx and Tx hardware ability */
 	hal_stop(&adapter->sHwData);
-	pr_debug("[w35und] Hal_stop O.K.\n");
 	/* Waiting Irp completed */
 	msleep(100);
 
-- 
1.7.10.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/4] Staging: winbond: mds: Fixed coding style issues
  2012-11-07 18:49 [PATCH 0/4] Staging: winbond: wbusb: Fixed coding style issue Adil Mujeeb
  2012-11-07 18:50 ` [PATCH 1/4] " Adil Mujeeb
@ 2012-11-07 18:50 ` Adil Mujeeb
  2012-11-07 18:50 ` [PATCH 3/4] Staging: winbond: wb35rx_f: " Adil Mujeeb
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Adil Mujeeb @ 2012-11-07 18:50 UTC (permalink / raw)
  To: pavel; +Cc: gregkh, devel, linux-kernel, Adil Mujeeb

Removed printk tracing call

Signed-off-by: Adil Mujeeb <mujeeb.adil@gmail.com>
---
 drivers/staging/winbond/mds.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/staging/winbond/mds.c b/drivers/staging/winbond/mds.c
index 43990e8..faa93f0 100644
--- a/drivers/staging/winbond/mds.c
+++ b/drivers/staging/winbond/mds.c
@@ -476,11 +476,8 @@ Mds_Tx(struct wbsoft_priv *adapter)
 			/* 931130.5.b */
 			FragmentCount = PacketSize/FragmentThreshold + 1;
 			stmp = PacketSize + FragmentCount*32 + 8; /* 931130.5.c 8:MIC */
-			if ((XmitBufSize + stmp) >= MAX_USB_TX_BUFFER) {
-				printk("[Mds_Tx] Excess max tx buffer.\n");
+			if ((XmitBufSize + stmp) >= MAX_USB_TX_BUFFER)
 				break; /* buffer is not enough */
-			}
-
 
 			/*
 			 * Start transmitting
-- 
1.7.10.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/4] Staging: winbond: wb35rx_f: Fixed coding style issues
  2012-11-07 18:49 [PATCH 0/4] Staging: winbond: wbusb: Fixed coding style issue Adil Mujeeb
  2012-11-07 18:50 ` [PATCH 1/4] " Adil Mujeeb
  2012-11-07 18:50 ` [PATCH 2/4] Staging: winbond: mds: Fixed coding style issues Adil Mujeeb
@ 2012-11-07 18:50 ` Adil Mujeeb
  2012-11-07 18:50 ` [PATCH 4/4] Staging: winbond: wb35rx_s: Fixed coding style issue Adil Mujeeb
  2012-11-09 18:01 ` [PATCH 0/4] Staging: winbond: wbusb: " Pavel Machek
  4 siblings, 0 replies; 8+ messages in thread
From: Adil Mujeeb @ 2012-11-07 18:50 UTC (permalink / raw)
  To: pavel; +Cc: gregkh, devel, linux-kernel, Adil Mujeeb

Fixed checkpatch.pl reported ERRORs

Signed-off-by: Adil Mujeeb <mujeeb.adil@gmail.com>
---
 drivers/staging/winbond/wb35rx_f.h |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/winbond/wb35rx_f.h b/drivers/staging/winbond/wb35rx_f.h
index 1fdf65e..559bdca 100644
--- a/drivers/staging/winbond/wb35rx_f.h
+++ b/drivers/staging/winbond/wb35rx_f.h
@@ -4,12 +4,12 @@
 #include <net/mac80211.h>
 #include "wbhal.h"
 
-//====================================
-// Interface function declare
-//====================================
-unsigned char		Wb35Rx_initial(  struct hw_data * pHwData );
-void		Wb35Rx_destroy(  struct hw_data * pHwData );
-void		Wb35Rx_stop(  struct hw_data * pHwData );
+/*
+ * Interface function declaration
+ */
+unsigned char	Wb35Rx_initial(struct hw_data *pHwData);
+void		Wb35Rx_destroy(struct hw_data *pHwData);
+void		Wb35Rx_stop(struct hw_data *pHwData);
 void		Wb35Rx_start(struct ieee80211_hw *hw);
 
 #endif
-- 
1.7.10.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 4/4] Staging: winbond: wb35rx_s: Fixed coding style issue
  2012-11-07 18:49 [PATCH 0/4] Staging: winbond: wbusb: Fixed coding style issue Adil Mujeeb
                   ` (2 preceding siblings ...)
  2012-11-07 18:50 ` [PATCH 3/4] Staging: winbond: wb35rx_f: " Adil Mujeeb
@ 2012-11-07 18:50 ` Adil Mujeeb
  2012-11-08  7:29   ` Dan Carpenter
  2012-11-09 18:01 ` [PATCH 0/4] Staging: winbond: wbusb: " Pavel Machek
  4 siblings, 1 reply; 8+ messages in thread
From: Adil Mujeeb @ 2012-11-07 18:50 UTC (permalink / raw)
  To: pavel; +Cc: gregkh, devel, linux-kernel, Adil Mujeeb

Fixed checpatch.pl reported ERRORs (excluding WARNING of line over 80 characters)

Signed-off-by: Adil Mujeeb <mujeeb.adil@gmail.com>
---
 drivers/staging/winbond/wb35rx_s.h |   62 ++++++++++++++++++------------------
 1 file changed, 31 insertions(+), 31 deletions(-)

diff --git a/drivers/staging/winbond/wb35rx_s.h b/drivers/staging/winbond/wb35rx_s.h
index 4b03274..545bc95 100644
--- a/drivers/staging/winbond/wb35rx_s.h
+++ b/drivers/staging/winbond/wb35rx_s.h
@@ -1,44 +1,44 @@
-//============================================================================
-// wb35rx.h --
-//============================================================================
+#ifndef __WINBOND_35RX_S_H
+#define __WINBOND_35RX_S_H
 
-// Definition for this module used
-#define MAX_USB_RX_BUFFER	4096	// This parameter must be 4096 931130.4.f
+/* Definition for this module used */
+#define MAX_USB_RX_BUFFER		4096	/* This parameter must be 4096 931130.4.f */
+#define MAX_USB_RX_BUFFER_NUMBER	ETHERNET_RX_DESCRIPTORS	/* Maximum 254, 255 is RESERVED ID */
+#define RX_INTERFACE			0	/* Interface 1 */
+#define RX_PIPE				2	/* Pipe 3 */
+#define MAX_PACKET_SIZE			1600	/* 1568	= 8 + 1532 + 4 + 24(IV EIV MIC ICV CRC) for check DMA data 931130.4.g */
+#define RX_END_TAG			0x0badbeef
 
-#define MAX_USB_RX_BUFFER_NUMBER	ETHERNET_RX_DESCRIPTORS		// Maximum 254, 255 is RESERVED ID
-#define RX_INTERFACE				0	// Interface 1
-#define RX_PIPE						2	// Pipe 3
-#define MAX_PACKET_SIZE				1600 //1568	// 8 + 1532 + 4 + 24(IV EIV MIC ICV CRC) for check DMA data 931130.4.g
-#define RX_END_TAG					0x0badbeef
 
-
-//====================================
-// Internal variable for module
-//====================================
+/*
+ * Internal variable for module
+ */
 struct wb35_rx {
-	u32			ByteReceived;// For calculating throughput of BulkIn
-	atomic_t		RxFireCounter;// Does Wb35Rx module fire?
+	u32		ByteReceived; /* For calculating throughput of BulkIn */
+	atomic_t	RxFireCounter;/* Does Wb35Rx module fire? */
 
-	u8	RxBuffer[ MAX_USB_RX_BUFFER_NUMBER ][ ((MAX_USB_RX_BUFFER+3) & ~0x03 ) ];
-	u16	RxBufferSize[ ((MAX_USB_RX_BUFFER_NUMBER+1) & ~0x01) ];
-	u8	RxOwner[ ((MAX_USB_RX_BUFFER_NUMBER+3) & ~0x03 ) ];//Ownership of buffer  0: SW 1:HW
+	u8		RxBuffer[MAX_USB_RX_BUFFER_NUMBER][((MAX_USB_RX_BUFFER+3) & ~0x03)];
+	u16		RxBufferSize[((MAX_USB_RX_BUFFER_NUMBER+1) & ~0x01)];
+	u8		RxOwner[((MAX_USB_RX_BUFFER_NUMBER+3) & ~0x03)]; /* Ownership of buffer  0:SW 1:HW */
 
-	u32	RxProcessIndex;//The next index to process
-	u32	RxBufferId;
-	u32	EP3vm_state;
+	u32		RxProcessIndex; /* The next index to process */
+	u32		RxBufferId;
+	u32		EP3vm_state;
 
-	u32	rx_halt; // For VM stopping
+	u32		rx_halt; /* For VM stopping */
 
-	u16	MoreDataSize;
-	u16	PacketSize;
+	u16		MoreDataSize;
+	u16		PacketSize;
 
-	u32	CurrentRxBufferId; // For complete routine usage
-	u32	Rx3UrbCancel;
+	u32		CurrentRxBufferId; /* For complete routine usage */
+	u32		Rx3UrbCancel;
 
-	u32	LastR1; // For RSSI reporting
-	struct urb *				RxUrb;
-	u32		Ep3ErrorCount2; // 20060625.1 Usbd for Rx DMA error count
+	u32		LastR1; /* For RSSI reporting */
+	struct urb	*RxUrb;
+	u32		Ep3ErrorCount2; /* 20060625.1 Usbd for Rx DMA error count */
 
 	int		EP3VM_status;
-	u8 *	pDRx;
+	u8		*pDRx;
 };
+
+#endif /* __WINBOND_35RX_S_H */
-- 
1.7.10.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 4/4] Staging: winbond: wb35rx_s: Fixed coding style issue
  2012-11-07 18:50 ` [PATCH 4/4] Staging: winbond: wb35rx_s: Fixed coding style issue Adil Mujeeb
@ 2012-11-08  7:29   ` Dan Carpenter
  2012-11-08  9:57     ` Adil Mujeeb
  0 siblings, 1 reply; 8+ messages in thread
From: Dan Carpenter @ 2012-11-08  7:29 UTC (permalink / raw)
  To: Adil Mujeeb; +Cc: pavel, devel, gregkh, linux-kernel

It's better to use more descriptive subjects on the patches.

This one could probably have been broken into smaller patches
[patch 4/x] Staging: winbond: wb35rx_s: fix white space
[patch 5/x] Staging: winbond: wb35rx_s: fix comments
[patch 6/x] Staging: winbond: wb35rx_s: allow header to be included twice

It's small enough that I don't have strong feelings about it, but
in general that's how you should do it.

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 4/4] Staging: winbond: wb35rx_s: Fixed coding style issue
  2012-11-08  7:29   ` Dan Carpenter
@ 2012-11-08  9:57     ` Adil Mujeeb
  0 siblings, 0 replies; 8+ messages in thread
From: Adil Mujeeb @ 2012-11-08  9:57 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: pavel, devel, gregkh, linux-kernel

On Thu, Nov 8, 2012 at 12:59 PM, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> It's better to use more descriptive subjects on the patches.
>
> This one could probably have been broken into smaller patches
> [patch 4/x] Staging: winbond: wb35rx_s: fix white space
> [patch 5/x] Staging: winbond: wb35rx_s: fix comments
> [patch 6/x] Staging: winbond: wb35rx_s: allow header to be included twice
>
> It's small enough that I don't have strong feelings about it, but
> in general that's how you should do it.
>

Thanks Dan for your comment. I'll keep this in mind during my future work.

Regards,
Adil

> regards,
> dan carpenter
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/4] Staging: winbond: wbusb: Fixed coding style issue
  2012-11-07 18:49 [PATCH 0/4] Staging: winbond: wbusb: Fixed coding style issue Adil Mujeeb
                   ` (3 preceding siblings ...)
  2012-11-07 18:50 ` [PATCH 4/4] Staging: winbond: wb35rx_s: Fixed coding style issue Adil Mujeeb
@ 2012-11-09 18:01 ` Pavel Machek
  4 siblings, 0 replies; 8+ messages in thread
From: Pavel Machek @ 2012-11-09 18:01 UTC (permalink / raw)
  To: Adil Mujeeb; +Cc: gregkh, devel, linux-kernel

Hi!

> winbond directory files have lots of coding style issues. 
> The patch set tries to remove *most* (if not all) of the coding style issues. 
> checkpatch.pl script can still complain but major part of the serious coding style issues have been rectified.
>

Looks good.
Acked-by: Pavel Machek <pavel@ucw.cz>


-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-11-09 18:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-07 18:49 [PATCH 0/4] Staging: winbond: wbusb: Fixed coding style issue Adil Mujeeb
2012-11-07 18:50 ` [PATCH 1/4] " Adil Mujeeb
2012-11-07 18:50 ` [PATCH 2/4] Staging: winbond: mds: Fixed coding style issues Adil Mujeeb
2012-11-07 18:50 ` [PATCH 3/4] Staging: winbond: wb35rx_f: " Adil Mujeeb
2012-11-07 18:50 ` [PATCH 4/4] Staging: winbond: wb35rx_s: Fixed coding style issue Adil Mujeeb
2012-11-08  7:29   ` Dan Carpenter
2012-11-08  9:57     ` Adil Mujeeb
2012-11-09 18:01 ` [PATCH 0/4] Staging: winbond: wbusb: " Pavel Machek

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).