Message ID | 20191123160444.11251-7-yamada.masahiro@socionext.com |
---|---|
State | Accepted |
Commit | c5e5002f3603e01f50d8d61878a4ca8ffca7bd15 |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp887188ilf; Sat, 23 Nov 2019 08:05:59 -0800 (PST) X-Google-Smtp-Source: APXvYqyvdlZGk68fxGbC9o5P3B4bff3sXCyQ4S2rdBBBId9v06EptmYaFeMPi2+XLWVl97t5FoCR X-Received: by 2002:aa7:cf19:: with SMTP id a25mr1235279edy.237.1574525159540; Sat, 23 Nov 2019 08:05:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574525159; cv=none; d=google.com; s=arc-20160816; b=bNxpKjMy9UgIJA1rx/5UBJvE/cl1kPDQBaQTeprN6YrDYxL8j7MXmrILBQWagsmYKs JAT4zA5z+/KrdJqSMpP6uGtEU1SzXqNBp3KFcCK996TGLXZXyPAvfSJyZUSCBzKkIx+T mXVfpgkFZJb4DvvmjSu+WNovJyo6IdHLXq0rySJ7dMn/i+DtDTAHJiF5TpAsyrIReDdk +Yt6r1jQVMkBfa0fvlGQNM64AQOi182R+TqyXRxkJreFWUfQ8vLsVCcpY1nM/4ugF0xF o5bqHY7PTpmztG8BV2DpS1TKrBoy3acsPJHPWqRGyfzcWdMgwcwpYoY7/VXMd37TBZKU jueQ== 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=lxCDJ/TzRamerzIHNtq7hRwp1rjH2y4uMZMCuV7ILJg=; b=DMELAzAMnBFsNg22/UO1vu1MUmAKbO6pQzgCebkFnMCW7giRXwBVcfB83ctF80Sqil V423P+U6ZdIzFYJY/Uj7qDfWMiCerlihJLI0P6savWUVp/ancgn9RDPdJPZA7wHr1cjK E3zbGNuGgIOWdGco255IOzQ9/KgF0KRw3MpQ5Jv9OZbaW1jy1ZM74pTzpMGR1EIjxTKi IogoTjDGOIf6Eb7sntQxAftuRNbeL74nW298E9KFDt0z9xxagyGAs2yYVZ62GLujGaRp UoPuxmPZ72XEr42FuBZHdVz9SQPLfx0ghmbMOdEKR8S1kzVgvpy2GADjPAPuOK8a38qT 88iQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=vIz5p4JA; 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 bt28si1019271edb.270.2019.11.23.08.05.59; Sat, 23 Nov 2019 08:05:59 -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=vIz5p4JA; 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 S1727258AbfKWQFv (ORCPT <rfc822;lee.jones@linaro.org> + 26 others); Sat, 23 Nov 2019 11:05:51 -0500 Received: from conuserg-12.nifty.com ([210.131.2.79]:49451 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726760AbfKWQFB (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 23 Nov 2019 11:05:01 -0500 Received: from grover.flets-west.jp (softbank126093102113.bbtec.net [126.93.102.113]) (authenticated) by conuserg-12.nifty.com with ESMTP id xANG4l5N019106; Sun, 24 Nov 2019 01:04:50 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com xANG4l5N019106 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1574525090; bh=lxCDJ/TzRamerzIHNtq7hRwp1rjH2y4uMZMCuV7ILJg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vIz5p4JABWr2ukQchXCPsHDjkp9lot5DP65ulXNWDBNpkGwr6lpe3sbq6Wq6h4yUI CTPa8hO/pnYsxUW3L8QgPtlW9oPaihXyL0Gyu/M+fwXVTWl+KLNf2L6nkLWQSQvnca MRU4S7CXku89X7hLsHUgk4eyDKmlJw2c011IZ2EHIMKrSgoolLDKHb+B4LqhxYC62V znZ4YrKLWyyp0UEoJXzZHMoMBEyNxQx76fFp+X1gCzi1bHwQABbJjyNZZ/1bvIh002 I6SA7YmkDoKKqLoqCL2L2Uurq/XlPmQXHbR4DAygejWWjInPiAO4yvoJXfV4KbL4Zy HI8R+OWSJ+hJQ== 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 v2 06/16] scripts/kallsyms: remove unneeded length check for prefix matching Date: Sun, 24 Nov 2019 01:04:34 +0900 Message-Id: <20191123160444.11251-7-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191123160444.11251-1-yamada.masahiro@socionext.com> References: <20191123160444.11251-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 14a50c8d3f34..a57636c6f84f 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> --- Changes in v2: None scripts/kallsyms.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 2.17.1