Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752769AbbBMMAC (ORCPT ); Fri, 13 Feb 2015 07:00:02 -0500 Received: from smtprelay0207.hostedemail.com ([216.40.44.207]:56862 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752362AbbBMMAA (ORCPT ); Fri, 13 Feb 2015 07:00:00 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::,RULES_HIT:41:355:379:541:599:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:1801:2393:2553:2559:2562:2828:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3868:3871:3872:3874:4321:4605:5007:6261:7875:8603:9149:10004:10400:10848:11026:11232:11233:11658:11914:12296:12438:12517:12519:12740:13019:13069:13255:13311:13357:14096:14097:21060:21080,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0 X-HE-Tag: power63_74256b774290f X-Filterd-Recvd-Size: 2777 Message-ID: <1423828796.2795.7.camel@perches.com> Subject: Re: [PATCH 1/2]Trivial patch: to solve indentation warnings in amba-clcd.c driver From: Joe Perches To: Russell King - ARM Linux Cc: Parmeshwr Prasad , plagnioj@jcrosoft.com, tomi.valkeinen@ti.com, trivial@kernel.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Date: Fri, 13 Feb 2015 03:59:56 -0800 In-Reply-To: <20150213113515.GW8656@n2100.arm.linux.org.uk> References: <20150213112125.GA25078@linuxteamdev.amer.dell.com> <20150213113515.GW8656@n2100.arm.linux.org.uk> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.12.7-0ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1976 Lines: 51 On Fri, 2015-02-13 at 11:35 +0000, Russell King - ARM Linux wrote: > On Fri, Feb 13, 2015 at 06:21:33AM -0500, Parmeshwr Prasad wrote: > > @@ -288,7 +288,7 @@ static int clcdfb_set_par(struct fb_info *info) > > struct clcd_regs regs; > > > > fb->fb.fix.line_length = fb->fb.var.xres_virtual * > > - fb->fb.var.bits_per_pixel / 8; > > + fb->fb.var.bits_per_pixel / 8; > > NAK on this one. The code as it stood before is much clearer since > we align the expression with the start of it on the preceding line. I agree with all of what Russell wrote, but maybe this; > > @@ -717,7 +716,9 @@ static int clcdfb_of_vram_setup(struct clcd_fb *fb) > > return -ENOMEM; > > > > fb->fb.fix.smem_start = of_translate_address(memory, > > - of_get_address(memory, 0, &size, NULL)); > > + of_get_address(memory, 0, > > + &size, > > + NULL)); > > Thi sis the exception to the rule - where scrunching an expression so that > it takes multiple lines because of lack of right-hand space is not on. > The former version was a lot better. Perhaps this could be better as: fb->fb.fix.smem_start = of_translate_address(memory, of_get_address(memory, 0, &size, NULL)); But sometimes using multiple statements instead of embedding function calls as arguments can be simpler and more intelligible for the reader. __be32 addr; ... addr = of_get_address(memory, 0, &size, NULL); fb->fb.fix.smem_start = of_translate_address(memory, addr); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/