drivers:staging:wlan-ng Correct multiple line dereference
PATCH 1/1 drivers:staging:wlan-ng Correct multiple line dereference
This patch fixes multiple line dereference Warning reported by checkpath script. This has been made to simplify the code and make it more readable.
--- drivers/staging/wlan-ng/hfa384x_usb.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-)
drivers/staging/wlan-ng/hfa384x_usb.c +4 -0
@@ -1345,15 +1345,13 @@ static int hfa384x_usbctlx_complete_sync(struct hfa384x *hw,kfree (ctlx); }else if (mode ==DOWAIT ) {struct usbctlx_cmd_completor completor; +struct usbctlx_completor *cmplt; + + cmplt =init_cmd_completor (&completor, &ctlx->inbuf.cmdresp, + &cmd->result);
result =
- hfa384x_usbctlx_complete_sync(hw, ctlx,
- init_cmd_completor(&completor,
- &ctlx-> - inbuf. - cmdresp, - &cmd-> - result));
+ hfa384x_usbctlx_complete_sync(hw, ctlx, cmplt);
}
done:
--
1.9.1
Fix your email From header to match your Signed-off-by line. The subject should be:
[PATCH] staging: wlan-ng: Correct multiple line dereference
Quoted 1 line · janani-sankarababu
This patch fixes multiple line dereference Warning reported by checkpath script. This has been made to simplify the code and make it more readable.
Break this line up at the 70 character mark.
Quoted 2 lines
Signed-off-by Janani S <[email protected]>
Use your full legal name as if you were signing a legal document to certify that you haven't stolen this code from Darl McBride.
Quoted 16 lines
--- drivers/staging/wlan-ng/hfa384x_usb.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-)drivers/staging/wlan-ng/hfa384x_usb.c +4
-0@@ -1345,15 +1345,13 @@ static int hfa384x_usbctlx_complete_sync(struct hfa384x *hw,kfree (ctlx); }else if (mode ==DOWAIT ) {struct usbctlx_cmd_completor completor; +struct usbctlx_completor *cmplt; + + cmplt =init_cmd_completor (&completor, &ctlx->inbuf.cmdresp, + &cmd->result);
drivers/staging/wlan-ng/hfa384x_usb.c static int hfa384x_usbctlx_complete_sync(struct hfa384x *hw, · line 1354
Quoted 10 lines
drivers/staging/wlan-ng/hfa384x_usb.c +1
-7result = -hfa384x_usbctlx_complete_sync (hw, ctlx, -init_cmd_completor (&completor, - &ctlx-> - inbuf. - cmdresp, - &cmd-> - result)); +hfa384x_usbctlx_complete_sync (hw, ctlx, cmplt);
Move this to the previous line:
result = hfa384x_usbctlx_complete_sync(hw, ctlx, cmplt);
Also the patch got corrupted by your email client so it can't apply.
Read Documentation/process/email-clients.rst
But generally this is a nice little cleanup. Please resend a v2 version.
regards,
dan carpenter
Quoted 1 line · janani-sankarababu
This patch fixes multiple line dereference Warning reported by checkpath script. This has been made to simplify the code and make it more readable.
Please wrap your commit messages to 75 characters per line.
And run your suggested patches though checkpatch too.
drivers/staging/wlan-ng/hfa384x_usb.c
Quoted 1 line
drivers/staging/wlan-ng/hfa384x_usb.c +0
-0
[]
Quoted 8 lines
drivers/staging/wlan-ng/hfa384x_usb.c +4
-0@@ -1345,15 +1345,13 @@ static int hfa384x_usbctlx_complete_sync(struct hfa384x *hw,kfree (ctlx); }else if (mode ==DOWAIT ) {struct usbctlx_cmd_completor completor; +struct usbctlx_completor *cmplt; + + cmplt =init_cmd_completor (&completor, &ctlx->inbuf.cmdresp, + &cmd->result);
drivers/staging/wlan-ng/hfa384x_usb.c static int hfa384x_usbctlx_complete_sync(struct hfa384x *hw, · line 1354
Quoted 10 lines
drivers/staging/wlan-ng/hfa384x_usb.c +1
-7result = -hfa384x_usbctlx_complete_sync (hw, ctlx, -init_cmd_completor (&completor, - &ctlx-> - inbuf. - cmdresp, - &cmd-> - result)); +hfa384x_usbctlx_complete_sync (hw, ctlx, cmplt);
This should now be a single line
result = hfa384x_usbctlx_complete_sync(hw, ctlx, cmplt);