From mboxrd@z Thu Jan 1 00:00:00 1970 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 0F1F5C433EF for ; Wed, 1 Jun 2022 16:00:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243343AbiFAQAQ (ORCPT ); Wed, 1 Jun 2022 12:00:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355989AbiFAQAO (ORCPT ); Wed, 1 Jun 2022 12:00:14 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6DAB05DBEE; Wed, 1 Jun 2022 09:00:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:Content-Type :In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date:Message-ID: Sender:Reply-To:Content-ID:Content-Description; bh=Y4MMjPUMJE17uRA1W8JeqNIa3gV1RDtW27U/YpItROE=; b=PNPjea3Bdl437M1+0zPKZ4cwLN hFYNzny9457JNo5FUnAC5pAYinngm5Tzi532WmplRYl6mclmGlkBTPQV3EWbzjL1lJsdCgFHoFuKE xkLOTIBC7a3cNimiGIlT1XQgleDQ8LF8XeG1gAtwaqa4Iib1MdVEEyvODkxXbwqgTlo6BYnm50u2f T4VZjAUy88+ZiooYd85oj0NRQS8ZrJWdoH3QHSQWCpMEohMg0rVlF13Rh0cfgNc+F58qRHyEGWpcy jNiQZA2jP0hH7K9WKcTKhXLA7jvLD8Jvrqc783shML119GeiVR3I97cMu2AHW7pekIpxw5XCaxa82 yN+8YoxA==; Received: from [2601:1c0:6280:3f0::aa0b] by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nwQlH-003pGW-Rj; Wed, 01 Jun 2022 15:59:57 +0000 Message-ID: <86c1aaa4-df2e-d541-e24e-2d1cc9537500@infradead.org> Date: Wed, 1 Jun 2022 08:59:51 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH] RISCV: kexec: Fix build error without CONFIG_MODULES Content-Language: en-US To: Li Zhengyu , palmer@rivosinc.com Cc: paul.walmsley@sifive.com, aou@eecs.berkeley.edu, liaochang1@huawei.com, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, ebiederm@xmission.com, kexec@lists.infradead.org, linux-next@vger.kernel.org References: <20220601063924.13037-1-lizhengyu3@huawei.com> From: Randy Dunlap In-Reply-To: <20220601063924.13037-1-lizhengyu3@huawei.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-next@vger.kernel.org On 5/31/22 23:39, Li Zhengyu wrote: > When CONFIG_MODULES is not set/enabled: > > ../arch/riscv/kernel/elf_kexec.c:353:9: error: unknown type name 'Elf_Rela'; did you mean 'Elf64_Rela'? > 353 | Elf_Rela *relas; > | ^~~~~~~~ > | Elf64_Rela > > Replace Elf_Rela by Elf64_Rela to avoid relying on CONFIG_MODULES. > > Signed-off-by: Li Zhengyu Reported-by: Randy Dunlap Tested-by: Randy Dunlap Acked-by: Randy Dunlap thanks. > --- > arch/riscv/kernel/elf_kexec.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/riscv/kernel/elf_kexec.c b/arch/riscv/kernel/elf_kexec.c > index 9cb85095fd45..0cb94992c15b 100644 > --- a/arch/riscv/kernel/elf_kexec.c > +++ b/arch/riscv/kernel/elf_kexec.c > @@ -349,7 +349,7 @@ int arch_kexec_apply_relocations_add(struct purgatory_info *pi, > { > const char *strtab, *name, *shstrtab; > const Elf_Shdr *sechdrs; > - Elf_Rela *relas; > + Elf64_Rela *relas; > int i, r_type; > > /* String & section header string table */ -- ~Randy