Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1186054 > unrolled thread

[PATCH] Security.c: fix 3 coding style indentation errors

Started byAhmed Mohamed Abd EL Mawgood <ahmedsoliman0x666@gmail.com>
First post2015-07-16 18:30 +0200
Last post2015-07-16 20:40 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] Security.c: fix 3 coding style indentation errors Ahmed Mohamed Abd EL Mawgood <ahmedsoliman0x666@gmail.com> - 2015-07-16 18:30 +0200
    Re: [PATCH] Security.c: fix 3 coding style indentation errors Joe Perches <joe@perches.com> - 2015-07-16 20:40 +0200

#1186054 — [PATCH] Security.c: fix 3 coding style indentation errors

FromAhmed Mohamed Abd EL Mawgood <ahmedsoliman0x666@gmail.com>
Date2015-07-16 18:30 +0200
Subject[PATCH] Security.c: fix 3 coding style indentation errors
Message-ID<pMUcO-3Ap-13@gated-at.bofh.it>
From 34330e77b9dfec43e65de069e83ca41cc145ed07 Mon Sep 17 00:00:00 2001
From: ahmed <ahmedsoliman0x666@gmail.com>
Date: Thu, 16 Jul 2015 17:12:52 +0200
Subject: [PATCH] Security.c: fix 3 coding style indentation errors

This is my first patch to get my hand dirty
3 simple indentation errors fixing withen security/security.c
Signed-off-by: Ahmed Mohamed <ahmedsoliman0x666@gmail.com>
---
 security/security.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/security/security.c b/security/security.c
index 595fffa..99c2d3b 100644
--- a/security/security.c
+++ b/security/security.c
@@ -308,7 +308,7 @@ int security_sb_statfs(struct dentry *dentry)
 }
 
 int security_sb_mount(const char *dev_name, struct path *path,
-                       const char *type, unsigned long flags, void *data)
+			const char *type, unsigned long flags, void *data)
 {
 	return call_int_hook(sb_mount, 0, dev_name, path, type, flags, data);
 }
@@ -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;
 
 	if (flags & RENAME_EXCHANGE) {
-- 
1.9.1



--
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/

[toc] | [next] | [standalone]


#1186185

FromJoe Perches <joe@perches.com>
Date2015-07-16 20:40 +0200
Message-ID<pMWeC-6sH-9@gated-at.bofh.it>
In reply to#1186054
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.


--
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/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web