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] == '.'); From patchwork Mon Feb 4 01:53:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 157374 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3364962jaa; Sun, 3 Feb 2019 17:54:46 -0800 (PST) X-Google-Smtp-Source: ALg8bN6VS91xmDydo+lriaPXtfu0zovVozmyPXKAjFj9jhpkGpkI0dTeJ/lZrZCiyKrnVh8GrVUS X-Received: by 2002:a17:902:930b:: with SMTP id bc11mr50748610plb.17.1549245286829; Sun, 03 Feb 2019 17:54:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549245286; cv=none; d=google.com; s=arc-20160816; b=a7i0Ia8SwzV995/bSDvJiC+AVFxx1OwyUr39dzrMY9wvKPUJHPZJU9O67BwZ9MekqZ 5VhbjBb40xH9pZ2FPWwcHPeJWUYYWAwWYTxWTn3I1R7BWZ68j/7wd38x+Con7EgNENyH Bt2f9aHxvut39Gwvzp/faJPVzsvWpi47s6bwidjMsi1+61MZHnv9604D/3K/HsIekWEb 9c6hugOJOKvSRFAUulLaCSbCvQotvG8PyAnrdA667Yzmd542Vt1VAM249pC+/85uamFO gbJ/bKMz29KgwwtqsYmPwaOgyVn3Sx6I+ddXDCszpBiJ/pZMXZHvezeW2PIKPqJjqbae 2kvw== 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=3ZnGgtKPoc0ZuFDxzJZCCpJljtU9NUQgpqwHwbBwNSk=; b=cTwWdfJTut0Cltyesb50QaklR5rhdeXiI5/ifcp0Y5+uLs3nLIVZT36R/kWNZh3HJW Z7XPK1DN1Vk+hk9NuGx2kz+QKVcv0rGKjdHoUSShbe0v03nnvQvqbhume4dVGkx6jbTG 8F6mZ33xblEYtthRl+XgEwW/dA0sOD2Pi41Jnbeq3uRB5Md5Z6fjJkHFlI4ylX5w7xat yv4dQ7H7mfrRh0hhFOuGoXc8NBpPCA1vnzpBkH+3aK10204wrgTnMZtC/RC5L50G9yoA 5TB/zs5cytI2JpQy6eLpqRJOWFaMDcl8EKwvm7lpQvCuHadUWZEG3duHkDVnh2sfbBm3 54TA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=LLp3cF71; 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 q2si1940825plr.204.2019.02.03.17.54.46; Sun, 03 Feb 2019 17:54:46 -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=LLp3cF71; 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 S1727928AbfBDByl (ORCPT + 31 others); Sun, 3 Feb 2019 20:54:41 -0500 Received: from conuserg-08.nifty.com ([210.131.2.75]:47475 "EHLO conuserg-08.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727396AbfBDByl (ORCPT ); Sun, 3 Feb 2019 20:54:41 -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 x141rNQN008993; Mon, 4 Feb 2019 10:53:24 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com x141rNQN008993 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1549245205; bh=3ZnGgtKPoc0ZuFDxzJZCCpJljtU9NUQgpqwHwbBwNSk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LLp3cF71m2uYNFZeSPKqDBh1seL+z8mk1hCJhQ9ZsY6JAuFAr885qIS1iwYW2i6Iq ro3bGuYMMGGn2dqX2wkDQjdmVQEz0PmjXLwfDl0OTm7pRUwVZQcQiKcr+gpcjC0dRW AJo+MZfv1GdhTEjp6c2cnZzQIkHshHdoRdrEh7r+B+QwlAq5N1590LDsVL1+fEThQC dsrLafCzCf4Hj2TObqrSV66mY5OWwIpZgWwt09tjZd52+o0bdtn9XumUpTAxC1VA9E dPqgm1pmx2W3sB4Wcbz1S/xnIPgnoJ43K66dQ+LUKuCwBN8OaQzHRUGwddHJcTd4eY ilsyWhHgCKFjQ== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , nixiaoming , Jan Beulich , Cao jin , Sam Ravnborg , linux-kernel@vger.kernel.org, Ard Biesheuvel , Mathias Krause Subject: [PATCH 2/3] kallsyms: remove unneeded memset() calls Date: Mon, 4 Feb 2019 10:53:17 +0900 Message-Id: <1549245198-6182-2-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1549245198-6182-1-git-send-email-yamada.masahiro@socionext.com> References: <1549245198-6182-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Global variables in the .bss section are zeroed out before the program starts to run. Signed-off-by: Masahiro Yamada --- scripts/kallsyms.c | 3 --- 1 file changed, 3 deletions(-) -- 2.7.4 diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c index fc00bb0..f1b5749 100644 --- a/scripts/kallsyms.c +++ b/scripts/kallsyms.c @@ -596,9 +596,6 @@ static void insert_real_symbols_in_table(void) { unsigned int i, j, c; - memset(best_table, 0, sizeof(best_table)); - memset(best_table_len, 0, sizeof(best_table_len)); - for (i = 0; i < table_cnt; i++) { for (j = 0; j < table[i].len; j++) { c = table[i].sym[j]; From patchwork Mon Feb 4 01:53:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 157373 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3364875jaa; Sun, 3 Feb 2019 17:54:40 -0800 (PST) X-Google-Smtp-Source: AHgI3IYFDqeaK1Wp1NcYcwk1e6B84R16plhDBn8EI0OIgd6C5l5/6zkD4FRnIDaR/zQ/GeNTUppf X-Received: by 2002:a65:4381:: with SMTP id m1mr11051431pgp.358.1549245280547; Sun, 03 Feb 2019 17:54:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549245280; cv=none; d=google.com; s=arc-20160816; b=TJYlFiaNjkt9G4jgmIRQwpUpQMbnUv9q7TmC9Bk5I6UvIpR9SK4s/UsiDIeUOqF6D0 YDNlZwwjqzUv7TB6rmj5tQW5FAtrlE2PAeMSZ+nqCosGZ+lJa9S60kDUrRP4lbfltYTl vtqO6VRGbzaATyiGY8ITSOVN/EdX/sv1p5+vAXDjbPaUGo82V2Az1Q+74cxUFzHd5SRA ggrYY7qTGrbDGy4kWnw/YsNCjCoGbkC9CfGgc5xfUCcbtxXrlgtzCwixvYEexMU6453H +zBqGS7DuYXA5+pgzib8XsE888Gi81m+RxsrRBJdwQe+LhoJEvMsazHrUFHiq1Ng2pvg n6EQ== 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=waD41spIXeo55DISU4dm31e4PUr+6bTrF1VdnT98FdQ=; b=tMlNufYQfKkkBOPmndSsyxiVBkW7116b1QVxILbQRqqlzjk4kHilrGVy/7zjHMYu1H kldqDEeJcK5bpRCOyiYrPovrcRwkh7ura0YQxVGD9PiM8Lbe+EuUIWurKqO0HlX0FzgR iwaG4rkFdNKGuWXMZ8V5oe+BfMsA5tFlDLvx016ad8JQiWo70rIrvWOLfFejpq6H5W/4 PsO+y5nAzmBUpKuet3ZiL6OeNqGbSM59/E0UdlvF+N9utZUAn9OpzJ4lAUMyILgcy9NB 07UEYzGPkE/wE0A8BvK31c4z4D0jGMmxu9uxJUso73xxNJFab2klXZ3ffvZScGFzBrC5 G3Eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=XRFvgxVM; 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 q5si3276260pgb.245.2019.02.03.17.54.40; Sun, 03 Feb 2019 17:54:40 -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=XRFvgxVM; 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 S1727817AbfBDByi (ORCPT + 31 others); Sun, 3 Feb 2019 20:54:38 -0500 Received: from conuserg-08.nifty.com ([210.131.2.75]:47408 "EHLO conuserg-08.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727396AbfBDByi (ORCPT ); Sun, 3 Feb 2019 20:54:38 -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 x141rNQO008993; Mon, 4 Feb 2019 10:53:25 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com x141rNQO008993 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1549245205; bh=waD41spIXeo55DISU4dm31e4PUr+6bTrF1VdnT98FdQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XRFvgxVMegYsPNNQawvsXKBxphCjPzofgGwYahvjrbg7ankZ2xUXKHVz1bRYa2bGl hXTsfZ8dzXJQSjxoOQz9m70lwRtcfqEykhhUtumvS8Lj1OXo+vDKUnH6hrHIVr6L/W GVMZcDjo59/rTFHe1/VF2VqyS5dkkuD4iMcCAwIEDR2jx5pLw2gMm1MCui6YsxRouA qtL7wbn1fAzzZuV6XMdNwypYfTbsBUHX+bBNXYyh9cJqaVf5xdrU7JO2YoMHJN4E80 hBpFKa1ntq1M+zFpXV9MBXOphl5iDmWtl9fsoIyYI3osAECtS43u+XIxhWGQkmpjIh 18tJubD57ymzw== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , Cao jin , Jan Beulich , nixiaoming , linux-kernel@vger.kernel.org, Will Deacon , Ard Biesheuvel , Mathias Krause Subject: [PATCH 3/3] kallsyms: include instead of Date: Mon, 4 Feb 2019 10:53:18 +0900 Message-Id: <1549245198-6182-3-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1549245198-6182-1-git-send-email-yamada.masahiro@socionext.com> References: <1549245198-6182-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org is enough to include the definition of BITS_PER_LONG. Signed-off-by: Masahiro Yamada --- scripts/kallsyms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c index f1b5749..03ff265 100644 --- a/scripts/kallsyms.c +++ b/scripts/kallsyms.c @@ -331,7 +331,7 @@ static void write_src(void) unsigned int *markers; char buf[KSYM_NAME_LEN]; - printf("#include \n"); + printf("#include \n"); printf("#if BITS_PER_LONG == 64\n"); printf("#define PTR .quad\n"); printf("#define ALGN .balign 8\n");