Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1698679

Re: [PATCH] drivers:staging:wlan-ng Correct multiple line dereference

From Joe Perches <joe@perches.com>
Newsgroups linux.kernel
Subject Re: [PATCH] drivers:staging:wlan-ng Correct multiple line dereference
Date 2017-07-28 12:40 +0200
Message-ID <u8aQx-2wA-7@gated-at.bofh.it> (permalink)
References <u8anw-2mH-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, 2017-07-28 at 15:33 +0530, janani-sankarababu wrote:
> 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.

> diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c
[]
> @@ -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);

This should now be a single line

		result = hfa384x_usbctlx_complete_sync(hw, ctlx, cmplt);

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] drivers:staging:wlan-ng Correct multiple line dereference janani-sankarababu <jananis37@gmail.com> - 2017-07-28 12:10 +0200
  Re: [PATCH] drivers:staging:wlan-ng Correct multiple line dereference Dan Carpenter <dan.carpenter@oracle.com> - 2017-07-28 12:30 +0200
  Re: [PATCH] drivers:staging:wlan-ng Correct multiple line  dereference Joe Perches <joe@perches.com> - 2017-07-28 12:40 +0200

csiph-web