Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933186AbcCIQTz (ORCPT ); Wed, 9 Mar 2016 11:19:55 -0500 Received: from mx1.redhat.com ([209.132.183.28]:42865 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751277AbcCIQTr (ORCPT ); Wed, 9 Mar 2016 11:19:47 -0500 Date: Wed, 9 Mar 2016 10:19:46 -0600 From: Josh Poimboeuf To: Petr Mladek Cc: Jiri Kosina , Jessica Yu , Miroslav Benes , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org, Chris J Arges Subject: Re: [PATCH] livepatch: Fix the error message about unresolvable ambiguity Message-ID: <20160309161946.GC21308@treble.redhat.com> References: <1457533259-6138-1-git-send-email-pmladek@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1457533259-6138-1-git-send-email-pmladek@suse.com> User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1401 Lines: 36 On Wed, Mar 09, 2016 at 03:20:59PM +0100, Petr Mladek wrote: > klp_find_callback() stops the search when sympos is not defined and > a second symbol of the same name is found. It means that the current > error message about the unresolvable ambiguity always prints "(2 matches)". > > Let's remove this information. The total number of occurrences is > not much helpful. The author of the patch still must put a non-trivial > effort into searching the right position in the object file. > > Signed-off-by: Petr Mladek > --- > kernel/livepatch/core.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c > index bc2c85c064c1..f2eda09e8357 100644 > --- a/kernel/livepatch/core.c > +++ b/kernel/livepatch/core.c > @@ -190,8 +190,8 @@ static int klp_find_object_symbol(const char *objname, const char *name, > if (args.addr == 0) > pr_err("symbol '%s' not found in symbol table\n", name); > else if (args.count > 1 && sympos == 0) { > - pr_err("unresolvable ambiguity (%lu matches) on symbol '%s' in object '%s'\n", > - args.count, name, objname); > + pr_err("unresolvable ambiguity on symbol '%s' in object '%s'\n", While you're at it, can you improve the grammar: s/on/for/ ? "unresolvable ambiguity *for* symbol..." Either way, Acked-by: Josh Poimboeuf -- Josh