[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220908221653.131120-1-sj@kernel.org>
Date: Thu, 8 Sep 2022 22:16:53 +0000
From: SeongJae Park <sj@...nel.org>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: SeongJae Park <sj@...nel.org>, Xin Hao <xhao@...ux.alibaba.com>,
damon@...ts.linux.dev, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/damon/sysfs: change few functions execute order
On Thu, 8 Sep 2022 15:10:42 -0700 Andrew Morton <akpm@...ux-foundation.org> wrote:
> On Thu, 8 Sep 2022 18:49:47 +0000 SeongJae Park <sj@...nel.org> wrote:
>
> > Hi Xin,
> >
> > On Thu, 8 Sep 2022 16:19:32 +0800 Xin Hao <xhao@...ux.alibaba.com> wrote:
> >
> > > These nr_{schemes,regions,contexts,kdamonds}_store() functions are both call
> >
> > checkpatch complains as below:
> >
> > WARNING: Possible unwrapped commit description (prefer a maximum 75 chars per line)
> > #10:
> > These nr_{schemes,regions,contexts,kdamonds}_store() functions are both call
>
> I fix that sort of thing. A lot ;)
Appreciate your efforts always. If you need any help from my side, please let
me know at any time.
>
> > > kstrtoint() to get relative values from sysfs interface, if it return an
> > > error, there get kobject instance would be meaningless through 'container_of'.
> >
> > I was thinking the compiler could do that kind of optimization on its own, so I
> > preferred to make the code shorter.
>
> Yes, the compiler will do this.
>
> > This change makes the code slightly longer, while the benefit of the change is
> > unclear. I'd like to keep it as is unless we get some clear benefit of this?
>
> I find it a readability improvement. Puts the initialization in a more
> appropriate place and avoids those nasty tricks to prevent unreasonable
> line lengths.
Agreed.
Reviewed-by: SeongJae Park <sj@...nel.org>
Thanks,
SJ
Powered by blists - more mailing lists