linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: SeongJae Park <sj@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: SeongJae Park <sj@kernel.org>, Xin Hao <xhao@linux.alibaba.com>,
	damon@lists.linux.dev, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/damon/sysfs: change few functions execute order
Date: Thu,  8 Sep 2022 22:16:53 +0000	[thread overview]
Message-ID: <20220908221653.131120-1-sj@kernel.org> (raw)
In-Reply-To: <20220908151042.239189ddb1635c0f598c6fd2@linux-foundation.org>

On Thu, 8 Sep 2022 15:10:42 -0700 Andrew Morton <akpm@linux-foundation.org> wrote:

> On Thu,  8 Sep 2022 18:49:47 +0000 SeongJae Park <sj@kernel.org> wrote:
> 
> > Hi Xin,
> > 
> > On Thu, 8 Sep 2022 16:19:32 +0800 Xin Hao <xhao@linux.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@kernel.org>


Thanks,
SJ


  reply	other threads:[~2022-09-08 22:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-08  8:19 Xin Hao
2022-09-08 18:49 ` SeongJae Park
2022-09-08 22:10   ` Andrew Morton
2022-09-08 22:16     ` SeongJae Park [this message]
2022-09-09 22:44       ` Andrew Morton
2022-09-09 23:00         ` SeongJae Park
2022-09-10  1:04         ` haoxin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220908221653.131120-1-sj@kernel.org \
    --to=sj@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=damon@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=xhao@linux.alibaba.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox