Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1942675rwd; Thu, 15 Jun 2023 18:55:06 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6UuiMMGXj++s2wHEI/0gphlqgkmjsC+7WtwQ9G+3TLAo1YsO281DVspKQ9PKQYyNq5WpzQ X-Received: by 2002:a17:903:48c:b0:1b1:99c9:8ce5 with SMTP id jj12-20020a170903048c00b001b199c98ce5mr7252710plb.16.1686880506226; Thu, 15 Jun 2023 18:55:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686880506; cv=none; d=google.com; s=arc-20160816; b=N9tJGKtpz88BlsgRacxbyWZ/HX2gnPxv3Bdf9VEGYQPK4S2MuTuxjf8ppBc/pey9Db 2qBuIqxndwBZfFy4rIM1xi57a2wfOo6D9XAxNVRPTKLc68j37X8dO4c4as26mbFLXjvX b44+w88qRT26Co9cPwrJXJGKmtLGtXn2Em/7zfsXxupVS3rlnA0jiI5JPGArOYLtMkxO bCbVM6uRAHL+ysDoi9Naymxh2opKJQ6VPx+/ztbHVfOROw5lMLeGX7fesnJJMxA6mUWX rrqmGpq3m8XPJZZFSoW16dph80FxJReFyz9FBgcuKK8WDaWUjuUaLH5QfAdykxOj1FCS oQ8g== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p8-20020a637408000000b0054fdcd2edbfsi3664728pgc.831.2023.06.15.18.54.43; Thu, 15 Jun 2023 18:55:06 -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 S237804AbjFPBvl (ORCPT + 99 others); Thu, 15 Jun 2023 21:51:41 -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 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); } -- 2.1.0