Re: [PATCH] mm: compaction.c: Propagate return value upstream

2019-01-02 Thread Mel Gorman
On Wed, Dec 26, 2018 at 07:50:29PM -0800, Matthew Wilcox wrote: > On Wed, Dec 26, 2018 at 01:42:56PM -0600, Aditya Pakki wrote: > > In sysctl_extfrag_handler(), proc_dointvec_minmax() can return an > > error. The fix propagates the error upstream in case of failure. > > Why not just ... > > Mel,

Re: [PATCH] mm: compaction.c: Propagate return value upstream

2018-12-27 Thread Randy Dunlap
On 12/26/18 7:50 PM, Matthew Wilcox wrote: > On Wed, Dec 26, 2018 at 01:42:56PM -0600, Aditya Pakki wrote: >> In sysctl_extfrag_handler(), proc_dointvec_minmax() can return an >> error. The fix propagates the error upstream in case of failure. > > Why not just ... Yes, this change (below) makes s

Re: [PATCH] mm: compaction.c: Propagate return value upstream

2018-12-26 Thread Matthew Wilcox
On Wed, Dec 26, 2018 at 01:42:56PM -0600, Aditya Pakki wrote: > In sysctl_extfrag_handler(), proc_dointvec_minmax() can return an > error. The fix propagates the error upstream in case of failure. Why not just ... Mel, Randy? You seem to have been the prime instigators on this. diff --git a/inc

[PATCH] mm: compaction.c: Propagate return value upstream

2018-12-26 Thread Aditya Pakki
In sysctl_extfrag_handler(), proc_dointvec_minmax() can return an error. The fix propagates the error upstream in case of failure. Signed-off-by: Aditya Pakki --- mm/compaction.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mm/compaction.c b/mm/compaction.c index 7c6074

Re: [PATCH] mm: compaction.c: Propagate return value upstream

2018-12-26 Thread Matthew Wilcox
On Wed, Dec 26, 2018 at 01:07:49PM -0600, Aditya Pakki wrote: > { > + return > proc_dointvec_minmax(table, write, buffer, length, ppos); > - > - return 0; Don't do this. If you're going to return something, it should be on the same line as the return statement. ie: + return

[PATCH] mm: compaction.c: Propagate return value upstream

2018-12-26 Thread Aditya Pakki
In sysctl_extfrag_handler(), proc_dointvec_minmax() can return an error. The fix propagates the error upstream in case of failure. Signed-off-by: Aditya Pakki --- mm/compaction.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mm/compaction.c b/mm/compaction.c index 7c60747