lkml.org 
[lkml]   [2019]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 0/4] PM / core: Introduce some helper for better Code reuse
On Sat 2019-03-16 00:59:24, Yangtao Li wrote:
> This patch set introduces some functions and macros that help reduce
> code duplication.
>
> Yangtao Li (4):
> PM / core: Introduce dpm_async_fn() helper
> PM / core: Introduce DEVICE_SUSPEND_FUNC() helper macro
> PM / core: Introduce ASYNC_RESUME_FUNC() helper macro
> PM / core: Introduce ASYNC_SUSPEND_FUNC() helper macro
>
> drivers/base/power/main.c | 182 ++++++++++++--------------------------
> 1 file changed, 59 insertions(+), 123 deletions(-)

I'm not a big fan. Yes, you got line count down. But no, I do not
think "beauty" of the macros makes it worth it.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2019-03-18 13:20    [W:0.088 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site