Received: by 2002:a05:7412:d008:b0:f9:6acb:47ec with SMTP id bd8csp315204rdb; Tue, 19 Dec 2023 19:02:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IFmA+64VvIknAlbIs3bDxT/ilftc+184QWd7dB5sl29Qc6J4Nrs/ZzmS2FcuT1YCyqQcvX4 X-Received: by 2002:a05:6830:1444:b0:6d9:e960:abc8 with SMTP id w4-20020a056830144400b006d9e960abc8mr20664766otp.68.1703041342291; Tue, 19 Dec 2023 19:02:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703041342; cv=none; d=google.com; s=arc-20160816; b=nFAjO8x2GSHahRjmrCLfkevrReyux/r/tbluhp9BI6MDZf9lUdi7rCYtUlERBL0aN1 rmyn+YtWGjVMegtvocyMwMoR/qMkNn8KBe8UpcqU6KWMPJt+HGfyF9EIaob12axCTKZJ Z3EgZX2WuJvWL9Gf3R6y+o4bTodq+K9LuUGA1UXfA0ln+G9YjaCtGJ6KpxO9qxNTcuPg 4jiu6UgpRRIJwWvtEVszx4A6wdMZ4SonrHmSopXeWVVubmaeNRhUWpzcwqTovP2Jxhm1 iepTIyQEBbVbk4iJC8vKnv1d/ksGNHJ4MKNShtdnhP2NLQPfdTa444tU1zbEMKn7VAOx sB5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=QDcGZt780N7cf+8KzhOequQQWw83UVMubMF6UVq890A=; fh=oUno6KjwujJjYgyb1V0FQcd0noQT09EcBDaFU9bOhw8=; b=khUspyduF7ZFvCQL90yh6kNm4HUk3rpHm1cESGc7mIVKyc29fuiIQPFU9eTaPsljRP tuh41HloXL4bmeEN6r+S/27blRmBoAlVuRHCLYFlvhs5t9nz4quZXmz9lw30qojf00tO LCrqjK/44IFoWyD7iF7SxuHUyEh8dwdnq2sehDLMmTTyll+NeuH3F0m0c+u+p1yeTLzL uK9uvUxjUo5FrR7P39c1sQAJv8RV8PUdCe9A6JTRju2inidbjvxXNDDZZyV2Y7qbLPwH QhkMQdT1Gcve8phQmODQ/cp5L6UaozQnZtckVvBM8PBMamvrC/KU9wcyUqHkCbr+N+io CMBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="ZKFa8s5/"; spf=pass (google.com: domain of linux-kernel+bounces-6310-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6310-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id o14-20020a63e34e000000b005c677a35336si20838023pgj.348.2023.12.19.19.02.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 19:02:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-6310-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="ZKFa8s5/"; spf=pass (google.com: domain of linux-kernel+bounces-6310-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6310-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 0C6DAB21094 for ; Wed, 20 Dec 2023 03:02:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 52D90F9FB; Wed, 20 Dec 2023 03:01:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ZKFa8s5/" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 501AED312 for ; Wed, 20 Dec 2023 03:01:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-f181.google.com with SMTP id d9443c01a7336-1d3d0faf262so18179215ad.3 for ; Tue, 19 Dec 2023 19:01:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703041296; x=1703646096; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QDcGZt780N7cf+8KzhOequQQWw83UVMubMF6UVq890A=; b=ZKFa8s5/xZFN+KZtL10Pg29ffY6IuJKkiFIr2vYiReTkG21rWuif2e7jt/p0d+qxs/ adkG+sV/UXQ9RzHHYO9KpwKrvi23hJVRWP3eyQRDInXpc1fyk+A9mhWCuXO/kmVXxPvI zkjCGJGq4tSUDI0azdGEXvHGAEe6W/0nFKINtGVuOihPqbqzneg7B5Jt7JCIg1Ta9XQ7 LQx0jNUk3e/3FQV3+ucczfnWiu6UPBxn5SqrRZl/ADj4+MnVCb9CyL+8zbb9W1vKvi/4 sGutPQ+7C+/ciExomhx190URRmvzxMU+CFaRuuOUwMmMbV+45gEffJ4bICtVVrsrDanF o23w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703041296; x=1703646096; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QDcGZt780N7cf+8KzhOequQQWw83UVMubMF6UVq890A=; b=IC2mnOgIBB31KCJ7d7DOVXijsya2dkaSFvRJyydkd0za441+uVrI0BekvA85ZSgeXU gFIOjuCHrQRIRj/2vQ6yaNxkGwdZqIjvhmtbWDnA5cNGhNHNe1zWmTX8GKJDmeE98Mdw 7IGqajGt5Bj4/Md0RNd4uq5E4LglS+6GSKO+En9yLsJGn+1mhZAWe8ddHfEK2r6QuOFc 8cN97T6fkBC3nPmvRXVlD9JaoKly91knHUYZmdefiSMKoOL8lTJhOB2iQXooa7p7IN+l o/qr0jfDSCF41CRwsgKf/ETxHe5RIanCd5gtQWGHiQINbxuysTPJi5DcsI8Xfhrus+4K FNOw== X-Gm-Message-State: AOJu0YxxCxXkQ+mpTwWrxElMRXSX5n0s//Kfjp12bTP3ZgQG/RykJ5BP RlfzkTo6wU2kfZMwYAbjGGJ4HhFMWIE= X-Received: by 2002:a17:903:234c:b0:1d0:c418:1758 with SMTP id c12-20020a170903234c00b001d0c4181758mr23877565plh.66.1703041296453; Tue, 19 Dec 2023 19:01:36 -0800 (PST) Received: from code.. ([144.202.108.46]) by smtp.gmail.com with ESMTPSA id w10-20020a170902e88a00b001d38410aa13sm8752200plg.192.2023.12.19.19.01.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 19:01:36 -0800 (PST) From: Yuntao Wang To: akpm@linux-foundation.org Cc: bhe@redhat.com, bp@alien8.de, corbet@lwn.net, dave.hansen@linux.intel.com, ebiederm@xmission.com, hpa@zytor.com, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, mingo@redhat.com, tglx@linutronix.de, x86@kernel.org, ytcoode@gmail.com Subject: [PATCH v2] x86/kexec: use pr_err() instead of kexec_dprintk() when an error occurs Date: Wed, 20 Dec 2023 11:01:24 +0800 Message-ID: <20231220030124.149160-1-ytcoode@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231219122151.aa4ae562537abf74067588fe@linux-foundation.org> References: <20231219122151.aa4ae562537abf74067588fe@linux-foundation.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit When detecting an error, the current code uses kexec_dprintk() to output log message. This is not quite appropriate as kexec_dprintk() is mainly used for outputting debugging messages, rather than error messages. Replace kexec_dprintk() with pr_err(). This also makes the output method for this error log align with the output method for other error logs in this function. Additionally, the last return statement in set_page_address() is unnecessary, remove it. Signed-off-by: Yuntao Wang --- v1 -> v2: Rewrite changelogs arch/x86/kernel/kexec-bzimage64.c | 2 +- mm/highmem.c | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/x86/kernel/kexec-bzimage64.c b/arch/x86/kernel/kexec-bzimage64.c index e9ae0eac6bf9..4a77d5dd4bce 100644 --- a/arch/x86/kernel/kexec-bzimage64.c +++ b/arch/x86/kernel/kexec-bzimage64.c @@ -429,7 +429,7 @@ static void *bzImage64_load(struct kimage *image, char *kernel, * command line. Make sure it does not overflow */ if (cmdline_len + MAX_ELFCOREHDR_STR_LEN > header->cmdline_size) { - kexec_dprintk("Appending elfcorehdr= to command line exceeds maximum allowed length\n"); + pr_err("Appending elfcorehdr= to command line exceeds maximum allowed length\n"); return ERR_PTR(-EINVAL); } diff --git a/mm/highmem.c b/mm/highmem.c index e19269093a93..bd48ba445dd4 100644 --- a/mm/highmem.c +++ b/mm/highmem.c @@ -799,8 +799,6 @@ void set_page_address(struct page *page, void *virtual) } spin_unlock_irqrestore(&pas->lock, flags); } - - return; } void __init page_address_init(void) -- 2.43.0