Re: [PATCH] kernel/sysctl_binary.c: improve the usage of return value 'result'

2013-08-07 Thread Chen Gang
On 08/08/2013 02:38 AM, Eric W. Biederman wrote: > Chen Gang writes: > >> Firstly, sorry for replying late, and also thank you for your detail >> patient reply. >> >> On 08/07/2013 03:45 PM, Eric W. Biederman wrote: >>> Chen Gang writes: >>> On 08/07/2013 05:46 AM, Eric W. Biederman wrote:

Re: [PATCH] kernel/sysctl_binary.c: improve the usage of return value 'result'

2013-08-07 Thread Eric W. Biederman
Chen Gang writes: > Firstly, sorry for replying late, and also thank you for your detail > patient reply. > > On 08/07/2013 03:45 PM, Eric W. Biederman wrote: >> Chen Gang writes: >> >>> On 08/07/2013 05:46 AM, Eric W. Biederman wrote: Chen Gang writes: Have you tested this code

Re: [PATCH] kernel/sysctl_binary.c: improve the usage of return value 'result'

2013-08-07 Thread Chen Gang
Firstly, sorry for replying late, and also thank you for your detail patient reply. On 08/07/2013 03:45 PM, Eric W. Biederman wrote: > Chen Gang writes: > >> On 08/07/2013 05:46 AM, Eric W. Biederman wrote: >>> Chen Gang writes: >>> >>> Have you tested this code? Do you have anything that act

Re: [PATCH] kernel/sysctl_binary.c: improve the usage of return value 'result'

2013-08-07 Thread Chen Gang
On 08/07/2013 04:44 PM, Li Zefan wrote: >>> The first one is, if you get a reply from a maintainer (especially a top >>> maintainer), try harder to understand/learn from that reply, but don't >>> keep asking why and don't keep arguing without much thinking. I think >>> what's why sometimes people a

Re: [PATCH] kernel/sysctl_binary.c: improve the usage of return value 'result'

2013-08-07 Thread Li Zefan
>> The first one is, if you get a reply from a maintainer (especially a top >> maintainer), try harder to understand/learn from that reply, but don't >> keep asking why and don't keep arguing without much thinking. I think >> what's why sometimes people are annoyed in the discussion with you. >> >

Re: [PATCH] kernel/sysctl_binary.c: improve the usage of return value 'result'

2013-08-07 Thread Chen Gang
On 08/07/2013 03:02 PM, Li Zefan wrote: >>> To be honest... >>> >>> You are too bad in english to do kernel development. You don't seem to >>> know how to communicate in english... >>> >> >> So I should improve my English, and now I am just trying improving. >> >> At least, it is not an excuse to l

Re: [PATCH] kernel/sysctl_binary.c: improve the usage of return value 'result'

2013-08-07 Thread Eric W. Biederman
Chen Gang writes: > On 08/07/2013 05:46 AM, Eric W. Biederman wrote: >> Chen Gang writes: >> >> Have you tested this code? Do you have anything that actually the >> uses sysctl binary interface? >> > > No, I only compile about it, not give a test. It is really better to > give a test, but it

Re: [PATCH] kernel/sysctl_binary.c: improve the usage of return value 'result'

2013-08-07 Thread Li Zefan
>> To be honest... >> >> You are too bad in english to do kernel development. You don't seem to >> know how to communicate in english... >> > > So I should improve my English, and now I am just trying improving. > > At least, it is not an excuse to leave upstream kernel development, is > it right

Re: [PATCH] kernel/sysctl_binary.c: improve the usage of return value 'result'

2013-08-06 Thread Chen Gang
On 08/07/2013 02:42 PM, Li Zefan wrote: > On 2013/8/7 14:10, Joe Perches wrote: >> On Wed, 2013-08-07 at 13:56 +0800, Li Zefan wrote: > The right answer to the code is to config it out and then you don't have > to worry about it one way or another. >> [] Hmm... do you mean you spend 5

Re: [PATCH] kernel/sysctl_binary.c: improve the usage of return value 'result'

2013-08-06 Thread Li Zefan
On 2013/8/7 14:10, Joe Perches wrote: > On Wed, 2013-08-07 at 13:56 +0800, Li Zefan wrote: The right answer to the code is to config it out and then you don't have to worry about it one way or another. > [] >>> Hmm... do you mean you spend 5 minutes to get a conclusion ? if so, >>> better

Re: [PATCH] kernel/sysctl_binary.c: improve the usage of return value 'result'

2013-08-06 Thread Li Zefan
On 2013/8/7 14:10, Joe Perches wrote: > On Wed, 2013-08-07 at 13:56 +0800, Li Zefan wrote: The right answer to the code is to config it out and then you don't have to worry about it one way or another. > [] >>> Hmm... do you mean you spend 5 minutes to get a conclusion ? if so, >>> better

Re: [PATCH] kernel/sysctl_binary.c: improve the usage of return value 'result'

2013-08-06 Thread Chen Gang
On 08/07/2013 02:29 PM, Andrew Morton wrote: > On Wed, 07 Aug 2013 14:24:05 +0800 Chen Gang wrote: > >>> To be honest... >>> >>> You are too bad in english to do kernel development. You don't seem to >>> know how to communicate in english... >>> >> >> So I should improve my English, and now I am

Re: [PATCH] kernel/sysctl_binary.c: improve the usage of return value 'result'

