From patchwork Fri Jun 16 01:51:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tiezhu Yang X-Patchwork-Id: 108780 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1033228vqr; Thu, 15 Jun 2023 19:00:33 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4CuCAHMkOG+3XUbG4Iq4ZU9uu3qOwRej8yJNyW7cCMlMPn4eAf8TvozGidWGQiqxyqX+bX X-Received: by 2002:a17:902:e744:b0:1b1:8ca9:10ca with SMTP id p4-20020a170902e74400b001b18ca910camr8970090plf.33.1686880833676; Thu, 15 Jun 2023 19:00:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686880833; cv=none; d=google.com; s=arc-20160816; b=qgI9Tdl0f7bFO9u0P+gnFkiETCMHZZv8gK+kx+s7lR7/U3TAWgmj4ufPeBB8ZE4V1z 4O14iTiRPT86+foN0GQpJodl37bw3Hxamg2XGGGGhGw0B4XJbhjR5Fw9W2jcWWX+oD55 QWFKjSdYG4W4nNXBt5tRA+6A/bUM6rTOUjaWM7XFW9GvYwyb7GHfZFsacAcjnQbx9HS2 rUGbFM8cfiySSfsn0Q/wCuu1oD4hVgn0fAo9zVl97t7q9Xqsjcob0hLOnsRCbiUuCNGd OCcGXfIoz3g94Mx8eQwX7CA79rqoEy3clfr+5I3PHJI+rzxfz51ljyY5DCt/LmYwTjC2 SPfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=cdbx2zcOYLNy8YKr31Izddkagln7R4IgkaInZEtHc7k=; b=eBNx2yWz8nsBNg+4V/FUblG5XHshCaVkN8DgKbfNIiVW6J/qtCLA0lFrY92/exEd3G TDEUDVzFrxIiVGiC8u8vjXc5nSQbkY2G8eM7FQS8/dtiPaQZPp4qWFOch6S1Rj77S+YX 0zrjFTTTJpqc1RrLWSTz2/VT5SHqgw9DzlaKC8KCEH76Xv/tlIDde+mr4GApAAmjJh08 MBOwXpQ8NXx7ClU/yWSms0W0G728CvPUzAbcaCvLfPpPTYB9oMOPaTSOaijL55yMPZpg T7VasUKA1OAG8+LvuNK95bjeC3uyMtOqlaiuBVkpKrn13OV96ZmuE6EOjEeDStMqzDfa miWw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u7-20020a17090341c700b001b3b250fd1csi4420794ple.301.2023.06.15.19.00.20; Thu, 15 Jun 2023 19:00:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237823AbjFPBvm (ORCPT + 99 others); Thu, 15 Jun 2023 21:51:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236513AbjFPBvj (ORCPT ); Thu, 15 Jun 2023 21:51:39 -0400 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3685110F7; Thu, 15 Jun 2023 18:51:38 -0700 (PDT) Received: from loongson.cn (unknown [113.200.148.30]) by gateway (Coremail) with SMTP id _____8Bx4OgowItk6skFAA--.10462S3; Fri, 16 Jun 2023 09:51:36 +0800 (CST) Received: from linux.localdomain (unknown [113.200.148.30]) by localhost.localdomain (Coremail) with SMTP id AQAAf8AxPMolwItke7wcAA--.6951S4; Fri, 16 Jun 2023 09:51:35 +0800 (CST) From: Tiezhu Yang To: Luis Chamberlain Cc: linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org, loongson-kernel@lists.loongnix.cn Subject: [PATCH 2/2] module: Make is_valid_name() return bool Date: Fri, 16 Jun 2023 09:51:33 +0800 Message-Id: <1686880293-29594-3-git-send-email-yangtiezhu@loongson.cn> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1686880293-29594-1-git-send-email-yangtiezhu@loongson.cn> References: <1686880293-29594-1-git-send-email-yangtiezhu@loongson.cn> X-CM-TRANSID: AQAAf8AxPMolwItke7wcAA--.6951S4 X-CM-SenderInfo: p1dqw3xlh2x3gn0dqz5rrqw2lrqou0/ X-Coremail-Antispam: 1Uk129KBj9xXoW7Wr1fCr1rJr43tr4kuF1ruFX_yoWfuFc_C3 s2vw1IqF1xAwnY9a10qa13JFyUGw4Utw48Xa4ktw47C34akw45Gas7AFn3Ary7ur45WrW5 CF9F9r4Iyr1xWosvyTuYvTs0mTUanT9S1TB71UUUUUDqnTZGkaVYY2UrUUUUj1kv1TuYvT s0mT0YCTnIWjqI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUI cSsGvfJTRUUUb7xYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I6I8E6xAIw20EY4v20x vaj40_Wr0E3s1l1IIY67AEw4v_Jrv_JF1l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxS w2x7M28EF7xvwVC0I7IYx2IY67AKxVW8JVW5JwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxV W8JVWxJwA2z4x0Y4vEx4A2jsIE14v26r4j6F4UM28EF7xvwVC2z280aVCY1x0267AKxVW8 JVW8Jr1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqjxCEc2xF0cIa020Ex4CE44I27wAqx4 xG64xvF2IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_Jw0_WrylYx0Ex4A2jsIE14v2 6r4j6F4UMcvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvY0x0EwIxGrwCF04k20xvY0x0EwI xGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r1j6r18MI8I3I0E7480 Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_JF0_Jw1lIxkGc2Ij64vIr41lIxAIcVC0I7 IYx2IY67AKxVWUCVW8JwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr1lIxAIcVCF04k2 6cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r4j6F4UMIIF0xvEx4A2jsIEc7CjxV AFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x07josjUUUUUU= X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768822757302488145?= X-GMAIL-MSGID: =?utf-8?q?1768822757302488145?= The return value of is_valid_name() is true or false, so change its type to reflect that. Signed-off-by: Tiezhu Yang --- scripts/mod/modpost.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index d4531d0..e079418 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -1122,12 +1122,12 @@ static int secref_whitelist(const struct sectioncheck *mismatch, * only by merging __exit and __init sections into __text, bloating * the kernel (which is especially evil on embedded platforms). */ -static inline int is_valid_name(struct elf_info *elf, Elf_Sym *sym) +static inline bool is_valid_name(struct elf_info *elf, Elf_Sym *sym) { const char *name = elf->strtab + sym->st_name; if (!name || !strlen(name)) - return 0; + return false; return !is_mapping_symbol(name); }