From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753449AbbGPSiR (ORCPT ); Thu, 16 Jul 2015 14:38:17 -0400 Received: from smtprelay0106.hostedemail.com ([216.40.44.106]:38938 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751434AbbGPSiP (ORCPT ); Thu, 16 Jul 2015 14:38:15 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::,RULES_HIT:41:355:379: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:2828:2894:3138:3139:3140:3141:3142:3352:3622:3865:3867:3871:4321:4605:5007:6261:7903:8957:10004:10400:10848:11026:11232:11658:11914:12043:12294:12438:12517:12519:12740:13069:13311:13357:14096:14097: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: fog17_81eddd1179c50 X-Filterd-Recvd-Size: 1983 Message-ID: <1437071891.2495.26.camel@perches.com> Subject: Re: [PATCH] Security.c: fix 3 coding style indentation errors From: Joe Perches To: Ahmed Mohamed Abd EL Mawgood Cc: james.l.morris@oracle.com, serge@hallyn.com, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org Date: Thu, 16 Jul 2015 11:38:11 -0700 In-Reply-To: <1437063676.25587.5.camel@My-Computer> References: <1437063676.25587.5.camel@My-Computer> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.12.11-0ubuntu3 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 On Thu, 2015-07-16 at 18:21 +0200, Ahmed Mohamed Abd EL Mawgood wrote: > This is my first patch to get my hand dirty > 3 simple indentation errors fixing withen security/security.c [] > diff --git a/security/security.c b/security/security.c [] > @@ -567,8 +567,8 @@ int security_inode_rename(struct inode *old_dir, struct dentry *old_dentry, > struct inode *new_dir, struct dentry *new_dentry, > unsigned int flags) > { > - if (unlikely(IS_PRIVATE(d_backing_inode(old_dentry)) || > - (d_is_positive(new_dentry) && IS_PRIVATE(d_backing_inode(new_dentry))))) > + if (unlikely(IS_PRIVATE(d_backing_inode(old_dentry)) || > + (d_is_positive(new_dentry) && IS_PRIVATE(d_backing_inode(new_dentry))))) > return 0; See Documentation/CodingStyle, chapter 2: Descendents are "substantially to the right", not aligned to the if Some prefer alignment to open parentheses like: if (unlikely(IS_PRIVATE(d_backing_inode(old_dentry)) || (d_is_positive(new_dentry) && IS_PRIVATE(d_backing_inode(new_dentry))))) Others just want the indentation on a tab stop.