Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2397881ybl; Sat, 1 Feb 2020 21:11:37 -0800 (PST) X-Google-Smtp-Source: APXvYqwj5lMeymOG3h6cGHInvXrfkBkxLnI92VQA5ELcRPTjC/Qnk6oHR/4g0VZCX6mCTfk20fZJ X-Received: by 2002:a9d:5888:: with SMTP id x8mr12653964otg.361.1580620297356; Sat, 01 Feb 2020 21:11:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580620297; cv=none; d=google.com; s=arc-20160816; b=tVH/atKH9fEyovrrnScuA4rSzrqQ6aZIYvaaalLVnRqIItcS/mpyZIFB+jE7l8EtWB JlIh8Dl9teVWC7WvkBjMmUrTsgqhFnhRkfzX/MEDhjm8NvrTpXNq75AHmNnOtEaejHJX MhmNFkir/kiPKW68I1vRKFWZtmWG4WWWmXvNLhVHUw3io/N7enj0SAtcttn6z23Eaa0S qExNaeYzYEbb/KxnRxU0o4A4YC5tZ5bico0faa7b3v3WA6KEktdlAx9fZl+7OtQ8obPh UYcfFUWm3nS0kBNoAzzWyNYIIuei7cYNysSjVam07JQccSUxCx6iVA2/E+8HYOeBelrD dtIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=0KYkc3+fXPLDfoOu9nykrUesAlfwthN/qlBaxElOalE=; b=FwStXkyqtUO6WQcIhBtgA/zk3s4dmG35c9XZQiQz/shlADh9d1+755PrGe8rLITEA9 3YC9CNly28yF4qA1luAg/BYkft3AZDM8eaWhOgNNU59VMqn+DbrsgFlGIpEq1rdR398z l9Sd2CE2s0a8grHQaTCb4feM0tWC3Cb0DfvmgHecVhaH4E8bZ9MLpvHAIGeMafD0jIaG 0U9wBLqP2/iVLqqMYoZwZU2ihxCptEvbpYXv1zWjflPwr5xnQbMyoGMaJHto9zXvgzoy byAyPboUcAOycTt2PjBY5yNO7wXnEQmCm8cZ6tGWtq2sTmXZ48tnWKVAItmc/wPtjhIU rhdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=NMHjpqsm; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p25si7379227oto.191.2020.02.01.21.11.05; Sat, 01 Feb 2020 21:11:37 -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=NMHjpqsm; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726825AbgBBFJg (ORCPT + 99 others); Sun, 2 Feb 2020 00:09:36 -0500 Received: from conuserg-11.nifty.com ([210.131.2.78]:58015 "EHLO conuserg-11.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725811AbgBBFJg (ORCPT ); Sun, 2 Feb 2020 00:09:36 -0500 Received: from grover.flets-west.jp (softbank126093102113.bbtec.net [126.93.102.113]) (authenticated) by conuserg-11.nifty.com with ESMTP id 01259SCZ026546; Sun, 2 Feb 2020 14:09:28 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com 01259SCZ026546 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1580620168; bh=0KYkc3+fXPLDfoOu9nykrUesAlfwthN/qlBaxElOalE=; h=From:To:Cc:Subject:Date:From; b=NMHjpqsm8UEFuIo6bHwGU3Pf8KTgA5qcwn/OraUGIJmWAU9eGmcservBHTftCJQsa GrgqnOHWFfwR4C3raferS163o0qZoQOLx2wU183f7SoQppDW5xCVSPYeTsZAaUiCfk pU4h3OCnUKRXPDFPtgekz3AcGD0PLo4qSXsdl4upIhxNaBTJI9jVMyeEGqGSusSrxc ST86bjl/XZ1pRJPVFQ92e7XYiejloIRLvTCHjc8R9oUqMU3NPWIns5CMjYa5aWyaQl tRKGUTv+nvK0s6KB44WZ81tPvGnIeDjes+5SXKaNqYrbQe4d1cnVQm334UbJ9kBu+P KTZRxGU4ATsKg== 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 1/3] scripts/kallsyms: rename local variables in read_symbol() Date: Sun, 2 Feb 2020 14:09:20 +0900 Message-Id: <20200202050922.12402-1-masahiroy@kernel.org> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I will use 'sym' for the point to struce sym_entry in the next commit. Rename 'sym', 'stype' to 'name', 'type', which are more intuitive. Signed-off-by: Masahiro Yamada --- scripts/kallsyms.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c index 94153732ec00..5c34edd98b3e 100644 --- a/scripts/kallsyms.c +++ b/scripts/kallsyms.c @@ -176,43 +176,43 @@ static void check_symbol_range(const char *sym, unsigned long long addr, static int read_symbol(FILE *in, struct sym_entry *s) { - char sym[500], stype; + char name[500], type; int rc; - rc = fscanf(in, "%llx %c %499s\n", &s->addr, &stype, sym); + rc = fscanf(in, "%llx %c %499s\n", &s->addr, &type, name); if (rc != 3) { - if (rc != EOF && fgets(sym, 500, in) == NULL) + if (rc != EOF && fgets(name, 500, in) == NULL) fprintf(stderr, "Read error or end of file.\n"); return -1; } - if (strlen(sym) >= KSYM_NAME_LEN) { + if (strlen(name) >= KSYM_NAME_LEN) { fprintf(stderr, "Symbol %s too long for kallsyms (%zu >= %d).\n" "Please increase KSYM_NAME_LEN both in kernel and kallsyms.c\n", - sym, strlen(sym), KSYM_NAME_LEN); + name, strlen(name), KSYM_NAME_LEN); return -1; } - if (is_ignored_symbol(sym, stype)) + if (is_ignored_symbol(name, type)) return -1; /* Ignore most absolute/undefined (?) symbols. */ - if (strcmp(sym, "_text") == 0) + if (strcmp(name, "_text") == 0) _text = s->addr; - check_symbol_range(sym, s->addr, text_ranges, ARRAY_SIZE(text_ranges)); - check_symbol_range(sym, s->addr, &percpu_range, 1); + check_symbol_range(name, s->addr, text_ranges, ARRAY_SIZE(text_ranges)); + check_symbol_range(name, s->addr, &percpu_range, 1); /* include the type field in the symbol name, so that it gets * compressed together */ - s->len = strlen(sym) + 1; + s->len = strlen(name) + 1; s->sym = malloc(s->len + 1); if (!s->sym) { fprintf(stderr, "kallsyms failure: " "unable to allocate required amount of memory\n"); exit(EXIT_FAILURE); } - strcpy(sym_name(s), sym); - s->sym[0] = stype; + strcpy(sym_name(s), name); + s->sym[0] = type; s->percpu_absolute = 0; -- 2.17.1