Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp634362ybc; Sat, 23 Nov 2019 05:29:26 -0800 (PST) X-Google-Smtp-Source: APXvYqx+Wjmv25/OgLjl3sq67tuo/PLzBENDk7+X1m45Z30dMV/e7c/Svy2Lt4RZCkEi9HvGNc7s X-Received: by 2002:a17:906:90c3:: with SMTP id v3mr7842336ejw.30.1574515766517; Sat, 23 Nov 2019 05:29:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574515766; cv=none; d=google.com; s=arc-20160816; b=jCgZvo9kzSNgRJ0ebSJdRZkWm5ybabxG8xq5OImG6p2AjG0moWpxi/wYSgKyhP7pX2 Dac32cOg7Y8DOJI/vUFcDZ8YIGRez3VtgEKYuHE5ohkz1ZEX91vbLlc2hQSIJWOVDIJL 7ASPcaXCAXRFMU9K83JmFZgPkrmq5Vt1aKLHxpXGdPvw97N1//6/85sD/bTzfzvanECe TV3l0xEPydxK3vHTaG9uEcsuFX1ddpYHwwOjHj3kH6fgDRwWCRzRWFx1GqhRFjr+maha nPrU1uePsCB0aWYUdfnKVN11HbbvyIIvfDAxwGV16gJk8IgYiInjJIRzoLSzXZ3fu0Uf 2FQA== 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: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e4si714745ejx.214.2019.11.23.05.29.02; Sat, 23 Nov 2019 05:29:26 -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 S1726948AbfKWN2D (ORCPT + 99 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 ); 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 To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , 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: X-Mailing-List: linux-kernel@vger.kernel.org l <= strlen(sym_name) is unnecessary for prefix matching. strncmp() will do. Signed-off-by: Masahiro Yamada --- scripts/kallsyms.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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; } -- 2.17.1