Re: [PATCH] kernel/params.c: print failure information instead of 'KOBJ_ADD' to user space, when sysfs_create_file() fails.

2013-07-11 Thread Chen Gang
On 07/10/2013 11:01 AM, Chen Gang F T wrote: > >> > Hmm..., do we need call kobject_get() before kobject_put() in failure >> > processing block ? >> > > Oh, sorry for what I said for kobject_get/put() items above, it is > incorrect. > > What about the diff below for kobject_get() ? > >

Re: [PATCH] kernel/params.c: print failure information instead of 'KOBJ_ADD' to user space, when sysfs_create_file() fails.

2013-07-11 Thread Chen Gang
On 07/10/2013 11:01 AM, Chen Gang F T wrote: Hmm..., do we need call kobject_get() before kobject_put() in failure processing block ? Oh, sorry for what I said for kobject_get/put() items above, it is incorrect. What about the diff below for kobject_get() ?

Re: [PATCH] kernel/params.c: print failure information instead of 'KOBJ_ADD' to user space, when sysfs_create_file() fails.

2013-07-10 Thread Chen Gang
On 07/11/2013 09:53 AM, Rusty Russell wrote: > Chen Gang F T writes: >> > On 07/09/2013 04:07 PM, Rusty Russell wrote: >>> >> Chen Gang writes: >>> When sysfs_create_file() fails, recommend to print the related failure >>> information. And it is useless to still 'KOBJ_ADD' to user

Re: [PATCH] kernel/params.c: print failure information instead of 'KOBJ_ADD' to user space, when sysfs_create_file() fails.

2013-07-10 Thread Rusty Russell
Chen Gang F T writes: > On 07/09/2013 04:07 PM, Rusty Russell wrote: >> Chen Gang writes: >>> When sysfs_create_file() fails, recommend to print the related failure >>> information. And it is useless to still 'KOBJ_ADD' to user space. >>> >>> Signed-off-by: Chen Gang >> >> sysfs_create_file()

Re: [PATCH] kernel/params.c: print failure information instead of 'KOBJ_ADD' to user space, when sysfs_create_file() fails.

2013-07-10 Thread Rusty Russell
Chen Gang F T chen.gang.flying.transfor...@gmail.com writes: On 07/09/2013 04:07 PM, Rusty Russell wrote: Chen Gang gang.c...@asianux.com writes: When sysfs_create_file() fails, recommend to print the related failure information. And it is useless to still 'KOBJ_ADD' to user space.

Re: [PATCH] kernel/params.c: print failure information instead of 'KOBJ_ADD' to user space, when sysfs_create_file() fails.

2013-07-10 Thread Chen Gang
On 07/11/2013 09:53 AM, Rusty Russell wrote: Chen Gang F T chen.gang.flying.transfor...@gmail.com writes: On 07/09/2013 04:07 PM, Rusty Russell wrote: Chen Gang gang.c...@asianux.com writes: When sysfs_create_file() fails, recommend to print the related failure information. And it is

Re: [PATCH] kernel/params.c: print failure information instead of 'KOBJ_ADD' to user space, when sysfs_create_file() fails.

2013-07-09 Thread Chen Gang F T
On 07/10/2013 10:35 AM, Chen Gang wrote: > On 07/10/2013 10:17 AM, Chen Gang F T wrote: >> On 07/09/2013 04:07 PM, Rusty Russell wrote: >>> Chen Gang writes: When sysfs_create_file() fails, recommend to print the related failure information. And it is useless to still 'KOBJ_ADD' to user

Re: [PATCH] kernel/params.c: print failure information instead of 'KOBJ_ADD' to user space, when sysfs_create_file() fails.

2013-07-09 Thread Chen Gang
On 07/10/2013 10:17 AM, Chen Gang F T wrote: > On 07/09/2013 04:07 PM, Rusty Russell wrote: >> Chen Gang writes: >>> When sysfs_create_file() fails, recommend to print the related failure >>> information. And it is useless to still 'KOBJ_ADD' to user space. >>> >>> Signed-off-by: Chen Gang >> >>

