From patchwork Wed Nov 1 15:03:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 13442861 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 65EE6C4167D for ; Wed, 1 Nov 2023 15:04:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231995AbjKAPE7 (ORCPT ); Wed, 1 Nov 2023 11:04:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232519AbjKAPE6 (ORCPT ); Wed, 1 Nov 2023 11:04:58 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EDBA5DC; Wed, 1 Nov 2023 08:04:55 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3BD3FC433CA; Wed, 1 Nov 2023 15:04:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1698851095; bh=wPhcCh2R5mo1LuWpZ6AE/5k4PZ89Ug41tO+Ww2sWSJY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RLJfP929G898YCZnm8fG0Z8UEYoSCW5ezQCzlUFOsxV4VOgx0C7slWecL3/MlxVqa SO64HtipVGBgdtqlfCQzHmxvTZlJZVjsbP/pVy6on0YT6I+hR50kgjnENgg32JEft3 EyQp93H4paPi7/HFZZJvJkwovU6LXOlDR26keTd9cCXTp4xgpJ0/+3GkvlRVXeogWR AtayS6mMN2cLcd3xCVPBNuLOhV7NVCj3TqqVysDMK2v6eF9fGSgU85BrNDOwZZnlaW M5SRDbd/jv2W8sPs0lxt1FH4p6EjkGKgYiYWxcuK9bxyr2zv+wfeRT++/9RDZK2baW QpC9MhPte6TbA== From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Greg Ungerer , Jack Brennen , Masahiro Yamada , Nathan Chancellor , Nick Desaulniers , Nicolas Schier Subject: [PATCH 2/7] modpost: add const qualifier to syminfo table Date: Thu, 2 Nov 2023 00:03:59 +0900 Message-Id: <20231101150404.754108-3-masahiroy@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231101150404.754108-1-masahiroy@kernel.org> References: <20231101150404.754108-1-masahiroy@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org symsearch_find_nearest() does not modify the table. Signed-off-by: Masahiro Yamada --- scripts/mod/symsearch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/mod/symsearch.c b/scripts/mod/symsearch.c index aa4ed51f9960..00f0f9c354db 100644 --- a/scripts/mod/symsearch.c +++ b/scripts/mod/symsearch.c @@ -156,7 +156,7 @@ Elf_Sym *symsearch_find_nearest(struct elf_info *elf, Elf_Addr addr, { unsigned int hi = elf->symsearch->table_size; unsigned int lo = 0; - struct syminfo *table = elf->symsearch->table; + const struct syminfo *table = elf->symsearch->table; struct syminfo target; target.addr = addr;