lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 11 Feb 2016 20:32:15 -0800
From:	Joe Perches <joe@...ches.com>
To:	Shaun Ren <shaun.ren@...ux.com>, gregkh@...uxfoundation.org,
	rjui@...adcom.com
Cc:	sbranden@...adcom.com, jonmason@...adcom.com,
	mahfouz.saif.elyazal@...il.com, devel@...verdev.osuosl.org,
	linux-arm-kernel@...ts.infradead.org,
	bcm-kernel-feedback-list@...adcom.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 2/8] Staging: rts5208: rtsx_transport.c: Align to
 open parenthesis

On Thu, 2016-02-11 at 20:07 -0800, Shaun Ren wrote:
> This patch fixes the alignment issue reported by checkpatch.pl:
> 
> CHECK: Alignment should match open parenthesis
[]
> diff --git a/drivers/staging/rts5208/rtsx_transport.c b/drivers/staging/rts5208/rtsx_transport.c
[]
> @@ -52,12 +55,14 @@ unsigned int rtsx_stor_access_xfer_buf(unsigned char *buffer,
>  		if (*offset >= scsi_bufflen(srb))
>  			return 0;
>  		cnt = min(buflen, scsi_bufflen(srb) - *offset);
> +
> +		unsigned char *sgbuffer = (unsigned char *)scsi_sglist(srb) +
> +			*offset;

Please don't declare variables in the middle of functions.
Variable declarations are only done at the beginning of functions.

> +
>  		if (dir == TO_XFER_BUF)
> -			memcpy((unsigned char *) scsi_sglist(srb) + *offset,
> -					buffer, cnt);
> +			memcpy(sgbuffer, buffer, cnt);
>  		else
> -			memcpy(buffer, (unsigned char *) scsi_sglist(srb) +
> -					*offset, cnt);
> +			memcpy(buffer, sgbuffer, cnt);
>  		*offset += cnt;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