Re: [PATCH] kernel/params.c: print failure information instead of 'KOBJ_ADD' to user space, when sysfs_create_file() fails.

2013-07-09 Thread Chen Gang F T
On 07/09/2013 04:07 PM, Rusty Russell wrote: > Chen Gang writes: >> When sysfs_create_file() fails, recommend to print the related failure >> information. And it is useless to still 'KOBJ_ADD' to user space. >> >> Signed-off-by: Chen Gang > > sysfs_create_file() should not fail during boot,

Re: [PATCH] kernel/params.c: print failure information instead of 'KOBJ_ADD' to user space, when sysfs_create_file() fails.

2013-07-09 Thread Rusty Russell
Chen Gang writes: > When sysfs_create_file() fails, recommend to print the related failure > information. And it is useless to still 'KOBJ_ADD' to user space. > > Signed-off-by: Chen Gang sysfs_create_file() should not fail during boot, should it? Cheers, Rusty. > --- > kernel/params.c |

Re: [PATCH] kernel/params.c: print failure information instead of 'KOBJ_ADD' to user space, when sysfs_create_file() fails.

2013-07-09 Thread Rusty Russell
Chen Gang gang.c...@asianux.com writes: When sysfs_create_file() fails, recommend to print the related failure information. And it is useless to still 'KOBJ_ADD' to user space. Signed-off-by: Chen Gang gang.c...@asianux.com sysfs_create_file() should not fail during boot, should it? Cheers,

Re: [PATCH] kernel/params.c: print failure information instead of 'KOBJ_ADD' to user space, when sysfs_create_file() fails.

2013-07-09 Thread Chen Gang F T
On 07/09/2013 04:07 PM, Rusty Russell wrote: Chen Gang gang.c...@asianux.com writes: When sysfs_create_file() fails, recommend to print the related failure information. And it is useless to still 'KOBJ_ADD' to user space. Signed-off-by: Chen Gang gang.c...@asianux.com sysfs_create_file()

Re: [PATCH] kernel/params.c: print failure information instead of 'KOBJ_ADD' to user space, when sysfs_create_file() fails.

2013-07-09 Thread Chen Gang
On 07/10/2013 10:17 AM, Chen Gang F T wrote: On 07/09/2013 04:07 PM, Rusty Russell wrote: Chen Gang gang.c...@asianux.com writes: When sysfs_create_file() fails, recommend to print the related failure information. And it is useless to still 'KOBJ_ADD' to user space. Signed-off-by: Chen Gang

Re: [PATCH] kernel/params.c: print failure information instead of 'KOBJ_ADD' to user space, when sysfs_create_file() fails.

2013-07-09 Thread Chen Gang F T
On 07/10/2013 10:35 AM, Chen Gang wrote: On 07/10/2013 10:17 AM, Chen Gang F T wrote: On 07/09/2013 04:07 PM, Rusty Russell wrote: Chen Gang gang.c...@asianux.com writes: When sysfs_create_file() fails, recommend to print the related failure information. And it is useless to still 'KOBJ_ADD'

[PATCH] kernel/params.c: print failure information instead of 'KOBJ_ADD' to user space, when sysfs_create_file() fails.

2013-07-08 Thread Chen Gang
When sysfs_create_file() fails, recommend to print the related failure information. And it is useless to still 'KOBJ_ADD' to user space. Signed-off-by: Chen Gang --- kernel/params.c |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/kernel/params.c b/kernel/params.c

[PATCH] kernel/params.c: print failure information instead of 'KOBJ_ADD' to user space, when sysfs_create_file() fails.

2013-07-08 Thread Chen Gang
When sysfs_create_file() fails, recommend to print the related failure information. And it is useless to still 'KOBJ_ADD' to user space. Signed-off-by: Chen Gang gang.c...@asianux.com --- kernel/params.c |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git