[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aQMXW40RKiKJ78Ks@smile.fi.intel.com>
Date: Thu, 30 Oct 2025 09:44:27 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Feng Tang <feng.tang@...ux.alibaba.com>
Cc: linux-kernel@...r.kernel.org, Andrew Morton <akpm@...ux-foundation.org>,
	Petr Mladek <pmladek@...e.com>
Subject: Re: [PATCH v2 6/6] panic: sys_info: Factor out read and write
 handlers
On Thu, Oct 30, 2025 at 10:06:14AM +0800, Feng Tang wrote:
> On Wed, Oct 29, 2025 at 12:07:41PM +0100, Andy Shevchenko wrote:
> > For the sake of the code readability and easier maintenance
> > factor out read and write sys_info handlers.
...
> As the if and else block each has only round 10 lines of code, and fit a
> screen well, I'm not sure whether adding 2 new functions will improve
> readabilty, but I'm fine with the change.
It increases readability and understanding as, for example, one don't need to
check what "write" is when giving as a parameter, Also if you noticed one of my
patch actually made it short by a few lines. So, better to compare the before
_the series_ and after. And even so, the size is not often the main metric for
the readability. I made this patch as I obviously see the benefit of it.
P.S. Thanks for your review!
-- 
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists
 
