From patchwork Sat Nov 23 13:27:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 180086 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp735819ilf; Sat, 23 Nov 2019 05:28:12 -0800 (PST) X-Google-Smtp-Source: APXvYqyD8rZBgk/hykpzcEba3tF5J8dz57O/oiD+d2PjE9W55C36qkZX74P7uheC34f35+UVKVIR X-Received: by 2002:a50:a9e3:: with SMTP id n90mr7144063edc.52.1574515692605; Sat, 23 Nov 2019 05:28:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574515692; cv=none; d=google.com; s=arc-20160816; b=tBdf0SrubMXd+jrAVrZnQmk8N6u/YDuMLBn/XJofII7OV4EswWbucnX+uinNLAW5F1 Yi1TG/8TPPq2ThmNDfdj8P7ndGMcfCmZKQJCSj6hFa173K3sqMNWyqgPggxNPMHTlLRA QV/AjJ0U5RkJcK71OgP06nm2HeTZ28aV+nuralQeO2UBkItu4U8I42ljUWWikSBHN45q qukjC3n60UcWfPqwRjcIIKja6COBrwua20H4XtISiPCNzmvvU12zxfVAqnFAm5AeF0mA XUGguUOiDzzsr90pfG7ArOwx7NO9kckU1/dOF/qZe836IzlP6LGno5UKRlJ6kHfjr5cy g6PQ== 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=GdWZ/Oaov377i0Vjzbhs1TEelv4AZ1oW6iHWPykbggE=; b=Nvu65nbXB+dCFydMNgg6lNsXkNFTCgWNG71P+xx5x1raclhmafmn0Vj41R2Ntw7Gym VhogZZiTREwiU5oisH9c1+SSmvnreDSh1rk6SKvZ4b8B1dTF5MLRWf0Grp7tZ7LDzkOz X8rdAUJ7jBVObDtmaIXlHVdZW/Eqzwh9jOo656/m+w/orVrXO04tJPiCWDgBcXKMkr/U D2f/pn8cQF+wA48Ck+gHiJiD2tmh1sg193qedb3fnj0xhI78bJc8h+TBP/o75Kwg7aPQ u75j3TAe96xfLt57YXqA1N/g6pqKbn6wx33bxYtG4A5cjNd0wypUPj7ac74obc3IrFw7 ih6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=jze3904v; 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 p38si912045edc.163.2019.11.23.05.28.12; Sat, 23 Nov 2019 05:28:12 -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=jze3904v; 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 S1726990AbfKWN2F (ORCPT + 26 others); Sat, 23 Nov 2019 08:28:05 -0500 Received: from conuserg-10.nifty.com ([210.131.2.77]:39548 "EHLO conuserg-10.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726803AbfKWN2B (ORCPT ); Sat, 23 Nov 2019 08:28:01 -0500 Received: from grover.flets-west.jp (softbank126093102113.bbtec.net [126.93.102.113]) (authenticated) by conuserg-10.nifty.com with ESMTP id xANDRbkm000733; Sat, 23 Nov 2019 22:27:44 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com xANDRbkm000733 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1574515665; bh=GdWZ/Oaov377i0Vjzbhs1TEelv4AZ1oW6iHWPykbggE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jze3904vfDeLn5mblmlhroba0/JIdGcDdE1OoMG4Abr+vKKLGA+UPQ9QthOo4a+Ru VSKuxbQLs4SIewdIZcnAwU/ZSGOGeQm+91fa4UXTQO4JoS00dN1WkJImk/9/VkaAam B8y+xlYSTjb1if2pesUPLk/rTvZRwpEpfK9ezaxco4BqFSLC/4uk5X2LEgLubbaeHH dhe7hZ/lg59fL/VjkpkQcP6wZfQKTKp2UFLTbHrNw9hjHPGl9mDCsE5an3hAW/AlAl NcNYNJyQPYy+jYO09igX4CFgE9+nmRoZpi2BUwAKto3tcN4PLcxBhQ6ZHzGxC4hUqZ dxkVXFRt3yZ+Q== 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 13/16] scripts/kallsyms: make check_symbol_range() void function Date: Sat, 23 Nov 2019 22:27:24 +0900 Message-Id: <20191123132727.30151-14-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191123132727.30151-1-yamada.masahiro@socionext.com> References: <20191123132727.30151-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 --- 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 21f4d347f371..144f43363c4d 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 */