2013-08-06 Thread Andrew Morton
On Wed, 07 Aug 2013 14:24:05 +0800 Chen Gang wrote: > > To be honest... > > > > You are too bad in english to do kernel development. You don't seem to > > know how to communicate in english... > > > > So I should improve my English, and now I am just trying improving. > > At least, it is not

Re: [PATCH] kernel/sysctl_binary.c: improve the usage of return value 'result'

2013-08-06 Thread Chen Gang
On 08/07/2013 02:10 PM, Joe Perches wrote: > On Wed, 2013-08-07 at 13:56 +0800, Li Zefan wrote: The right answer to the code is to config it out and then you don't have to worry about it one way or another. > [] >>> Hmm... do you mean you spend 5 minutes to get a conclusion ? if so, >>> b

Re: [PATCH] kernel/sysctl_binary.c: improve the usage of return value 'result'

2013-08-06 Thread Chen Gang
On 08/07/2013 01:56 PM, Li Zefan wrote: >>> The right answer to the code is to config it out and then you don't have >>> to worry about it one way or another. >>> >> >> Pardon? >> >> Excuse me, my English is not quite well, I don't quite understand your >> meaning, could you please repeat again in

Re: [PATCH] kernel/sysctl_binary.c: improve the usage of return value 'result'

2013-08-06 Thread Joe Perches
On Wed, 2013-08-07 at 13:56 +0800, Li Zefan wrote: > >> The right answer to the code is to config it out and then you don't have > >> to worry about it one way or another. [] > > Hmm... do you mean you spend 5 minutes to get a conclusion ? if so, > > better not use word 'seems' which is not a suita

Re: [PATCH] kernel/sysctl_binary.c: improve the usage of return value 'result'

2013-08-06 Thread Li Zefan
>> The right answer to the code is to config it out and then you don't have >> to worry about it one way or another. >> > > Pardon? > > Excuse me, my English is not quite well, I don't quite understand your > meaning, could you please repeat again in details or say more clearly ? > > >> The sys

Re: [PATCH] kernel/sysctl_binary.c: improve the usage of return value 'result'

2013-08-06 Thread Chen Gang F T
On 08/07/2013 06:13 AM, Eric W. Biederman wrote: > Andrew Morton writes: > >> On Tue, 06 Aug 2013 15:29:42 +0800 Chen Gang wrote: >> >>> Improve the usage of return value 'result', so not only can make code >>> clearer to readers, but also can improve the performance. >> >> It used to be pervasi

Re: [PATCH] kernel/sysctl_binary.c: improve the usage of return value 'result'

2013-08-06 Thread Chen Gang
Thank you for your reply in details, especially you are very busy. My original opinion about optimization is incorrect. Thanks. On 08/07/2013 05:43 AM, Andrew Morton wrote: > On Tue, 06 Aug 2013 15:29:42 +0800 Chen Gang wrote: > >> Improve the usage of return value 'result', so not only can m

Re: [PATCH] kernel/sysctl_binary.c: improve the usage of return value 'result'

2013-08-06 Thread Chen Gang
On 08/07/2013 05:46 AM, Eric W. Biederman wrote: > Chen Gang writes: > > Have you tested this code? Do you have anything that actually the > uses sysctl binary interface? > No, I only compile about it, not give a test. It is really better to give a test, but it seems not quite necessary to mus

Re: [PATCH] kernel/sysctl_binary.c: improve the usage of return value 'result'

2013-08-06 Thread Chen Gang
On 08/07/2013 06:11 AM, Joe Perches wrote: > On Tue, 2013-08-06 at 14:43 -0700, Andrew Morton wrote: >> On Tue, 06 Aug 2013 15:29:42 +0800 Chen Gang wrote: >> >>> Improve the usage of return value 'result', so not only can make code >>> clearer to readers, but also can improve the performance. >>

Re: [PATCH] kernel/sysctl_binary.c: improve the usage of return value 'result'

2013-08-06 Thread Eric W. Biederman
Andrew Morton writes: > On Tue, 06 Aug 2013 15:29:42 +0800 Chen Gang wrote: > >> Improve the usage of return value 'result', so not only can make code >> clearer to readers, but also can improve the performance. > > It used to be pervasive kernel style do to > > ret = -ENOMEM; > foo

Re: [PATCH] kernel/sysctl_binary.c: improve the usage of return value 'result'

2013-08-06 Thread Joe Perches
On Tue, 2013-08-06 at 14:43 -0700, Andrew Morton wrote: > On Tue, 06 Aug 2013 15:29:42 +0800 Chen Gang wrote: > > > Improve the usage of return value 'result', so not only can make code > > clearer to readers, but also can improve the performance. > > It used to be pervasive kernel style do to >

Re: [PATCH] kernel/sysctl_binary.c: improve the usage of return value 'result'

2013-08-06 Thread Eric W. Biederman
Chen Gang writes: Have you tested this code? Do you have anything that actually the uses sysctl binary interface? If you do have code that actually uses this interface please fix it not to use it. This code is fundamentally a stop gap measure and will bit-rot in time and then we will remove it

Re: [PATCH] kernel/sysctl_binary.c: improve the usage of return value 'result'

2013-08-06 Thread Andrew Morton
On Tue, 06 Aug 2013 15:29:42 +0800 Chen Gang wrote: > Improve the usage of return value 'result', so not only can make code > clearer to readers, but also can improve the performance. It used to be pervasive kernel style do to ret = -ENOMEM; foo = alloc(...); if (!foo)