From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751385AbdAQKBT (ORCPT ); Tue, 17 Jan 2017 05:01:19 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:42358 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751064AbdAQKBR (ORCPT ); Tue, 17 Jan 2017 05:01:17 -0500 Date: Tue, 17 Jan 2017 13:00:36 +0300 From: Dan Carpenter To: Joe Perches Cc: Dhananjay Balan , Stuart Yoder , Greg Kroah-Hartman , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: fsl-mc: fix coding stye errors Message-ID: <20170117095818.GH4104@mwanda> References: <20170117081128.wrmdicglnwifu2mi@gaia> <20170117082708.GC4051@mwanda> <1484642850.9538.7.camel@perches.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1484642850.9538.7.camel@perches.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 17, 2017 at 12:47:30AM -0800, Joe Perches wrote: > On Tue, 2017-01-17 at 11:27 +0300, Dan Carpenter wrote: > > On Tue, Jan 17, 2017 at 09:11:28AM +0100, Dhananjay Balan wrote: > > > Split line at boolean operator. > > > > > > Error was reported by checkpatch.pl as > > > WARNING: Avoid multiple line dereference - prefer 'mc_msi_domain->host_data' > [] > > > diff --git a/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c b/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c > [] > > > @@ -94,8 +94,8 @@ int __init its_fsl_mc_msi_init(void) > > > continue; > > > } > > > > > > - WARN_ON(mc_msi_domain-> > > > - host_data != &its_fsl_mc_msi_domain_info); > > > + WARN_ON(mc_msi_domain->host_data != > > > + &its_fsl_mc_msi_domain_info); > > > > Better to line it up like this: > > > > WARN_ON(mc_msi_domain->host_data != > > &its_fsl_mc_msi_domain_info); > > At 81 chars, it might be better on a single line instead. > Yeah. Except you can't fight checkpatch.pl... In the long run it will just wear you down for no good reason. > WARN_ON(mc_msi_domain->host_data != &its_fsl_mc_msi_domain_info); > > It also might be better to shorten some of the identifiers. Yeah. Shorter names are a great idea. This driver went a bit crazy with all the prefixes. It's a static variable. regards, dan carpenter