Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp6422441rdb; Thu, 14 Dec 2023 19:28:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IG8goYs06UmjlBjIpfsMyYWDuqfJlGGcULqibMVYXGCTEFQanzbmcENFRn3mWK7N/+hrk1h X-Received: by 2002:a05:600c:1688:b0:40c:2267:6ba4 with SMTP id k8-20020a05600c168800b0040c22676ba4mr5143183wmn.180.1702610906899; Thu, 14 Dec 2023 19:28:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702610906; cv=none; d=google.com; s=arc-20160816; b=vudZqKhtXNvDpgu+0t5+6czIdehzqTm7BGPNxA9JQedmaNpZ2UeDmofktDLjQFlFgf GFwZrq4vPvefJDtlCJ6/y/bD98Jr9j/ffIoAF/de2L0zvJ71KLdqpGhuCehgKfhMKB7g kYVbGSMptvauC+CR/NaEHngM/ujJKGqMSEJdJ8dce7U02bEk73i1tO+mG0bWIxUl32Dh XQfSL4VjXjnXHfN2cHTd/UVPK3KuBzq2vbZC08YMk774Cn+quV8vQQ7T4L52W6N8wUOm WOVwGcI0tUOsNY2pT88BdDW1VHkqKowMuXaAmObYVx+x+UHm8wG2VleAUIbrCjtstQ6g mpfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=xFjrY9f7lb5ZXGSC5fJ2WhnwT5x2Q7SVpnoNQJclmZ8=; fh=I165TSZ0GjD36GwMoCm97Y1Bz8UCbACe1bpnzFejHRo=; b=SudY7nKd625PMW7HEuHDSffh5g6akSUZotGmWj7i5mX1xKkobL+Yk2bhAg4QuVOn/i /MY0Z49BlFzFRsLW8clfh4AfadD0XrYueMpOSQSAzh5dJLZpoD1T9r19iwI18tgyeo+n 8hLluR2u9MgsQte6mDsAm9DAcJVOOHOc7bFYzJYFEKIM/4uvQ4es72S0Yqd36WrvT0TK b9Hq3PBQZE9O8I10MSgxmHopQY07dqmj3pVvjUOsOpD2Y7gH0hqHbC/7IVHk19AhqOFK r5MBbE1OgLfSyM0GD7dBc4mEybqUYu3mwuBSy9EwGZHD7yjIi/VSsBAuMQNmrVIpgofv JpAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=EsUmDUfe; spf=pass (google.com: domain of linux-kernel+bounces-404-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-404-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id u19-20020a170906069300b00a1db8912576si6821101ejb.1008.2023.12.14.19.28.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 19:28:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-404-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=EsUmDUfe; spf=pass (google.com: domain of linux-kernel+bounces-404-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-404-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 9A6311F22F2A for ; Fri, 15 Dec 2023 03:28:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2529853BA; Fri, 15 Dec 2023 03:28:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="EsUmDUfe" X-Original-To: linux-kernel@vger.kernel.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F0963CA7A for ; Fri, 15 Dec 2023 03:28:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1702610895; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=xFjrY9f7lb5ZXGSC5fJ2WhnwT5x2Q7SVpnoNQJclmZ8=; b=EsUmDUfexP0uwlkQljL8WoWTXarxv27T648omkZNIp3Be7ge37yGpuTV8uiECbGST/cTzC 6P41zi0BltBrucIXtBf5WseeIpom+EATM7YI1D6ss8PPkFXJRIYSwAkCHYjZHXv/1qRo4J 1kq2ndaxWn7shKFpK816tSkqOQpyMM4= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-193-NkTdKl5KPOucS2szYBp4IQ-1; Thu, 14 Dec 2023 22:28:12 -0500 X-MC-Unique: NkTdKl5KPOucS2szYBp4IQ-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 807EA101A555; Fri, 15 Dec 2023 03:28:11 +0000 (UTC) Received: from localhost (unknown [10.72.116.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CB362492BF0; Fri, 15 Dec 2023 03:28:10 +0000 (UTC) Date: Fri, 15 Dec 2023 11:28:07 +0800 From: Baoquan He To: Yuntao Wang Cc: linux-kernel@vger.kernel.org, kexec@lists.infradead.org, x86@kernel.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Vivek Goyal , Dave Young , Hari Bathini , Eric DeVolder , Andrew Morton , Sourabh Jain , Sean Christopherson , Takashi Iwai , Lianbo Jiang Subject: Re: [PATCH 2/3] x86/crash: use SZ_1M macro instead of hardcoded value Message-ID: References: <20231214163842.129139-1-ytcoode@gmail.com> <20231214163842.129139-3-ytcoode@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231214163842.129139-3-ytcoode@gmail.com> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.10 On 12/15/23 at 12:38am, Yuntao Wang wrote: > Use SZ_1M macro instead of hardcoded 1<<20 to make code more readable. > > Signed-off-by: Yuntao Wang > --- > arch/x86/kernel/crash.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c > index 792231a56d11..249b5876e7ec 100644 > --- a/arch/x86/kernel/crash.c > +++ b/arch/x86/kernel/crash.c Acked-by: Baoquan He > @@ -170,7 +170,7 @@ static int elf_header_exclude_ranges(struct crash_mem *cmem) > int ret = 0; > > /* Exclude the low 1M because it is always reserved */ > - ret = crash_exclude_mem_range(cmem, 0, (1<<20)-1); > + ret = crash_exclude_mem_range(cmem, 0, SZ_1M - 1); > if (ret) > return ret; > > -- > 2.43.0 >