Received: by 2002:a05:7412:d008:b0:f9:6acb:47ec with SMTP id bd8csp160629rdb; Tue, 19 Dec 2023 12:22:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IHang/BdSOhjJ0Ty/1SCyH7C9pfGNKbPkPM/rRgisL3GhnCJDpDcK71Kd4P97BXYh2rdJWB X-Received: by 2002:a05:6870:4154:b0:203:e64d:874c with SMTP id r20-20020a056870415400b00203e64d874cmr2317957oad.118.1703017320212; Tue, 19 Dec 2023 12:22:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703017320; cv=none; d=google.com; s=arc-20160816; b=nRVKQIjWec3iI98j1fAdqggiK+72GVZ5JpkWKxv+fRSznwGlthDPMM7ERw+tjoQcbD 2qSNbIeG6MxupyXRMEtFkk2eIktY6dIiDEc+mhCdMm3cYWegaEwybbL7nZClSRb53U/C B852qBAY9r5PmSsaJHe3rrnYL5YqsJybVlu6hPv24JmA6y4d/q2sB0a5MHwTioEQthIa IRk26mW8D97g7EJzTC+GSWpXnnriv02PCPuILW544lBxT5Qbt3OKDoilniheupRuYeAg KoFZr15P2PhwpTwBLaaJiXeXFbPdzULPBQm0ZfezHdWT5I0H4iqeuTgEVPA90z1SYfgv 5Xpg== 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 :subject:cc:to:from:date:dkim-signature; bh=nZpxRLn7fszxsXWi+4wtylo9J+R5cOjTtxoF972qb8o=; fh=t51KxQd1Jjs/ybFRaaethuS7SN4FmixkQKZ5v7/Ow9c=; b=HT5XajWpkLchHu6Yvcq0eMs+ENgkj+D97dSupcW/1gu9sku7q2OJGNlHrq9uSbkuh4 HFgro6M9QK5c8iQetq0pMi1BYNQLBdlhyBzMjXnUx4gmE7xK81MUrpTzsc05fOdqN+NJ DOfVxk+nVumZ9jMYPJervPc9Ov36B+1uYZ+LJMR7NRDPXQQgwFq8z++w82qk/NGTW9Ei KQzR/u726q4nWWNGOu1D9JYh1ZI8LdiEi6MpRJDcebnVteV3Ntsci1FBC2NhdAwQ+tFt Xg/d+bKzimjnAz3yfMz5l2ARoEzGa3kZFdcbOkAYkt1wXvGZLdLHzbiURADINe3GREaF F/kQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=PFIpb+JI; spf=pass (google.com: domain of linux-kernel+bounces-5900-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5900-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id e4-20020a656784000000b005cd77a0fd8dsi6750365pgr.484.2023.12.19.12.21.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 12:22:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-5900-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=PFIpb+JI; spf=pass (google.com: domain of linux-kernel+bounces-5900-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5900-linux.lists.archive=gmail.com@vger.kernel.org" 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id D1624287E39 for ; Tue, 19 Dec 2023 20:21:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 76D9F39AC5; Tue, 19 Dec 2023 20:21:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="PFIpb+JI" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 7C9C73987A for ; Tue, 19 Dec 2023 20:21:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8EC87C433C8; Tue, 19 Dec 2023 20:21:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1703017313; bh=LTznM+nJnvfhzKJWRfp37Jsxl2aZjoXM7HdJ4keOzxE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=PFIpb+JI2WpqXlzcb8/eNuVhDXIZHv61W1U1GOkLLqBTA7ZwRlYwkKSx4lNBnz8zc K+J1kmoB0HqliqBhULCX6Ti76mZEnAhypX2buDp6tQWqZ9IDbQfIXB2WO1k9sM8tsx sHX2EW+qrG7XZIcF52/aPHU4raQG/PPIsXuBaWI0= Date: Tue, 19 Dec 2023 12:21:51 -0800 From: Andrew Morton To: Yuntao Wang 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 Subject: Re: [PATCH] x86/kexec: use pr_err() instead of kexec_dprintk() when an error occurs Message-Id: <20231219122151.aa4ae562537abf74067588fe@linux-foundation.org> In-Reply-To: <20231219072902.90104-1-ytcoode@gmail.com> References: <20231218102436.4378f51a36525ce770f6cd30@linux-foundation.org> <20231219072902.90104-1-ytcoode@gmail.com> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) 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-Transfer-Encoding: 7bit On Tue, 19 Dec 2023 15:29:01 +0800 Yuntao Wang wrote: > When an error is detected, use pr_err() instead of kexec_dprintk() to > output log message. > > In addition, remove the unnecessary return from set_page_address(). The above describes what the code does, which is already quite clear from looking at the code. Please write changelogs and code comments which describe *why* the code does something, rather than *what* it does. > > > --- 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"); ie, what are the reasons for this change? > 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