Re: [PATCH v2 3/3] Staging: bcm: Outsourced IsFlash2x() handling

2014-05-21 Thread Matthias Beyer
On 20-05-2014 22:52:41, Dan Carpenter wrote: On Tue, May 20, 2014 at 05:12:46PM +0200, Matthias Beyer wrote: This patch outsources the code from the IsFlash2x() check in bcm_char_ioctl_nvm_rw() function to shorten it. This patch introduces a bug. Please fix and resend. Also move the

Re: [PATCH v2 3/3] Staging: bcm: Outsourced IsFlash2x() handling

2014-05-21 Thread Dan Carpenter
No problem, let me explain the bug better. On Wed, May 21, 2014 at 06:14:53PM +0200, Matthias Beyer wrote: + ULONG ulDSDMagicNumInUsrBuff = 0; + + Status = BcmFlash2xCorruptSig(Adapter, Adapter-eActiveDSD); + if (Status != STATUS_SUCCESS) { + if (((stNVMReadWrite-uiOffset +

[PATCH v2 3/3] Staging: bcm: Outsourced IsFlash2x() handling

2014-05-20 Thread Matthias Beyer
This patch outsources the code from the IsFlash2x() check in bcm_char_ioctl_nvm_rw() function to shorten it. Signed-off-by: Matthias Beyer m...@beyermatthias.de --- drivers/staging/bcm/Bcmchar.c | 101 -- 1 file changed, 58 insertions(+), 43 deletions(-)

Re: [PATCH v2 3/3] Staging: bcm: Outsourced IsFlash2x() handling

2014-05-20 Thread Dan Carpenter
On Tue, May 20, 2014 at 05:12:46PM +0200, Matthias Beyer wrote: This patch outsources the code from the IsFlash2x() check in bcm_char_ioctl_nvm_rw() function to shorten it. This patch introduces a bug. Please fix and resend. Also move the function forward so we don't need a declaration. +