From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934365AbdCLQYv (ORCPT ); Sun, 12 Mar 2017 12:24:51 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:52394 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933935AbdCLQYm (ORCPT ); Sun, 12 Mar 2017 12:24:42 -0400 Date: Sun, 12 Mar 2017 17:24:17 +0100 From: Greg KH To: Andrii Cc: devel@driverdev.osuosl.org, sergio.paracuellos@gmail.com, linux-kernel@vger.kernel.org Subject: Re: [PATCHv2] staging: wlan-ng: fix avoid multiple line dereference warning reported by checkpatch.pl Message-ID: <20170312162417.GA6843@kroah.com> References: <20170311223956.79ded6a2@andrii-VirtualBox> <20170312173009.7d0fc710@andrii-VirtualBox> <20170312154207.GB28359@kroah.com> <20170312174733.455782d3@andrii-VirtualBox> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170312174733.455782d3@andrii-VirtualBox> User-Agent: Mutt/1.8.0 (2017-02-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Mar 12, 2017 at 05:47:33PM +0200, Andrii wrote: > On Sun, 12 Mar 2017 16:42:07 +0100 > Greg KH wrote: > > > On Sun, Mar 12, 2017 at 05:30:09PM +0200, Andrii wrote: > > > Fixed three code style warnings (multiple line dereference) reported > > > by checkpatch.pl script. > > > > > > Signed-off-by: Andrii Vladyka > > > > > diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c > > > b/drivers/staging/wlan-ng/hfa384x_usb.c index 6134eba..a050748 > > > 100644 --- a/drivers/staging/wlan-ng/hfa384x_usb.c > > > +++ b/drivers/staging/wlan-ng/hfa384x_usb.c > > > @@ -1346,14 +1346,8 @@ hfa384x_docmd(struct hfa384x *hw, > > > } else if (mode == DOWAIT) { > > > struct usbctlx_cmd_completor completor; > > > > > > - result = > > > - hfa384x_usbctlx_complete_sync(hw, ctlx, > > > - > > > 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)) > > > > Hm, did you run your patch through checkpatch? There's no way that > > his code is correct :( > > > > greg k-h > > Yes, I did. The code is correct. Checkpatch now reports "Alignment > should match open parenthesis" CHECK, which is obviously better than > original WARNING. Really? No, it's much worse. Indentation should be obvious when looking at the code, right now this is just so wrong it hurts my brain to look at (seriously, coding style is there for your brain, not because we are crazy picky developers.) Also you forgot a trailing ';' did that even compile? thanks, greg k-h