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 D964AC0015E for ; Sun, 2 Jul 2023 19:39:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230296AbjGBTj1 (ORCPT ); Sun, 2 Jul 2023 15:39:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229973AbjGBTjZ (ORCPT ); Sun, 2 Jul 2023 15:39:25 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6581B1702; Sun, 2 Jul 2023 12:39:02 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E680660C7F; Sun, 2 Jul 2023 19:38:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6922EC433C8; Sun, 2 Jul 2023 19:38:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688326719; bh=/Qqz4dUp4wsBntlOoQfXIpx5VavkXnEUbx5TRl/0dhw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uaB9k9uVT8e5wqaZSkAcnpvVO7Z8f+DHw1iQSS9MvMpm3l60X0+1AoPZ8y7nJr1UY leN6QooPkVKJkpo/4lzZDL2HqsflkO1/pm5Hgk3jnAKvoPk61TvH/JBQJCsigMiQoK LvekIACFo+PoKTYNVpfH6LIvPT4FPaDjOk6wFW84HxQKj/w6BN36WcqyMRIoOfZSVH Vvcyjxoo6VGYbbU4yRi54JREumGRAvtDQIb2QO4LTAb17QymrhzJSdQY7415/AVfmK 0XxMuFYIBwzNsc7qOFu9I9dY2jcsGEX9TgNvWXbEzoLsLD/blDREYAH9JzguOoYXVd qqM2CAoTLbKLQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Christophe JAILLET , Alexander Gordeev , Sasha Levin , hca@linux.ibm.com, gor@linux.ibm.com, viro@zeniv.linux.org.uk, borntraeger@linux.ibm.com, linux-s390@vger.kernel.org Subject: [PATCH AUTOSEL 6.4 09/16] s390/crash: use the correct type for memory allocation Date: Sun, 2 Jul 2023 15:38:08 -0400 Message-Id: <20230702193815.1775684-9-sashal@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230702193815.1775684-1-sashal@kernel.org> References: <20230702193815.1775684-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.4.1 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christophe JAILLET [ Upstream commit f471c6585c7f2f168b8eb2d19e2d6e5f22a6645f ] get_elfcorehdr_size() returns a size_t, so there is no real point to store it in a u32. Turn 'alloc_size' into a size_t. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/0756118c9058338f3040edb91971d0bfd100027b.1686688212.git.christophe.jaillet@wanadoo.fr Signed-off-by: Alexander Gordeev Signed-off-by: Sasha Levin --- arch/s390/kernel/crash_dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/s390/kernel/crash_dump.c b/arch/s390/kernel/crash_dump.c index 8a617be28bb48..7af69948b290a 100644 --- a/arch/s390/kernel/crash_dump.c +++ b/arch/s390/kernel/crash_dump.c @@ -568,9 +568,9 @@ static size_t get_elfcorehdr_size(int mem_chunk_cnt) int elfcorehdr_alloc(unsigned long long *addr, unsigned long long *size) { Elf64_Phdr *phdr_notes, *phdr_loads; + size_t alloc_size; int mem_chunk_cnt; void *ptr, *hdr; - u32 alloc_size; u64 hdr_off; /* If we are not in kdump or zfcp/nvme dump mode return */ -- 2.39.2