From patchwork Sat Nov 23 16:04:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 180113 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp886867ilf; Sat, 23 Nov 2019 08:05:45 -0800 (PST) X-Google-Smtp-Source: APXvYqx0xTlxv4FFJmFMKr1OkkaitKihSoBGPIHNW0qqC/NwBgjECxUS46dhpNGpGbPYDct/tzDX X-Received: by 2002:a50:ef16:: with SMTP id m22mr7807715eds.154.1574525144943; Sat, 23 Nov 2019 08:05:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574525144; cv=none; d=google.com; s=arc-20160816; b=KpcwppM0gfhgJTZp5m+x+ikdVQr62/YPUvwfgO3Kk0AoXeVsHlh3dp82KxHJPMycqh amy9K4MNvvujTUbWAg/Jtir5vetXh/tAwL0zfzbTNuY9eE2F1r5L2G/lDQhYw2ZzlKfI l+q1rXDkq5WRfVA5WlCjwyf8zTkNUsF9k3j/DLoWlIve7D7qKMk6FFH9aBOSnnuLYFom 29ehipwptOKK7bdqcM8JsXJGT7FHPmxVHTizVmOR7awPH7AIihiAOAJNnYM1/ewcLB93 CCTixOln01zKugual0cKXxKIVIpsumlfVs2zbtkF9YvJ8Gv4RmsaqwhVQb2KedPDLCqG dWwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=9MAnCdg3hR5ROOX8y8hcsA9VaCetvt+YAuylmAsTUL4=; b=WvzUzDQcKyw2k2hQBM3KjWmXfPHt3k379ZERFH3ZgV8UZPD6qEdKbbHe07lYpa758q dKiLKlmvxOVmbH1RUrRYgRsUX2e4HNQ+X42ihdCee87W0dLIGWBeyujcyDgXEDMklN+4 nWab0guDLx5vWPPmAzuErq5GhBYiLsA3U9zDRF8nVYw3HhsViG30H7hK9SdP2AWL4IyG 4whMGv0XstFklRsVjZIWE4RxcnMEzOKlCa32O+b7bD/7J5mQTGEDSDMDWUTsluitwGE/ L20ektk5FA7jZgWeuLE2naVUnHRoBxxMVR9j7YkRwFU+BHRXFBSNbbR9CghYRAtfAiCm n8uA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b="x4VIQ1/V"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id qn4si970396ejb.329.2019.11.23.08.05.44; Sat, 23 Nov 2019 08:05:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b="x4VIQ1/V"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727212AbfKWQFm (ORCPT + 26 others); Sat, 23 Nov 2019 11:05:42 -0500 Received: from conuserg-12.nifty.com ([210.131.2.79]:49457 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726820AbfKWQFC (ORCPT ); Sat, 23 Nov 2019 11:05:02 -0500 Received: from grover.flets-west.jp (softbank126093102113.bbtec.net [126.93.102.113]) (authenticated) by conuserg-12.nifty.com with ESMTP id xANG4l5V019106; Sun, 24 Nov 2019 01:04:54 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com xANG4l5V019106 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1574525094; bh=9MAnCdg3hR5ROOX8y8hcsA9VaCetvt+YAuylmAsTUL4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=x4VIQ1/VqdKlMPmJB8JIlJnPeiDjw2UMJPvdhqrzJQXJM40hLJ87fsHejr4cCTmTg 50BMgOnpUNp8aKEup82RBfUju4WPG3xqBJD50ihPyUtSaFXaxi12GsAZB3Fux3yFL0 AJEodQDkTKfQrHaX7BYQzOh7VpGlVWQf3aWhhL2qjg8P1ekPdRA1tip2D0oGBzuici ImZ5hWIP0XV7a2PWUkW9kIZ8V7GhPnNdW8ZQvvZ3FH5YqZqrTCpGjJwWL7jf6Pa03r ThOFqS+ftEUK5BW3/2lI/qZ9ZjU+1jllYHrf0JhWO56ilJw9MZs3BdiMZ3Kee0OMYK bjohBVT5LLiTg== X-Nifty-SrcIP: [126.93.102.113] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH v2 14/16] scripts/kallsyms: make check_symbol_range() void function Date: Sun, 24 Nov 2019 01:04:42 +0900 Message-Id: <20191123160444.11251-15-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191123160444.11251-1-yamada.masahiro@socionext.com> References: <20191123160444.11251-1-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There is no more reason to check the return value of check_symbol_range(). Signed-off-by: Masahiro Yamada --- Changes in v2: None scripts/kallsyms.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) -- 2.17.1 diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c index d90a6133d7b8..f4d5f131556d 100644 --- a/scripts/kallsyms.c +++ b/scripts/kallsyms.c @@ -155,8 +155,8 @@ static bool is_ignored_symbol(const char *name, char type) return false; } -static int check_symbol_range(const char *sym, unsigned long long addr, - struct addr_range *ranges, int entries) +static void check_symbol_range(const char *sym, unsigned long long addr, + struct addr_range *ranges, int entries) { size_t i; struct addr_range *ar; @@ -166,14 +166,12 @@ static int check_symbol_range(const char *sym, unsigned long long addr, if (strcmp(sym, ar->start_sym) == 0) { ar->start = addr; - return 0; + return; } else if (strcmp(sym, ar->end_sym) == 0) { ar->end = addr; - return 0; + return; } } - - return 1; } static int read_symbol(FILE *in, struct sym_entry *s) @@ -200,9 +198,8 @@ static int read_symbol(FILE *in, struct sym_entry *s) /* Ignore most absolute/undefined (?) symbols. */ if (strcmp(sym, "_text") == 0) _text = s->addr; - else if (check_symbol_range(sym, s->addr, text_ranges, - ARRAY_SIZE(text_ranges)) == 0) - /* nothing to do */; + + check_symbol_range(sym, s->addr, text_ranges, ARRAY_SIZE(text_ranges)); /* include the type field in the symbol name, so that it gets * compressed together */