* [PATCH] Staging: wlan-ng: hfa384x_usb.c Fixed too long code line warnings.
@ 2016-11-30 4:29 Yan Laijun
2016-11-30 9:01 ` Greg KH
0 siblings, 1 reply; 5+ messages in thread
From: Yan Laijun @ 2016-11-30 4:29 UTC (permalink / raw)
To: gregkh; +Cc: sergio.paracuellos, bhumirks, devel, linux-kernel
Fixed checkpatch warning "line over 80 characters" in
wlan-ng/hfa384x_usb.c file.
Signed-off-by: Yan Laijun <yan.laijun@gmail.com>
---
drivers/staging/wlan-ng/hfa384x_usb.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c
index 5f11f6e..3447fc5 100644
--- a/drivers/staging/wlan-ng/hfa384x_usb.c
+++ b/drivers/staging/wlan-ng/hfa384x_usb.c
@@ -3037,7 +3037,7 @@ static void hfa384x_usbin_callback(struct urb *urb)
{
struct wlandevice *wlandev = urb->context;
struct hfa384x *hw;
- union hfa384x_usbin *usbin = (union hfa384x_usbin *)urb->transfer_buffer;
+ union hfa384x_usbin *usbin = NULL;
struct sk_buff *skb = NULL;
int result;
int urb_status;
@@ -3049,6 +3049,7 @@ static void hfa384x_usbin_callback(struct urb *urb)
ABORT
} action;
+ usbin = (union hfa384x_usbin *)urb->transfer_buffer;
if (!wlandev || !wlandev->netdev || wlandev->hwremoved)
goto exit;
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] Staging: wlan-ng: hfa384x_usb.c Fixed too long code line warnings.
2016-11-30 4:29 [PATCH] Staging: wlan-ng: hfa384x_usb.c Fixed too long code line warnings Yan Laijun
@ 2016-11-30 9:01 ` Greg KH
2016-12-02 10:08 ` Yan Laijun
0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2016-11-30 9:01 UTC (permalink / raw)
To: Yan Laijun; +Cc: devel, sergio.paracuellos, linux-kernel, bhumirks
On Wed, Nov 30, 2016 at 12:29:13PM +0800, Yan Laijun wrote:
> Fixed checkpatch warning "line over 80 characters" in
> wlan-ng/hfa384x_usb.c file.
>
> Signed-off-by: Yan Laijun <yan.laijun@gmail.com>
> ---
> drivers/staging/wlan-ng/hfa384x_usb.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c
> index 5f11f6e..3447fc5 100644
> --- a/drivers/staging/wlan-ng/hfa384x_usb.c
> +++ b/drivers/staging/wlan-ng/hfa384x_usb.c
> @@ -3037,7 +3037,7 @@ static void hfa384x_usbin_callback(struct urb *urb)
> {
> struct wlandevice *wlandev = urb->context;
> struct hfa384x *hw;
> - union hfa384x_usbin *usbin = (union hfa384x_usbin *)urb->transfer_buffer;
> + union hfa384x_usbin *usbin = NULL;
Why set this to NULL if you then assign it to something else a few lines
later?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Staging: wlan-ng: hfa384x_usb.c Fixed too long code line warnings.
2016-11-30 9:01 ` Greg KH
@ 2016-12-02 10:08 ` Yan Laijun
2016-12-02 10:09 ` [PATCH v2] staging: wlan-ng: " Yan Laijun
0 siblings, 1 reply; 5+ messages in thread
From: Yan Laijun @ 2016-12-02 10:08 UTC (permalink / raw)
To: Greg Kroah-Hartman, Sergio Paracuellos, Bhumika Goyal; +Cc: devel, linux-kernel
Remove initialization of usbin on its decarlation.
Yan Laijun (1):
Staging: wlan-ng: hfa384x_usb.c Fixed too long code line warnings.
drivers/staging/wlan-ng/hfa384x_usb.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--
1.9.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2] staging: wlan-ng: Fixed too long code line warnings.
2016-12-02 10:08 ` Yan Laijun
@ 2016-12-02 10:09 ` Yan Laijun
2016-12-02 10:49 ` Markus Böhme
0 siblings, 1 reply; 5+ messages in thread
From: Yan Laijun @ 2016-12-02 10:09 UTC (permalink / raw)
To: Greg Kroah-Hartman, Sergio Paracuellos, Bhumika Goyal; +Cc: devel, linux-kernel
Fixed checkpatch warning "line over 80 characters" in
wlan-ng/hfa384x_usb.c file.
Signed-off-by: Yan Laijun <yan.laijun@gmail.com>
---
Changes in v2:
- Remove initialization of usbin on its decarlation.
---
drivers/staging/wlan-ng/hfa384x_usb.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c
index 5f11f6e..c7bda04 100644
--- a/drivers/staging/wlan-ng/hfa384x_usb.c
+++ b/drivers/staging/wlan-ng/hfa384x_usb.c
@@ -3037,7 +3037,7 @@ static void hfa384x_usbin_callback(struct urb *urb)
{
struct wlandevice *wlandev = urb->context;
struct hfa384x *hw;
- union hfa384x_usbin *usbin = (union hfa384x_usbin *)urb->transfer_buffer;
+ union hfa384x_usbin *usbin;
struct sk_buff *skb = NULL;
int result;
int urb_status;
@@ -3049,6 +3049,7 @@ static void hfa384x_usbin_callback(struct urb *urb)
ABORT
} action;
+ usbin = (union hfa384x_usbin *)urb->transfer_buffer;
if (!wlandev || !wlandev->netdev || wlandev->hwremoved)
goto exit;
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] staging: wlan-ng: Fixed too long code line warnings.
2016-12-02 10:09 ` [PATCH v2] staging: wlan-ng: " Yan Laijun
@ 2016-12-02 10:49 ` Markus Böhme
0 siblings, 0 replies; 5+ messages in thread
From: Markus Böhme @ 2016-12-02 10:49 UTC (permalink / raw)
To: Yan Laijun, Greg Kroah-Hartman, Sergio Paracuellos, Bhumika Goyal
Cc: devel, linux-kernel
On 12/02/2016 11:09 AM, Yan Laijun wrote:
> Fixed checkpatch warning "line over 80 characters" in
> wlan-ng/hfa384x_usb.c file.
>
> Signed-off-by: Yan Laijun <yan.laijun@gmail.com>
> ---
> Changes in v2:
> - Remove initialization of usbin on its decarlation.
> ---
> drivers/staging/wlan-ng/hfa384x_usb.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c
> index 5f11f6e..c7bda04 100644
> --- a/drivers/staging/wlan-ng/hfa384x_usb.c
> +++ b/drivers/staging/wlan-ng/hfa384x_usb.c
> @@ -3037,7 +3037,7 @@ static void hfa384x_usbin_callback(struct urb *urb)
> {
> struct wlandevice *wlandev = urb->context;
> struct hfa384x *hw;
> - union hfa384x_usbin *usbin = (union hfa384x_usbin *)urb->transfer_buffer;
> + union hfa384x_usbin *usbin;
> struct sk_buff *skb = NULL;
> int result;
> int urb_status;
> @@ -3049,6 +3049,7 @@ static void hfa384x_usbin_callback(struct urb *urb)
> ABORT
> } action;
>
> + usbin = (union hfa384x_usbin *)urb->transfer_buffer;
> if (!wlandev || !wlandev->netdev || wlandev->hwremoved)
> goto exit;
>
>
If you separate declaration and assignment of usbin, maybe it makes
sense to move the assignment down to where usbin is used for the first time.
Regards,
Markus
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-12-02 10:49 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-30 4:29 [PATCH] Staging: wlan-ng: hfa384x_usb.c Fixed too long code line warnings Yan Laijun
2016-11-30 9:01 ` Greg KH
2016-12-02 10:08 ` Yan Laijun
2016-12-02 10:09 ` [PATCH v2] staging: wlan-ng: " Yan Laijun
2016-12-02 10:49 ` Markus Böhme
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.