From patchwork Mon Feb 4 01:53:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 157375 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3365012jaa; Sun, 3 Feb 2019 17:54:51 -0800 (PST) X-Google-Smtp-Source: ALg8bN5L0HGt8eAA8AXfYfSMhvow0EU4oZkbtbobkVUQ0xSj3cAyuFoDKqMTBJjivKMSIqJzfSrs X-Received: by 2002:a62:d148:: with SMTP id t8mr50390465pfl.52.1549245291068; Sun, 03 Feb 2019 17:54:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549245291; cv=none; d=google.com; s=arc-20160816; b=tKQAEu8fX5K3W/Qy7oVLOwngwlgdfvLeXh6F8JBx6al0DbuGm3ypFjAqAHJrezCYmM Mbn+8Vj5wqQ/35oLD3T87m5Hg0xtRRmGMJj+SCze9zu4ux9HT/+CbBTCvhBN6gbHq2fF yzcIa7CFeoRFkvkI32SyLSCDOfkfoQLI0eEvm+Zs2LgJdYW8Czi1Tj4PneH0z4jzwhnL CquAJ59b80J2bUuSFHtNbQPUnpAMX4TCHEMEmNmE9dXmyFhmyjX+30R619fvrS+iK8XP nFyidBxtVhDK/NsP6YKYgHj7TkGk3SHsJaHMpI++zV6UmsTsgqZ5dHsdeGg6osoyVoCS ytlA== 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=oNydtwERVpbddTeO5/87kDpAW3quEv1odTeJy35hRtw=; b=Vv9diakNFNmCCAiAV3/Hjt9zvECtEL2tknkuRaIboZ5Xd6Hc5Mg2JzuhkdLvgB/77R CetC7qovJ7LXkCPMBP/xu7mHmphSjPtqwOKk+WKsGlpl1OxToJS0C5Do/It9rY5HhMCX TlawP7D30IjSIOSQax1I6Y5YaoWcdF4vuY3+mxGJawrmxetLmpqVO3Zg3aK4fz44+veL NcNN6gQHToQrAQjq1eNhNraRw1893PBjDtUepdNBAKjn3BSrFmeYX81gNZbGFMSooGff 2QrBdU1ZJjadeArRaDEYYm1i57SVv7tJ6Zfhk8XCgtJeelNNC0hGx9OqSb2Ud67F8lt2 Xl1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=K7GtuYsQ; 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 m64si15537659pfb.224.2019.02.03.17.54.50; Sun, 03 Feb 2019 17:54:51 -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=K7GtuYsQ; 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 S1728024AbfBDBys (ORCPT + 31 others); Sun, 3 Feb 2019 20:54:48 -0500 Received: from conuserg-08.nifty.com ([210.131.2.75]:47654 "EHLO conuserg-08.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727396AbfBDByr (ORCPT ); Sun, 3 Feb 2019 20:54:47 -0500 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id x141rNQM008993; Mon, 4 Feb 2019 10:53:23 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com x141rNQM008993 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1549245204; bh=oNydtwERVpbddTeO5/87kDpAW3quEv1odTeJy35hRtw=; h=From:To:Cc:Subject:Date:From; b=K7GtuYsQmL0rWx5SIuEm2ZntkvgkNmg3lPIf8eWtRFGCNUbfXYcF/2Ngb2FdB7PwB DoRB+p392tGLhOvCBnwoGjEc4dvy1cffjhlU/OwC3q7oiEghTfUqWjCiWnXu4f3k9e +sjJ8kn6xIGahKlWn4nvzraVkiU6uM35/yaEbiJ1t+3RjQkbhQNnGWrtJRK/2rUywj CzqwR0eU2fCBo6Wk/MYufffJohOlqa8l6z5fR0epg4SBGmu+f+fRNCxx7gggUdAmPG hEZMbzVR0RwPtFgi9rbluXbPA9SUM23I8aSUsjfyI0yo8H2Wc8xUJ8TJxJd7mX56i3 KPoBN8X7CCGkQ== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , nixiaoming , Jan Beulich , Cao jin , linux-kernel@vger.kernel.org, "Steven Rostedt (VMware)" , Ard Biesheuvel , Mathias Krause Subject: [PATCH 1/3] kallsyms: add static qualifiers where missing Date: Mon, 4 Feb 2019 10:53:16 +0900 Message-Id: <1549245198-6182-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the following sparse warnings: scripts/kallsyms.c:65:5: warning: symbol 'token_profit' was not declared. Should it be static? scripts/kallsyms.c:68:15: warning: symbol 'best_table' was not declared. Should it be static? scripts/kallsyms.c:69:15: warning: symbol 'best_table_len' was not declared. Should it be static? Also, remove 'inline' from is_arm_mapping_symbol(). The compiler will inline it anyway when it is appropriate to do so. Signed-off-by: Masahiro Yamada --- scripts/kallsyms.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.7.4 diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c index 77cebad..fc00bb0 100644 --- a/scripts/kallsyms.c +++ b/scripts/kallsyms.c @@ -62,11 +62,11 @@ static int all_symbols = 0; static int absolute_percpu = 0; static int base_relative = 0; -int token_profit[0x10000]; +static int token_profit[0x10000]; /* the table that holds the result of the compression */ -unsigned char best_table[256][2]; -unsigned char best_table_len[256]; +static unsigned char best_table[256][2]; +static unsigned char best_table_len[256]; static void usage(void) @@ -80,7 +80,7 @@ static void usage(void) * This ignores the intensely annoying "mapping symbols" found * in ARM ELF files: $a, $t and $d. */ -static inline int is_arm_mapping_symbol(const char *str) +static int is_arm_mapping_symbol(const char *str) { return str[0] == '$' && strchr("axtd", str[1]) && (str[2] == '\0' || str[2] == '.');