From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757286AbbJVLeF (ORCPT ); Thu, 22 Oct 2015 07:34:05 -0400 Received: from mga01.intel.com ([192.55.52.88]:43861 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756615AbbJVLeE (ORCPT ); Thu, 22 Oct 2015 07:34:04 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,181,1444719600"; d="scan'208";a="816925779" Message-ID: <1445513639.22669.46.camel@linux.intel.com> Subject: Re: [PATCH v1 0/3] lib/string: introduce match_string() helper From: Andy Shevchenko To: Tejun Heo Cc: linux-kernel@vger.kernel.org, Andrew Morton , David Airlie , Rasmus Villemoes , Mika Westerberg Date: Thu, 22 Oct 2015 14:33:59 +0300 In-Reply-To: <20150915153529.GE2905@mtj.duckdns.org> References: <1442300031-107677-1-git-send-email-andriy.shevchenko@linux.intel.com> <20150915153529.GE2905@mtj.duckdns.org> Organization: Intel Finland Oy Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.18.0-2+b1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2015-09-15 at 11:35 -0400, Tejun Heo wrote: > Hello, > > On Tue, Sep 15, 2015 at 09:53:48AM +0300, Andy Shevchenko wrote: > > There are users of a simple string matching in the array. Let's do > > a common > > helper for that. > > > > Two users are updated in the series. one more is coming [1]. > > > > [1] http://www.spinics.net/lists/kernel/msg2074265.html > > > > The series is compile tested. > > > > Andy Shevchenko (3): > >   lib/string: introduce match_string() helper > >   drm/edid: convert to use match_string() helper > >   ata: hpt366: convert to use match_string() helper > > > >  drivers/ata/pata_hpt366.c       | 13 +++++-------- > >  drivers/gpu/drm/drm_edid_load.c | 17 ++++++----------- > >  include/linux/string.h          |  7 +++++++ > >  lib/string.c                    | 26 ++++++++++++++++++++++++++ > >  4 files changed, 44 insertions(+), 19 deletions(-) > > While increase in LOC isn't the only indicator, we're adding two > helper functions each for two usages.  I'm not quite sure the > addition > of helpers is paying off here. Does the following sound better? (Btw, I left only one helper function)  drivers/ata/pata_hpt366.c       | 13 +++++--------  drivers/base/property.c         | 10 ++--------  drivers/gpu/drm/drm_edid_load.c | 17 ++++++-----------  drivers/pinctrl/pinmux.c        | 13 +++----------  drivers/power/ab8500_btemp.c    | 11 +++--------  drivers/power/ab8500_charger.c  | 11 +++--------  drivers/power/ab8500_fg.c       | 11 +++--------  drivers/power/abx500_chargalg.c | 10 +++-------  drivers/power/charger-manager.c | 27 ++++-----------------------  include/linux/string.h          |  2 ++  lib/string.c                    | 26 ++++++++++++++++++++++++++  11 files changed, 60 insertions(+), 91 deletions(-) > > Thanks. > -- Andy Shevchenko Intel Finland Oy