Skip to contentSkip to conversation

staging:wlan-ng Fix Multiple line dereference

PATCH In review Janani S 2 participants 2 messages Aug 18, 2017 – Aug 20, 2017 Staging

lore
Share & tools
lore

Janani S

author
#0 lore raw

PATCH 1/1 staging:wlan-ng Fix Multiple line dereference

This patch fixes multiple line dereference warning reported by checkpatch script.

---
 drivers/staging/wlan-ng/hfa384x_usb.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)
drivers/staging/wlan-ng/hfa384x_usb.c +4 -8
index ee5fa86..2746e13 100644
@@ -1345,15 +1345,11 @@ static int hfa384x_usbctlx_complete_sync(struct hfa384x *hw,
 		kfree(ctlx);
 	} else if (mode == DOWAIT) {
 		struct usbctlx_cmd_completor completor;
+		struct usbctlx_completor *cmplt;
 
-		result =
-		    hfa384x_usbctlx_complete_sync(hw, ctlx,
-						  init_cmd_completor(&completor,
-								     &ctlx->
-								     inbuf.
-								     cmdresp,
-								     &cmd->
-								     result));
+		cmplt = init_cmd_completor(&completor, &ctlx->inbuf.cmdresp,
+					   &cmd->result);
+		result = hfa384x_usbctlx_complete_sync(hw, ctlx, cmplt);
 	}
 
 done:
Signature · 1 line
1.9.1
maintainer
#1 lore raw
Quoted 22 lines · Janani S

This patch fixes multiple line dereference warning reported by checkpatch script.

---
 drivers/staging/wlan-ng/hfa384x_usb.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)
drivers/staging/wlan-ng/hfa384x_usb.c +1 -4
index ee5fa86..2746e13 100644
@@ -1345,15 +1345,11 @@ static int hfa384x_usbctlx_complete_sync(struct hfa384x *hw,
 		kfree(ctlx);
 	} else if (mode == DOWAIT) {
 		struct usbctlx_cmd_completor completor;
+		struct usbctlx_completor *cmplt;
 
-		result =
-		    hfa384x_usbctlx_complete_sync(hw, ctlx,
-						  init_cmd_completor(&completor,
-								     &ctlx->

drivers/staging/wlan-ng/hfa384x_usb.c static int hfa384x_usbctlx_complete_sync(struct hfa384x *hw, · line 1355

Quoted 10 lines
drivers/staging/wlan-ng/hfa384x_usb.c +3 -4
-								     inbuf.
-								     cmdresp,
-								     &cmd->
-								     result));
+		cmplt = init_cmd_completor(&completor, &ctlx->inbuf.cmdresp,
+					   &cmd->result);
+		result = hfa384x_usbctlx_complete_sync(hw, ctlx, cmplt);
 	}
 
 done:

Someone else sent this same patch right before you did, sorry.

greg k-h