Message ID | 20191123132727.30151-6-yamada.masahiro@socionext.com |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp735711ilf; Sat, 23 Nov 2019 05:28:05 -0800 (PST) X-Google-Smtp-Source: APXvYqzRa98iKbV3Rb0Ne0KF5O0G2e9e/mxvWjoydDX25KOLvhksI5sCjkBS3FQy1/Rn4YbPVfJl X-Received: by 2002:aa7:d3da:: with SMTP id o26mr7394271edr.302.1574515685186; Sat, 23 Nov 2019 05:28:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574515685; cv=none; d=google.com; s=arc-20160816; b=u9iHlJvbwijL3fgpEU7VInF74zqXs7YcOsu8G05PPbFXOnq0dIJZt+2e4jFcMCA31d o9GZvo7F9AEHreoLpzMFTRpmYoviRc/2ntHiF+gm4ZZY0pfj+Prvbo2qkTJFRaXOOerC JU1w1Q0oj7FcWI4sJX2fmwvoonuiYORIs9yVHscvH/qEfHkTxTFDDrd3ajUrR21Ir3a6 w/DgzUBH0SaKhtVqE7LqhZhmmQ1w4o3rI/4IZzw0pKimXcp8ERPwswAKvJXu3Ja5xsxr 53DtcI+y705g6/cP2nrD9NRlkHV+w9iZCz3vH/EDnlGMFc/Fv1aggDlCU1bOh0ElqBKh OZWw== 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=X/uShYh5Ocw7jutbX526YPdGr8N3XPBBqlaV1xcxg9U=; b=RJFTa0tE2et/G2hSSSycuvj5av3s9EkrOrv6oBZrOTGjUeP5aCufliNi4qYu0XrNM9 EcuivVOc6Fz5x6kumXW0+tvg6oCqXztDQ0AQCWQYsVKPx5nkt7eGDHfDLaT9WCxh1sKP 4RDRUNF0h7bUxHIHbzjJHbqyz15qED0GiTBScutBM5nSpsv6ATKYj1gbv/lJvkkjEaFJ 5F6ORpVEAp0K1kN+uQx92MqAFQeQNKISTvCqYRdKukqdjC4SKl2zFT/nfAfqI4xic3hF dHhI+2icWbE2KUfb26TXmSSBKykSH9QGYzwXSuMX2Fus0+3HJDrcAtUU7sZZa4ASXwGh n3Gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=oxh5mWc9; 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: <linux-kernel-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w3si817912edt.196.2019.11.23.05.28.04; Sat, 23 Nov 2019 05:28:05 -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=oxh5mWc9; 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 S1726962AbfKWN2D (ORCPT <rfc822;lee.jones@linaro.org> + 26 others); Sat, 23 Nov 2019 08:28:03 -0500 Received: from conuserg-10.nifty.com ([210.131.2.77]:39549 "EHLO conuserg-10.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726802AbfKWN2A (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 23 Nov 2019 08:28:00 -0500 Received: from grover.flets-west.jp (softbank126093102113.bbtec.net [126.93.102.113]) (authenticated) by conuserg-10.nifty.com with ESMTP id xANDRbke000733; Sat, 23 Nov 2019 22:27:40 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com xANDRbke000733 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1574515661; bh=X/uShYh5Ocw7jutbX526YPdGr8N3XPBBqlaV1xcxg9U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oxh5mWc96I+dx8zaiAIm+RHL7+53qCiLu2kJsIbZgwwZGEI5K21EwDRaod0Rvdxu1 i+714hNlRZrZW5gmzETRL/Ganlpv5XqVthtjwXxZpQ8BXrg1cLnT0a1JZMNNK9Apb0 Ua6x2CSif+fVJ+IEJ2jmWFt5J8fx1jTmSYG/OT/HXEKcctl4GWAfzZacfiB5b2Z/Rv 6H/Rhx2ydHc1clJEFyTnheUF46FAHcKguzHV5m6zdxvgK0fIscT81vvHDYshWQwQiw 4h2MfWHf2jd5y6vv/5u3Iop7azUbqj8DqEsxihkaQPCBL+inIbBPVaPTwOFVCkxuKF Jwd/J43AiTqPA== X-Nifty-SrcIP: [126.93.102.113] From: Masahiro Yamada <yamada.masahiro@socionext.com> To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada <yamada.masahiro@socionext.com>, linux-kernel@vger.kernel.org Subject: [PATCH 05/16] scripts/kallsyms: remove unneeded length check for prefix matching Date: Sat, 23 Nov 2019 22:27:16 +0900 Message-Id: <20191123132727.30151-6-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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org |
Series |
scripts/kallsyms: various cleanups and optimizations
|
expand
|
diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c index 265475d3cffb..d06f373b3a96 100644 --- a/scripts/kallsyms.c +++ b/scripts/kallsyms.c @@ -246,8 +246,7 @@ static int symbol_valid(struct sym_entry *s) for (i = 0; special_prefixes[i]; i++) { int l = strlen(special_prefixes[i]); - if (l <= strlen(sym_name) && - strncmp(sym_name, special_prefixes[i], l) == 0) + if (strncmp(sym_name, special_prefixes[i], l) == 0) return 0; }
l <= strlen(sym_name) is unnecessary for prefix matching. strncmp() will do. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> --- scripts/kallsyms.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 2.17.1