Re: [PATCH] Staging:drivers:wlan_ng: fix all coding style issues in hfa384x_usb.c file
On Mon, Oct 26, 2015 at 09:45:37PM +0100, Bogicevic Sasa wrote: > Fix all coding style issues in file so checkpatch.pl doesen't cry no more > > Signed-off-by: Bogicevic Sasa Please break this up into specific pieces. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Staging:drivers:wlan_ng: fix all coding style issues in hfa384x_usb.c file
On Mon, Oct 26, 2015 at 09:45:37PM +0100, Bogicevic Sasa wrote: > Fix all coding style issues in file so checkpatch.pl doesen't cry no more > > Signed-off-by: Bogicevic SasaPlease break this up into specific pieces. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] Staging:drivers:wlan_ng: fix all coding style issues in hfa384x_usb.c file
Fix all coding style issues in file so checkpatch.pl doesen't cry no more Signed-off-by: Bogicevic Sasa --- drivers/staging/wlan-ng/hfa384x_usb.c | 189 +- 1 file changed, 95 insertions(+), 94 deletions(-) diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c index e109a7f..bdfc010 100644 --- a/drivers/staging/wlan-ng/hfa384x_usb.c +++ b/drivers/staging/wlan-ng/hfa384x_usb.c @@ -145,11 +145,11 @@ enum cmd_mode { DOASYNC }; -#define THROTTLE_JIFFIES (HZ/8) +#define THROTTLE_JIFFIES (HZ / 8) #define URB_ASYNC_UNLINK 0 #define USB_QUEUE_BULK 0 -#define ROUNDUP64(a) (((a)+63)&~63) +#define ROUNDUP64(a) (((a) + 63) & ~63) #ifdef DEBUG_USB static void dbprint_urb(struct urb *urb); @@ -328,14 +328,14 @@ void dbprint_urb(struct urb *urb) * * Call context: * Any -*/ +*/ static int submit_rx_urb(hfa384x_t *hw, gfp_t memflags) { struct sk_buff *skb; int result; skb = dev_alloc_skb(sizeof(hfa384x_usbin_t)); - if (skb == NULL) { + if (!skb) { result = -ENOMEM; goto done; } @@ -390,7 +390,7 @@ done: * * Call context: * Any -*/ +*/ static int submit_tx_urb(hfa384x_t *hw, struct urb *tx_urb, gfp_t memflags) { struct net_device *netdev = hw->wlandev->netdev; @@ -433,7 +433,7 @@ static int submit_tx_urb(hfa384x_t *hw, struct urb *tx_urb, gfp_t memflags) * * Call context: * process (by design) -*/ +*/ static void hfa384x_usb_defer(struct work_struct *data) { hfa384x_t *hw = container_of(data, struct hfa384x, usb_work); @@ -527,7 +527,7 @@ static void hfa384x_usb_defer(struct work_struct *data) * * Call context: * process -*/ +*/ void hfa384x_create(hfa384x_t *hw, struct usb_device *usb) { memset(hw, 0, sizeof(hfa384x_t)); @@ -598,7 +598,7 @@ void hfa384x_create(hfa384x_t *hw, struct usb_device *usb) * * Call context: * process -*/ +*/ void hfa384x_destroy(hfa384x_t *hw) { struct sk_buff *skb; @@ -621,7 +621,7 @@ static hfa384x_usbctlx_t *usbctlx_alloc(void) ctlx = kzalloc(sizeof(*ctlx), in_interrupt() ? GFP_ATOMIC : GFP_KERNEL); - if (ctlx != NULL) + if (!ctlx) init_completion(>done); return ctlx; @@ -655,7 +655,7 @@ usbctlx_get_rridresult(const hfa384x_usb_rridresp_t *rridresp, * Completor object: * This completor must be passed to hfa384x_usbctlx_complete_sync() * when processing a CTLX that returns a hfa384x_cmdresult_t structure. -*/ +*/ struct usbctlx_cmd_completor { struct usbctlx_completor head; @@ -681,14 +681,14 @@ static inline struct usbctlx_completor *init_cmd_completor( completor->head.complete = usbctlx_cmd_completor_fn; completor->cmdresp = cmdresp; completor->result = result; - return &(completor->head); + return >head; } /* * Completor object: * This completor must be passed to hfa384x_usbctlx_complete_sync() * when processing a CTLX that reads a RID. -*/ +*/ struct usbctlx_rrid_completor { struct usbctlx_completor head; @@ -729,25 +729,25 @@ static inline struct usbctlx_completor *init_rrid_completor( completor->rridresp = rridresp; completor->riddata = riddata; completor->riddatalen = riddatalen; - return &(completor->head); + return >head; } /* * Completor object: * Interprets the results of a synchronous RID-write -*/ +*/ #define init_wrid_completor init_cmd_completor /* * Completor object: * Interprets the results of a synchronous memory-write -*/ +*/ #define init_wmem_completor init_cmd_completor /* * Completor object: * Interprets the results of a synchronous memory-read -*/ +*/ struct usbctlx_rmem_completor { struct usbctlx_completor head; @@ -778,7 +778,7 @@ static inline struct usbctlx_completor *init_rmem_completor( completor->rmemresp = rmemresp; completor->data = data; completor->len = len; - return &(completor->head); +
[PATCH] Staging:drivers:wlan_ng: fix all coding style issues in hfa384x_usb.c file
Fix all coding style issues in file so checkpatch.pl doesen't cry no more Signed-off-by: Bogicevic Sasa--- drivers/staging/wlan-ng/hfa384x_usb.c | 189 +- 1 file changed, 95 insertions(+), 94 deletions(-) diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c index e109a7f..bdfc010 100644 --- a/drivers/staging/wlan-ng/hfa384x_usb.c +++ b/drivers/staging/wlan-ng/hfa384x_usb.c @@ -145,11 +145,11 @@ enum cmd_mode { DOASYNC }; -#define THROTTLE_JIFFIES (HZ/8) +#define THROTTLE_JIFFIES (HZ / 8) #define URB_ASYNC_UNLINK 0 #define USB_QUEUE_BULK 0 -#define ROUNDUP64(a) (((a)+63)&~63) +#define ROUNDUP64(a) (((a) + 63) & ~63) #ifdef DEBUG_USB static void dbprint_urb(struct urb *urb); @@ -328,14 +328,14 @@ void dbprint_urb(struct urb *urb) * * Call context: * Any -*/ +*/ static int submit_rx_urb(hfa384x_t *hw, gfp_t memflags) { struct sk_buff *skb; int result; skb = dev_alloc_skb(sizeof(hfa384x_usbin_t)); - if (skb == NULL) { + if (!skb) { result = -ENOMEM; goto done; } @@ -390,7 +390,7 @@ done: * * Call context: * Any -*/ +*/ static int submit_tx_urb(hfa384x_t *hw, struct urb *tx_urb, gfp_t memflags) { struct net_device *netdev = hw->wlandev->netdev; @@ -433,7 +433,7 @@ static int submit_tx_urb(hfa384x_t *hw, struct urb *tx_urb, gfp_t memflags) * * Call context: * process (by design) -*/ +*/ static void hfa384x_usb_defer(struct work_struct *data) { hfa384x_t *hw = container_of(data, struct hfa384x, usb_work); @@ -527,7 +527,7 @@ static void hfa384x_usb_defer(struct work_struct *data) * * Call context: * process -*/ +*/ void hfa384x_create(hfa384x_t *hw, struct usb_device *usb) { memset(hw, 0, sizeof(hfa384x_t)); @@ -598,7 +598,7 @@ void hfa384x_create(hfa384x_t *hw, struct usb_device *usb) * * Call context: * process -*/ +*/ void hfa384x_destroy(hfa384x_t *hw) { struct sk_buff *skb; @@ -621,7 +621,7 @@ static hfa384x_usbctlx_t *usbctlx_alloc(void) ctlx = kzalloc(sizeof(*ctlx), in_interrupt() ? GFP_ATOMIC : GFP_KERNEL); - if (ctlx != NULL) + if (!ctlx) init_completion(>done); return ctlx; @@ -655,7 +655,7 @@ usbctlx_get_rridresult(const hfa384x_usb_rridresp_t *rridresp, * Completor object: * This completor must be passed to hfa384x_usbctlx_complete_sync() * when processing a CTLX that returns a hfa384x_cmdresult_t structure. -*/ +*/ struct usbctlx_cmd_completor { struct usbctlx_completor head; @@ -681,14 +681,14 @@ static inline struct usbctlx_completor *init_cmd_completor( completor->head.complete = usbctlx_cmd_completor_fn; completor->cmdresp = cmdresp; completor->result = result; - return &(completor->head); + return >head; } /* * Completor object: * This completor must be passed to hfa384x_usbctlx_complete_sync() * when processing a CTLX that reads a RID. -*/ +*/ struct usbctlx_rrid_completor { struct usbctlx_completor head; @@ -729,25 +729,25 @@ static inline struct usbctlx_completor *init_rrid_completor( completor->rridresp = rridresp; completor->riddata = riddata; completor->riddatalen = riddatalen; - return &(completor->head); + return >head; } /* * Completor object: * Interprets the results of a synchronous RID-write -*/ +*/ #define init_wrid_completor init_cmd_completor /* * Completor object: * Interprets the results of a synchronous memory-write -*/ +*/ #define init_wmem_completor init_cmd_completor /* * Completor object: * Interprets the results of a synchronous memory-read -*/ +*/ struct usbctlx_rmem_completor { struct usbctlx_completor head; @@ -778,7 +778,7 @@ static inline struct usbctlx_completor *init_rmem_completor( completor->rmemresp = rmemresp; completor->data = data; completor->len = len; -