Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754604AbbHCTJ0 (ORCPT ); Mon, 3 Aug 2015 15:09:26 -0400 Received: from smtprelay0099.hostedemail.com ([216.40.44.99]:37977 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754342AbbHCTJY (ORCPT ); Mon, 3 Aug 2015 15:09:24 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::,RULES_HIT:41:355:379:421:541:599:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2693:2828:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3868:3870:3871:3872:3873:3874:4250:4321:4823:5007:6119:6261:7903:8957:10004:10400:10450:10455:10848:11232:11658:11914:12050:12517:12519:12679:12740:13069:13161:13163:13229:13311:13357:14040:14096:14097:19904:19999: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: drum63_8bfda31c57525 X-Filterd-Recvd-Size: 2547 Message-ID: <1438628961.4601.2.camel@perches.com> Subject: Re: [PATCH] sata_sx4: Check return code from pdc20621_i2c_read() From: Joe Perches To: Tomer Barletz , Sergei Shtylyov Cc: tj@kernel.org, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org Date: Mon, 03 Aug 2015 12:09:21 -0700 In-Reply-To: References: <55BF8E29.6000200@cogentembedded.com> <1438627595-17126-1-git-send-email-barletz@gmail.com> <55BFB87C.1010405@cogentembedded.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.16.3-1ubuntu1 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: 1717 Lines: 39 On Mon, 2015-08-03 at 12:04 -0700, Tomer Barletz wrote: > I see how it makes sense to add a tab to align with the previous line > of code, as it will always look similar in all editors, no matter how > their tab character is set up to be. > However, adding more tabs will just mess up editors that are not set > up with 8-space width tabs. > > Is this a bug in checkpatch.pl, or are we saying everyone should have > their editor set to 8-spaces width tabs? from Documentation/CodingStyle: Chapter 1: Indentation Tabs are 8 characters, and thus indentations are also 8 characters. There are heretic movements that try to make indentations 4 (or even 2!) characters deep, and that is akin to trying to define the value of PI to be 3. Rationale: The whole idea behind indentation is to clearly define where a block of control starts and ends. Especially when you've been looking at your screen for 20 straight hours, you'll find it a lot easier to see how the indentation works if you have large indentations. Now, some people will claim that having 8-character indentations makes the code move too far to the right, and makes it hard to read on a 80-character terminal screen. The answer to that is that if you need more than 3 levels of indentation, you're screwed anyway, and should fix your program. In short, 8-char indents make things easier to read, and have the added benefit of warning you when you're nesting your functions too deep. Heed that warning. -- 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/