* [PATCH] Security: inode: Fix code style issues
@ 2010-04-23 0:37 Chihau Chau
2010-04-23 15:50 ` Randy Dunlap
0 siblings, 1 reply; 5+ messages in thread
From: Chihau Chau @ 2010-04-23 0:37 UTC (permalink / raw)
To: jmorris; +Cc: eparis, viro, linux-security-module, linux-kernel, Chihau Chau
From: Chihau Chau <chihau@gmail.com>
This fixes two code style issues:
- A space required after that close brace '}'
- A space required after that ','
Signed-off-by: Chihau Chau <chihau@gmail.com>
---
security/inode.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/security/inode.c b/security/inode.c
index c3a7938..f875f47 100644
--- a/security/inode.c
+++ b/security/inode.c
@@ -124,7 +124,7 @@ static inline int positive(struct dentry *dentry)
static int fill_super(struct super_block *sb, void *data, int silent)
{
- static struct tree_descr files[] = {{""}};
+ static struct tree_descr files[] = { {""} };
return simple_fill_super(sb, SECURITYFS_MAGIC, files);
}
@@ -208,7 +208,7 @@ struct dentry *securityfs_create_file(const char *name, mode_t mode,
struct dentry *dentry = NULL;
int error;
- pr_debug("securityfs: creating file '%s'\n",name);
+ pr_debug("securityfs: creating file '%s'\n", name);
error = simple_pin_fs(&fs_type, &mount, &mount_count);
if (error) {
--
1.5.6.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] Security: inode: Fix code style issues
2010-04-23 0:37 [PATCH] Security: inode: Fix code style issues Chihau Chau
@ 2010-04-23 15:50 ` Randy Dunlap
2010-04-23 16:10 ` Chihau Chau
0 siblings, 1 reply; 5+ messages in thread
From: Randy Dunlap @ 2010-04-23 15:50 UTC (permalink / raw)
To: Chihau Chau; +Cc: jmorris, eparis, viro, linux-security-module, linux-kernel
On Thu, 22 Apr 2010 20:37:15 -0400 Chihau Chau wrote:
> From: Chihau Chau <chihau@gmail.com>
>
> This fixes two code style issues:
>
> - A space required after that close brace '}'
Why? do we say that somewhere?
>
> - A space required after that ','
>
> Signed-off-by: Chihau Chau <chihau@gmail.com>
> ---
> security/inode.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/security/inode.c b/security/inode.c
> index c3a7938..f875f47 100644
> --- a/security/inode.c
> +++ b/security/inode.c
> @@ -124,7 +124,7 @@ static inline int positive(struct dentry *dentry)
>
> static int fill_super(struct super_block *sb, void *data, int silent)
> {
> - static struct tree_descr files[] = {{""}};
> + static struct tree_descr files[] = { {""} };
>
> return simple_fill_super(sb, SECURITYFS_MAGIC, files);
> }
> @@ -208,7 +208,7 @@ struct dentry *securityfs_create_file(const char *name, mode_t mode,
> struct dentry *dentry = NULL;
> int error;
>
> - pr_debug("securityfs: creating file '%s'\n",name);
> + pr_debug("securityfs: creating file '%s'\n", name);
>
> error = simple_pin_fs(&fs_type, &mount, &mount_count);
> if (error) {
> --
> 1.5.6.3
>
> --
> 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/
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Security: inode: Fix code style issues
2010-04-23 15:50 ` Randy Dunlap
@ 2010-04-23 16:10 ` Chihau Chau
2010-04-23 16:35 ` Randy Dunlap
0 siblings, 1 reply; 5+ messages in thread
From: Chihau Chau @ 2010-04-23 16:10 UTC (permalink / raw)
To: Randy Dunlap; +Cc: jmorris, eparis, viro, linux-security-module, linux-kernel
Hi Randy,
2010/4/23 Randy Dunlap <randy.dunlap@oracle.com>:
> On Thu, 22 Apr 2010 20:37:15 -0400 Chihau Chau wrote:
>
>> From: Chihau Chau <chihau@gmail.com>
>>
>> This fixes two code style issues:
>>
>> - A space required after that close brace '}'
>
> Why? do we say that somewhere?
>
I was used the checkpatch.pl script written by Dave Jones, Joel Schopp
and Andy Whitcroft.
>
>>
>> - A space required after that ','
>>
>> Signed-off-by: Chihau Chau <chihau@gmail.com>
>> ---
>> security/inode.c | 4 ++--
>> 1 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/security/inode.c b/security/inode.c
>> index c3a7938..f875f47 100644
>> --- a/security/inode.c
>> +++ b/security/inode.c
>> @@ -124,7 +124,7 @@ static inline int positive(struct dentry *dentry)
>>
>> static int fill_super(struct super_block *sb, void *data, int silent)
>> {
>> - static struct tree_descr files[] = {{""}};
>> + static struct tree_descr files[] = { {""} };
>>
>> return simple_fill_super(sb, SECURITYFS_MAGIC, files);
>> }
>> @@ -208,7 +208,7 @@ struct dentry *securityfs_create_file(const char *name, mode_t mode,
>> struct dentry *dentry = NULL;
>> int error;
>>
>> - pr_debug("securityfs: creating file '%s'\n",name);
>> + pr_debug("securityfs: creating file '%s'\n", name);
>>
>> error = simple_pin_fs(&fs_type, &mount, &mount_count);
>> if (error) {
>> --
>> 1.5.6.3
>>
>> --
>> 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/
>
>
> ---
> ~Randy
> *** Remember to use Documentation/SubmitChecklist when testing your code ***
>
--
Chihau Chau
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Security: inode: Fix code style issues
2010-04-23 16:10 ` Chihau Chau
@ 2010-04-23 16:35 ` Randy Dunlap
2010-04-23 18:31 ` Chihau Chau
0 siblings, 1 reply; 5+ messages in thread
From: Randy Dunlap @ 2010-04-23 16:35 UTC (permalink / raw)
To: Chihau Chau; +Cc: jmorris, eparis, viro, linux-security-module, linux-kernel
On 04/23/10 09:10, Chihau Chau wrote:
> Hi Randy,
>
> 2010/4/23 Randy Dunlap <randy.dunlap@oracle.com>:
>> On Thu, 22 Apr 2010 20:37:15 -0400 Chihau Chau wrote:
>>
>>> From: Chihau Chau <chihau@gmail.com>
>>>
>>> This fixes two code style issues:
>>>
>>> - A space required after that close brace '}'
>>
>> Why? do we say that somewhere?
>>
>
> I was used the checkpatch.pl script written by Dave Jones, Joel Schopp
> and Andy Whitcroft.
OK, thanks for the explanation.
That would be correct for something like:
if (foo_bar) {
do_this();
do_that();
} else {
pr_err("fatal error");
panic("help");
}
but I don't think that it's needed for nested data structures.
>>
>>>
>>> - A space required after that ','
>>>
>>> Signed-off-by: Chihau Chau <chihau@gmail.com>
>>> ---
>>> security/inode.c | 4 ++--
>>> 1 files changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/security/inode.c b/security/inode.c
>>> index c3a7938..f875f47 100644
>>> --- a/security/inode.c
>>> +++ b/security/inode.c
>>> @@ -124,7 +124,7 @@ static inline int positive(struct dentry *dentry)
>>>
>>> static int fill_super(struct super_block *sb, void *data, int silent)
>>> {
>>> - static struct tree_descr files[] = {{""}};
>>> + static struct tree_descr files[] = { {""} };
>>>
>>> return simple_fill_super(sb, SECURITYFS_MAGIC, files);
>>> }
>>> @@ -208,7 +208,7 @@ struct dentry *securityfs_create_file(const char *name, mode_t mode,
>>> struct dentry *dentry = NULL;
>>> int error;
>>>
>>> - pr_debug("securityfs: creating file '%s'\n",name);
>>> + pr_debug("securityfs: creating file '%s'\n", name);
>>>
>>> error = simple_pin_fs(&fs_type, &mount, &mount_count);
>>> if (error) {
>>> --
>>> 1.5.6.3
>>>
>>> --
>>> 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/
>>
>>
>> ---
>> ~Randy
>> *** Remember to use Documentation/SubmitChecklist when testing your code ***
>>
>
>
>
--
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Security: inode: Fix code style issues
2010-04-23 16:35 ` Randy Dunlap
@ 2010-04-23 18:31 ` Chihau Chau
0 siblings, 0 replies; 5+ messages in thread
From: Chihau Chau @ 2010-04-23 18:31 UTC (permalink / raw)
To: Randy Dunlap; +Cc: jmorris, eparis, viro, linux-security-module, linux-kernel
Ok
2010/4/23 Randy Dunlap <randy.dunlap@oracle.com>:
> On 04/23/10 09:10, Chihau Chau wrote:
>> Hi Randy,
>>
>> 2010/4/23 Randy Dunlap <randy.dunlap@oracle.com>:
>>> On Thu, 22 Apr 2010 20:37:15 -0400 Chihau Chau wrote:
>>>
>>>> From: Chihau Chau <chihau@gmail.com>
>>>>
>>>> This fixes two code style issues:
>>>>
>>>> - A space required after that close brace '}'
>>>
>>> Why? do we say that somewhere?
>>>
>>
>> I was used the checkpatch.pl script written by Dave Jones, Joel Schopp
>> and Andy Whitcroft.
>
> OK, thanks for the explanation.
> That would be correct for something like:
>
> if (foo_bar) {
> do_this();
> do_that();
> } else {
> pr_err("fatal error");
> panic("help");
> }
>
> but I don't think that it's needed for nested data structures.
>
>
>>>
>>>>
>>>> - A space required after that ','
>>>>
>>>> Signed-off-by: Chihau Chau <chihau@gmail.com>
>>>> ---
>>>> security/inode.c | 4 ++--
>>>> 1 files changed, 2 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/security/inode.c b/security/inode.c
>>>> index c3a7938..f875f47 100644
>>>> --- a/security/inode.c
>>>> +++ b/security/inode.c
>>>> @@ -124,7 +124,7 @@ static inline int positive(struct dentry *dentry)
>>>>
>>>> static int fill_super(struct super_block *sb, void *data, int silent)
>>>> {
>>>> - static struct tree_descr files[] = {{""}};
>>>> + static struct tree_descr files[] = { {""} };
>>>>
>>>> return simple_fill_super(sb, SECURITYFS_MAGIC, files);
>>>> }
>>>> @@ -208,7 +208,7 @@ struct dentry *securityfs_create_file(const char *name, mode_t mode,
>>>> struct dentry *dentry = NULL;
>>>> int error;
>>>>
>>>> - pr_debug("securityfs: creating file '%s'\n",name);
>>>> + pr_debug("securityfs: creating file '%s'\n", name);
>>>>
>>>> error = simple_pin_fs(&fs_type, &mount, &mount_count);
>>>> if (error) {
>>>> --
>>>> 1.5.6.3
>>>>
>>>> --
>>>> 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/
>>>
>>>
>>> ---
>>> ~Randy
>>> *** Remember to use Documentation/SubmitChecklist when testing your code ***
>>>
>>
>>
>>
>
>
> --
> ~Randy
> *** Remember to use Documentation/SubmitChecklist when testing your code ***
>
--
Chihau Chau
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-04-23 18:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-23 0:37 [PATCH] Security: inode: Fix code style issues Chihau Chau
2010-04-23 15:50 ` Randy Dunlap
2010-04-23 16:10 ` Chihau Chau
2010-04-23 16:35 ` Randy Dunlap
2010-04-23 18:31 ` Chihau Chau
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox